Add Container
Adds a container to an advanced mode scan profile.
Example
var context = PublicApi.GetContext("https://api.sp4c.storage-defender.ibm.com", "username", "password");
var cResult = context.TenantService.AddContainer(new RemoteGroupNode()
{
ContainerName = "APITestContainer",
NodeType = RemoteNodeType.SiteCollection,
ScanProfileName = "Test",
Rule = new FilterPolicyContent()
{
Name = "APITestRule",
NodeType = RemoteNodeType.SiteCollection,
Filters= new List<FilterRule>()
{
new FilterRule()
{
Condition = PolicyCondition.Contains,
Type= PolicyFilterType.Url,
Value = new PolicyValue()
{
Value1 = "test",
}
},
new FilterRule()
{
Condition = PolicyCondition.Contains,
Type= PolicyFilterType.Url,
ExpressionType = ExpressionType.Or,
Value = new PolicyValue()
{
Value1 = "test2",
}
}
}
}
});
Request Information
Represents the request to add a container to an advanced mode scan profile.
Element | Description | Type |
---|---|---|
ContainerName | Sets a name for the container. | String |
NodeType | Sets the type for objects that will be scanned into the container. |
Enum Valid values: SiteCollection (for SharePoint Sites) Mailbox (for Mailboxes) OneDrive Office365Group (for Microsoft 365 Groups) |
ScanProfileName | Sets the name of the scan profile where the container will be added. | String |
Rule | Sets the container’s rule that will be used to filter objects. | For details, refer to FilterPolicyContent Class Parameters. |