PolicyAssignment.DefinitionStages.WithScope Interface
public interface WithScope
A policy assignment specifying the scope of the policy.
Method Summary
Modifier and Type | Method and Description |
---|---|
Policy |
forResource(GenericResource genericResource)
Specifies the scope of the policy assignment to be a resource. |
Policy |
forResourceGroup(ResourceGroup resourceGroup)
Specifies the scope of the policy assignment to be a resource group. |
Policy |
forScope(String scope)
Specifies the scope of the policy assignment. |
Method Details
forResource
public WithPolicyDefinition forResource(GenericResource genericResource)
Specifies the scope of the policy assignment to be a resource.
Parameters:
Returns:
forResourceGroup
public WithPolicyDefinition forResourceGroup(ResourceGroup resourceGroup)
Specifies the scope of the policy assignment to be a resource group.
Parameters:
Returns:
forScope
public WithPolicyDefinition forScope(String scope)
Specifies the scope of the policy assignment.
Parameters:
Returns:
Applies to
Azure SDK for Java