Interface PolicyAssignmentsClient
-
- All Superinterfaces:
InnerSupportsDelete<PolicyAssignmentInner>,InnerSupportsListing<PolicyAssignmentInner>
public interface PolicyAssignmentsClient extends InnerSupportsListing<PolicyAssignmentInner>, InnerSupportsDelete<PolicyAssignmentInner>
An instance of this class provides access to all the operations defined in PolicyAssignmentsClient.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PolicyAssignmentInnercreate(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)This operation creates or updates a policy assignment with the given scope and name.Mono<PolicyAssignmentInner>createAsync(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)This operation creates or updates a policy assignment with the given scope and name.PolicyAssignmentInnercreateById(String policyAssignmentId, PolicyAssignmentInner parameters)This operation creates or updates the policy assignment with the given ID.Mono<PolicyAssignmentInner>createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters)This operation creates or updates the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>createByIdWithResponse(String policyAssignmentId, PolicyAssignmentInner parameters, com.azure.core.util.Context context)This operation creates or updates the policy assignment with the given ID.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>createByIdWithResponseAsync(String policyAssignmentId, PolicyAssignmentInner parameters)This operation creates or updates the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>createWithResponse(String scope, String policyAssignmentName, PolicyAssignmentInner parameters, com.azure.core.util.Context context)This operation creates or updates a policy assignment with the given scope and name.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>createWithResponseAsync(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)This operation creates or updates a policy assignment with the given scope and name.PolicyAssignmentInnerdelete(String scope, String policyAssignmentName)This operation deletes a policy assignment, given its name and the scope it was created in.Mono<PolicyAssignmentInner>deleteAsync(String scope, String policyAssignmentName)This operation deletes a policy assignment, given its name and the scope it was created in.PolicyAssignmentInnerdeleteById(String policyAssignmentId)This operation deletes the policy with the given ID.Mono<PolicyAssignmentInner>deleteByIdAsync(String policyAssignmentId)This operation deletes the policy with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>deleteByIdWithResponse(String policyAssignmentId, com.azure.core.util.Context context)This operation deletes the policy with the given ID.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>deleteByIdWithResponseAsync(String policyAssignmentId)This operation deletes the policy with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>deleteWithResponse(String scope, String policyAssignmentName, com.azure.core.util.Context context)This operation deletes a policy assignment, given its name and the scope it was created in.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>deleteWithResponseAsync(String scope, String policyAssignmentName)This operation deletes a policy assignment, given its name and the scope it was created in.PolicyAssignmentInnerget(String scope, String policyAssignmentName)This operation retrieves a single policy assignment, given its name and the scope it was created at.Mono<PolicyAssignmentInner>getAsync(String scope, String policyAssignmentName)This operation retrieves a single policy assignment, given its name and the scope it was created at.PolicyAssignmentInnergetById(String policyAssignmentId)The operation retrieves the policy assignment with the given ID.Mono<PolicyAssignmentInner>getByIdAsync(String policyAssignmentId)The operation retrieves the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>getByIdWithResponse(String policyAssignmentId, com.azure.core.util.Context context)The operation retrieves the policy assignment with the given ID.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>getByIdWithResponseAsync(String policyAssignmentId)The operation retrieves the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>getWithResponse(String scope, String policyAssignmentName, com.azure.core.util.Context context)This operation retrieves a single policy assignment, given its name and the scope it was created at.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>getWithResponseAsync(String scope, String policyAssignmentName)This operation retrieves a single policy assignment, given its name and the scope it was created at.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>list()This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>list(String filter, Integer top, com.azure.core.util.Context context)This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listAsync()This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listAsync(String filter, Integer top)This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listByResourceGroup(String resourceGroupName)This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listByResourceGroup(String resourceGroupName, String filter, Integer top, com.azure.core.util.Context context)This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listByResourceGroupAsync(String resourceGroupName)This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listByResourceGroupAsync(String resourceGroupName, String filter, Integer top)This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listForManagementGroup(String managementGroupId)This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listForManagementGroup(String managementGroupId, String filter, Integer top, com.azure.core.util.Context context)This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listForManagementGroupAsync(String managementGroupId)This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listForManagementGroupAsync(String managementGroupId, String filter, Integer top)This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listForResource(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName)This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter.com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner>listForResource(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String filter, Integer top, com.azure.core.util.Context context)This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listForResourceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName)This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter.com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner>listForResourceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String filter, Integer top)This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter.PolicyAssignmentInnerupdate(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)This operation updates a policy assignment with the given scope and name.Mono<PolicyAssignmentInner>updateAsync(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)This operation updates a policy assignment with the given scope and name.PolicyAssignmentInnerupdateById(String policyAssignmentId, PolicyAssignmentUpdate parameters)This operation updates the policy assignment with the given ID.Mono<PolicyAssignmentInner>updateByIdAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters)This operation updates the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>updateByIdWithResponse(String policyAssignmentId, PolicyAssignmentUpdate parameters, com.azure.core.util.Context context)This operation updates the policy assignment with the given ID.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>updateByIdWithResponseAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters)This operation updates the policy assignment with the given ID.com.azure.core.http.rest.Response<PolicyAssignmentInner>updateWithResponse(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters, com.azure.core.util.Context context)This operation updates a policy assignment with the given scope and name.Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>>updateWithResponseAsync(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)This operation updates a policy assignment with the given scope and name.
-
-
-
Method Detail
-
deleteWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> deleteWithResponseAsync(String scope, String policyAssignmentName)
This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to delete.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteAsync
Mono<PolicyAssignmentInner> deleteAsync(String scope, String policyAssignmentName)
This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Specified by:
deleteAsyncin interfaceInnerSupportsDelete<PolicyAssignmentInner>- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to delete.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
delete
PolicyAssignmentInner delete(String scope, String policyAssignmentName)
This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to delete.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> deleteWithResponse(String scope, String policyAssignmentName, com.azure.core.util.Context context)
This operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to delete.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> createWithResponseAsync(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)
This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for the policy assignment.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createAsync
Mono<PolicyAssignmentInner> createAsync(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)
This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for the policy assignment.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
create
PolicyAssignmentInner create(String scope, String policyAssignmentName, PolicyAssignmentInner parameters)
This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for the policy assignment.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> createWithResponse(String scope, String policyAssignmentName, PolicyAssignmentInner parameters, com.azure.core.util.Context context)
This operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for the policy assignment.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> getWithResponseAsync(String scope, String policyAssignmentName)
This operation retrieves a single policy assignment, given its name and the scope it was created at.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to get.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getAsync
Mono<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName)
This operation retrieves a single policy assignment, given its name and the scope it was created at.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to get.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
get
PolicyAssignmentInner get(String scope, String policyAssignmentName)
This operation retrieves a single policy assignment, given its name and the scope it was created at.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to get.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> getWithResponse(String scope, String policyAssignmentName, com.azure.core.util.Context context)
This operation retrieves a single policy assignment, given its name and the scope it was created at.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment to get.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> updateWithResponseAsync(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)
This operation updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateAsync
Mono<PolicyAssignmentInner> updateAsync(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)
This operation updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
update
PolicyAssignmentInner update(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters)
This operation updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> updateWithResponse(String scope, String policyAssignmentName, PolicyAssignmentUpdate parameters, com.azure.core.util.Context context)
This operation updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group.- Parameters:
scope- The scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.policyAssignmentName- The name of the policy assignment.parameters- Parameters for policy assignment patch request.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroupAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listByResourceGroupAsync(String resourceGroupName, String filter, Integer top)
This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.- Parameters:
resourceGroupName- The name of the resource group that contains policy assignments.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroupAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listByResourceGroupAsync(String resourceGroupName)
This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.- Specified by:
listByResourceGroupAsyncin interfaceInnerSupportsListing<PolicyAssignmentInner>- Parameters:
resourceGroupName- The name of the resource group that contains policy assignments.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listByResourceGroup(String resourceGroupName)
This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.- Specified by:
listByResourceGroupin interfaceInnerSupportsListing<PolicyAssignmentInner>- Parameters:
resourceGroupName- The name of the resource group that contains policy assignments.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listByResourceGroup
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listByResourceGroup(String resourceGroupName, String filter, Integer top, com.azure.core.util.Context context)
This operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group.- Parameters:
resourceGroupName- The name of the resource group that contains policy assignments.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.context- The context to associate with this operation.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForResourceAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listForResourceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String filter, Integer top)
This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').- Parameters:
resourceGroupName- The name of the resource group containing the resource.resourceProviderNamespace- The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).parentResourcePath- The parent resource path. Use empty string if there is none.resourceType- The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).resourceName- The name of the resource.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForResourceAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listForResourceAsync(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName)
This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').- Parameters:
resourceGroupName- The name of the resource group containing the resource.resourceProviderNamespace- The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).parentResourcePath- The parent resource path. Use empty string if there is none.resourceType- The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).resourceName- The name of the resource.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForResource
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listForResource(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName)
This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').- Parameters:
resourceGroupName- The name of the resource group containing the resource.resourceProviderNamespace- The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).parentResourcePath- The parent resource path. Use empty string if there is none.resourceType- The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).resourceName- The name of the resource.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForResource
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listForResource(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String filter, Integer top, com.azure.core.util.Context context)
This operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the resource level. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ''). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == '', {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == '', {parentResourcePath} == '', {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp').- Parameters:
resourceGroupName- The name of the resource group containing the resource.resourceProviderNamespace- The namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines).parentResourcePath- The parent resource path. Use empty string if there is none.resourceType- The resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites).resourceName- The name of the resource.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.context- The context to associate with this operation.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForManagementGroupAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listForManagementGroupAsync(String managementGroupId, String filter, Integer top)
This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the management group.- Parameters:
managementGroupId- The ID of the management group.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForManagementGroupAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listForManagementGroupAsync(String managementGroupId)
This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the management group.- Parameters:
managementGroupId- The ID of the management group.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForManagementGroup
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listForManagementGroup(String managementGroupId)
This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the management group.- Parameters:
managementGroupId- The ID of the management group.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listForManagementGroup
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> listForManagementGroup(String managementGroupId, String filter, Integer top, com.azure.core.util.Context context)
This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the management group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the management group.- Parameters:
managementGroupId- The ID of the management group.filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.context- The context to associate with this operation.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listAsync(String filter, Integer top)
This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.- Parameters:
filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
listAsync
com.azure.core.http.rest.PagedFlux<PolicyAssignmentInner> listAsync()
This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.- Specified by:
listAsyncin interfaceInnerSupportsListing<PolicyAssignmentInner>- Returns:
- list of policy assignments as paginated response with
PagedFlux. - Throws:
com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> list()
This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.- Specified by:
listin interfaceInnerSupportsListing<PolicyAssignmentInner>- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<PolicyAssignmentInner> list(String filter, Integer top, com.azure.core.util.Context context)
This operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.- Parameters:
filter- The filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}''. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}.top- Maximum number of records to return. When the $top filter is not provided, it will return 500 records.context- The context to associate with this operation.- Returns:
- list of policy assignments as paginated response with
PagedIterable. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteByIdWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> deleteByIdWithResponseAsync(String policyAssignmentId)
This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).- Parameters:
policyAssignmentId- The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteByIdAsync
Mono<PolicyAssignmentInner> deleteByIdAsync(String policyAssignmentId)
This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).- Parameters:
policyAssignmentId- The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteById
PolicyAssignmentInner deleteById(String policyAssignmentId)
This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).- Parameters:
policyAssignmentId- The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
deleteByIdWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> deleteByIdWithResponse(String policyAssignmentId, com.azure.core.util.Context context)
This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).- Parameters:
policyAssignmentId- The ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createByIdWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> createByIdWithResponseAsync(String policyAssignmentId, PolicyAssignmentInner parameters)
This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createByIdAsync
Mono<PolicyAssignmentInner> createByIdAsync(String policyAssignmentId, PolicyAssignmentInner parameters)
This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createById
PolicyAssignmentInner createById(String policyAssignmentId, PolicyAssignmentInner parameters)
This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
createByIdWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> createByIdWithResponse(String policyAssignmentId, PolicyAssignmentInner parameters, com.azure.core.util.Context context)
This operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getByIdWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> getByIdWithResponseAsync(String policyAssignmentId)
The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getByIdAsync
Mono<PolicyAssignmentInner> getByIdAsync(String policyAssignmentId)
The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getById
PolicyAssignmentInner getById(String policyAssignmentId)
The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getByIdWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> getByIdWithResponse(String policyAssignmentId, com.azure.core.util.Context context)
The operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateByIdWithResponseAsync
Mono<com.azure.core.http.rest.Response<PolicyAssignmentInner>> updateByIdWithResponseAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters)
This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to update. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment along with
Responseon successful completion ofMono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateByIdAsync
Mono<PolicyAssignmentInner> updateByIdAsync(String policyAssignmentId, PolicyAssignmentUpdate parameters)
This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to update. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateById
PolicyAssignmentInner updateById(String policyAssignmentId, PolicyAssignmentUpdate parameters)
This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to update. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment patch request.- Returns:
- the policy assignment.
- Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
updateByIdWithResponse
com.azure.core.http.rest.Response<PolicyAssignmentInner> updateByIdWithResponse(String policyAssignmentId, PolicyAssignmentUpdate parameters, com.azure.core.util.Context context)
This operation updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'.- Parameters:
policyAssignmentId- The ID of the policy assignment to update. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.parameters- Parameters for policy assignment patch request.context- The context to associate with this operation.- Returns:
- the policy assignment along with
Response. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException- thrown if the request is rejected by server.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
-