def delete(<EOL>self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Deletes a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         delete.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create(<EOL>self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates a policy assignment.

        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.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment.
        :type policy_assignment_name: str
        :param parameters: Parameters for the policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get(<EOL>self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         get.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_for_resource_group(<EOL>self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_for_resource_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>', max_length=<NUM_LIT>, min_length=<NUM_LIT:1>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>', skip_quote=True)<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets policy assignments for the resource group.

        :param resource_group_name: The name of the resource group that
         contains policy assignments.
        :type resource_group_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_for_resource(<EOL>self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_for_resource.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>', max_length=<NUM_LIT>, min_length=<NUM_LIT:1>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_provider_namespace, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", parent_resource_path, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_type, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets policy assignments for a resource.

        :param resource_group_name: The name of the resource group containing
         the resource. The name is case insensitive.
        :type resource_group_name: str
        :param resource_provider_namespace: The namespace of the resource
         provider.
        :type resource_provider_namespace: str
        :param parent_resource_path: The parent resource path.
        :type parent_resource_path: str
        :param resource_type: The resource type.
        :type resource_type: str
        :param resource_name: The name of the resource with policy
         assignments.
        :type resource_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list(<EOL>self, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the policy assignments for a subscription.

        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete_by_id(<EOL>self, policy_assignment_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Deletes a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         delete. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_by_id(<EOL>self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         create. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param parameters: Parameters for policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get_by_id(<EOL>self, policy_assignment_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to get.
         Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_or_update(<EOL>self, policy_definition_name, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_or_update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates or updates a policy definition.

        :param policy_definition_name: The name of the policy definition to
         create.
        :type policy_definition_name: str
        :param parameters: The policy definition properties.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete(<EOL>self, policy_definition_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Deletes a policy definition.

        :param policy_definition_name: The name of the policy definition to
         delete.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get(<EOL>self, policy_definition_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the policy definition.

        :param policy_definition_name: The name of the policy definition to
         get.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get_built_in(<EOL>self, policy_definition_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_built_in.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the built in policy definition.

        :param policy_definition_name: The name of the built in policy
         definition to get.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_or_update_at_management_group(<EOL>self, policy_definition_name, parameters, management_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_or_update_at_management_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", management_group_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates or updates a policy definition at management group level.

        :param policy_definition_name: The name of the policy definition to
         create.
        :type policy_definition_name: str
        :param parameters: The policy definition properties.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition
        :param management_group_id: The ID of the management group.
        :type management_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete_at_management_group(<EOL>self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_at_management_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", management_group_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Deletes a policy definition at management group level.

        :param policy_definition_name: The name of the policy definition to
         delete.
        :type policy_definition_name: str
        :param management_group_id: The ID of the management group.
        :type management_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get_at_management_group(<EOL>self, policy_definition_name, management_group_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_at_management_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", management_group_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the policy definition at management group level.

        :param policy_definition_name: The name of the policy definition to
         get.
        :type policy_definition_name: str
        :param management_group_id: The ID of the management group.
        :type management_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list(<EOL>self, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the policy definitions for a subscription.

        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyDefinition
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinitionPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_built_in(<EOL>self, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_built_in.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the built in policy definitions.

        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyDefinition
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinitionPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_by_management_group(<EOL>self, management_group_id, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_by_management_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", management_group_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the policy definitions for a subscription at management group
        level.

        :param management_group_id: The ID of the management group.
        :type management_group_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyDefinition
        :rtype:
         ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinitionPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyDefinition]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete(<EOL>self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Deletes a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         delete.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create(<EOL>self, scope, policy_assignment_name, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates a policy assignment.

        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.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment.
        :type policy_assignment_name: str
        :param parameters: Parameters for the policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get(<EOL>self, scope, policy_assignment_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", scope, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         get.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_for_resource_group(<EOL>self, resource_group_name, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_for_resource_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>', max_length=<NUM_LIT>, min_length=<NUM_LIT:1>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>', skip_quote=True)<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets policy assignments for the resource group.

        :param resource_group_name: The name of the resource group that
         contains policy assignments.
        :type resource_group_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_for_resource(<EOL>self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list_for_resource.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>', max_length=<NUM_LIT>, min_length=<NUM_LIT:1>, pattern=r'<STR_LIT>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_provider_namespace, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", parent_resource_path, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_type, '<STR_LIT:str>', skip_quote=True),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets policy assignments for a resource.

        :param resource_group_name: The name of the resource group containing
         the resource. The name is case insensitive.
        :type resource_group_name: str
        :param resource_provider_namespace: The namespace of the resource
         provider.
        :type resource_provider_namespace: str
        :param parent_resource_path: The parent resource path.
        :type parent_resource_path: str
        :param resource_type: The resource type.
        :type resource_type: str
        :param resource_name: The name of the resource with policy
         assignments.
        :type resource_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list(<EOL>self, filter=None, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyAssignmentPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the policy assignments for a subscription.

        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete_by_id(<EOL>self, policy_assignment_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Deletes a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         delete. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_by_id(<EOL>self, policy_assignment_id, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         create. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param parameters: Parameters for policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get_by_id(<EOL>self, policy_assignment_id, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_by_id.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_assignment_id, '<STR_LIT:str>', skip_quote=True)<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to get.
         Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyAssignment or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create_or_update(<EOL>self, policy_definition_name, parameters, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.create_or_update.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates or updates a policy definition.

        :param policy_definition_name: The name of the policy definition to
         create.
        :type policy_definition_name: str
        :param parameters: The policy definition properties.
        :type parameters:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def delete(<EOL>self, policy_definition_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Deletes a policy definition.

        :param policy_definition_name: The name of the policy definition to
         delete.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get(<EOL>self, policy_definition_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", policy_definition_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets the policy definition.

        :param policy_definition_name: The name of the policy definition to
         get.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>if filter is not None:<EOL><INDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", filter, '<STR_LIT:str>')<EOL><DEDENT>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.PolicyDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Gets all the policy definitions for a subscription.

        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyDefinition
        :rtype:
         ~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinitionPaged[~azure.mgmt.resource.policy.v2016_04_01.models.PolicyDefinition]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Deletes a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         delete.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Creates a policy assignment.

        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.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment.
        :type policy_assignment_name: str
        :param parameters: Parameters for the policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets a policy assignment.

        :param scope: The scope of the policy assignment.
        :type scope: str
        :param policy_assignment_name: The name of the policy assignment to
         get.
        :type policy_assignment_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets policy assignments for the resource group.

        :param resource_group_name: The name of the resource group that
         contains policy assignments.
        :type resource_group_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets policy assignments for a  resource.

        :param resource_group_name: The name of the resource group containing
         the resource. The name is case insensitive.
        :type resource_group_name: str
        :param resource_provider_namespace: The namespace of the resource
         provider.
        :type resource_provider_namespace: str
        :param parent_resource_path: The parent resource path.
        :type parent_resource_path: str
        :param resource_type: The resource type.
        :type resource_type: str
        :param resource_name: The name of the resource with policy
         assignments.
        :type resource_name: str
        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets all the policy assignments for a subscription.

        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyAssignment
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Deletes a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         delete. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Creates a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to
         create. Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param parameters: Parameters for policy assignment.
        :type parameters:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets a policy assignment by ID.

        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.

        :param policy_assignment_id: The ID of the policy assignment to get.
         Use the format
         '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
        :type policy_assignment_id: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyAssignment or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyAssignment
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Creates or updates a policy definition.

        :param policy_definition_name: The name of the policy definition to
         create.
        :type policy_definition_name: str
        :param parameters: The policy definition properties.
        :type parameters:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets the policy definition.

        :param policy_definition_name: The name of the policy definition to
         get.
        :type policy_definition_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: PolicyDefinition or ClientRawResponse if raw=true
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


Gets all the policy definitions for a subscription.

        :param filter: The filter to apply on the operation.
        :type filter: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of PolicyDefinition
        :rtype:
         ~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinitionPaged[~azure.mgmt.resource.policy.v2015_10_01_preview.models.PolicyDefinition]
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`