Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PolicyAssignments

Package version

Class representing a PolicyAssignments.

Hierarchy

  • PolicyAssignments

Index

Constructors

constructor

Methods

create

  • create(scope: string, policyAssignmentName: string, parameters: PolicyAssignment, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsCreateResponse>
  • create(scope: string, policyAssignmentName: string, parameters: PolicyAssignment, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • create(scope: string, policyAssignmentName: string, parameters: PolicyAssignment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group.

    summary

    Creates a policy assignment.

    Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment.

    • parameters: PolicyAssignment

      Parameters for the policy assignment.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsCreateResponse>

    Promise<Models.PolicyAssignmentsCreateResponse>

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment.

    • parameters: PolicyAssignment

      Parameters for the policy assignment.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment.

    • parameters: PolicyAssignment

      Parameters for the policy assignment.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

createById

  • createById(policyAssignmentId: string, parameters: PolicyAssignment, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsCreateByIdResponse>
  • createById(policyAssignmentId: string, parameters: PolicyAssignment, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • createById(policyAssignmentId: string, parameters: PolicyAssignment, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • Policy assignments are inherited by child resources. For example, when you apply a policy to a resource group that policy is assigned to all resources in the group. When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.

    summary

    Creates a policy assignment by ID.

    Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • parameters: PolicyAssignment

      Parameters for policy assignment.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsCreateByIdResponse>

    Promise<Models.PolicyAssignmentsCreateByIdResponse>

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • parameters: PolicyAssignment

      Parameters for policy assignment.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to create. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • parameters: PolicyAssignment

      Parameters for policy assignment.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

deleteById

  • deleteById(policyAssignmentId: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsDeleteByIdResponse>
  • deleteById(policyAssignmentId: string, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • deleteById(policyAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.

    summary

    Deletes a policy assignment by ID.

    Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsDeleteByIdResponse>

    Promise<Models.PolicyAssignmentsDeleteByIdResponse>

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to delete. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

deleteMethod

  • deleteMethod(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsDeleteMethodResponse>
  • deleteMethod(scope: string, policyAssignmentName: string, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • deleteMethod(scope: string, policyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • Deletes a policy assignment.

    Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to delete.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsDeleteMethodResponse>

    Promise<Models.PolicyAssignmentsDeleteMethodResponse>

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to delete.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to delete.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

get

  • get(scope: string, policyAssignmentName: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsGetResponse>
  • get(scope: string, policyAssignmentName: string, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • get(scope: string, policyAssignmentName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • Gets a policy assignment.

    Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to get.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsGetResponse>

    Promise<Models.PolicyAssignmentsGetResponse>

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to get.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • scope: string

      The scope of the policy assignment.

    • policyAssignmentName: string

      The name of the policy assignment to get.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

getById

  • getById(policyAssignmentId: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsGetByIdResponse>
  • getById(policyAssignmentId: string, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • getById(policyAssignmentId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignment>): void
  • When providing a scope for the assignment, use '/subscriptions/{subscription-id}/' for subscriptions, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' for resources.

    summary

    Gets a policy assignment by ID.

    Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsGetByIdResponse>

    Promise<Models.PolicyAssignmentsGetByIdResponse>

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

  • Parameters

    • policyAssignmentId: string

      The ID of the policy assignment to get. Use the format '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignment>

      The callback

    Returns void

list

listForResource

  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options?: Models.PolicyAssignmentsListForResourceOptionalParams): Promise<Models.PolicyAssignmentsListForResourceResponse>
  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • listForResource(resourceGroupName: string, resourceProviderNamespace: string, parentResourcePath: string, resourceType: string, resourceName: string, options: PolicyAssignmentsListForResourceOptionalParams, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • Gets policy assignments for a resource.

    deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • resourceGroupName: string

      The name of the resource group containing the resource. The name is case insensitive.

    • resourceProviderNamespace: string

      The namespace of the resource provider.

    • parentResourcePath: string

      The parent resource path.

    • resourceType: string

      The resource type.

    • resourceName: string

      The name of the resource with policy assignments.

    • Optional options: Models.PolicyAssignmentsListForResourceOptionalParams

    Returns Promise<Models.PolicyAssignmentsListForResourceResponse>

    Promise<Models.PolicyAssignmentsListForResourceResponse>

  • deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • resourceGroupName: string

      The name of the resource group containing the resource. The name is case insensitive.

    • resourceProviderNamespace: string

      The namespace of the resource provider.

    • parentResourcePath: string

      The parent resource path.

    • resourceType: string

      The resource type.

    • resourceName: string

      The name of the resource with policy assignments.

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

  • deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • resourceGroupName: string

      The name of the resource group containing the resource. The name is case insensitive.

    • resourceProviderNamespace: string

      The namespace of the resource provider.

    • parentResourcePath: string

      The parent resource path.

    • resourceType: string

      The resource type.

    • resourceName: string

      The name of the resource with policy assignments.

    • options: PolicyAssignmentsListForResourceOptionalParams

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

listForResourceGroup

listForResourceGroupNext

  • listForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsListForResourceGroupNextResponse>
  • listForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • listForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • Gets policy assignments for the resource group.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsListForResourceGroupNextResponse>

    Promise<Models.PolicyAssignmentsListForResourceGroupNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

listForResourceNext

  • listForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsListForResourceNextResponse>
  • listForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • listForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • Gets policy assignments for a resource.

    deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsListForResourceNextResponse>

    Promise<Models.PolicyAssignmentsListForResourceNextResponse>

  • deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

  • deprecated

    This operation is deprecated. Please do not use it any longer.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

listNext

  • listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyAssignmentsListNextResponse>
  • listNext(nextPageLink: string, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<PolicyAssignmentListResult>): void
  • Gets all the policy assignments for a subscription.

    Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • Optional options: msRest.RequestOptionsBase

    Returns Promise<Models.PolicyAssignmentsListNextResponse>

    Promise<Models.PolicyAssignmentsListNextResponse>

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

  • Parameters

    • nextPageLink: string

      The NextLink from the previous successful call to List operation.

    • options: msRest.RequestOptionsBase

      The optional parameters

    • callback: msRest.ServiceCallback<PolicyAssignmentListResult>

      The callback

    Returns void

Generated using TypeDoc