azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/operations/dps_certificate_operations.py
def delete(
            self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config):
        """Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

        :param resource_group_name: Resource group identifier.
        :type resource_group_name: str
        :param if_match: ETag of the certificate
        :type if_match: str
        :param provisioning_service_name: The name of the provisioning
         service.
        :type provisioning_service_name: str
        :param certificate_name: This is a mandatory field, and is the logical
         name of the certificate that the provisioning service will access by.
        :type certificate_name: str
        :param certificatename: This is optional, and it is the Common Name of
         the certificate.
        :type certificatename: str
        :param certificateraw_bytes: Raw data within the certificate.
        :type certificateraw_bytes: bytearray
        :param certificateis_verified: Indicates if certificate has been
         verified by owner of the private key.
        :type certificateis_verified: bool
        :param certificatepurpose: A description that mentions the purpose of
         the certificate. Possible values include: 'clientAuthentication',
         'serverAuthentication'
        :type certificatepurpose: str or
         ~azure.mgmt.iothubprovisioningservices.models.CertificatePurpose
        :param certificatecreated: Time the certificate is created.
        :type certificatecreated: datetime
        :param certificatelast_updated: Time the certificate is last updated.
        :type certificatelast_updated: datetime
        :param certificatehas_private_key: Indicates if the certificate
         contains a private key.
        :type certificatehas_private_key: bool
        :param certificatenonce: Random number generated to indicate Proof of
         Possession.
        :type certificatenonce: 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:`ErrorDetailsException<azure.mgmt.iothubprovisioningservices.models.ErrorDetailsException>`
        """
        # Construct URL
        url = self.delete.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
            'provisioningServiceName': self._serialize.url("provisioning_service_name", provisioning_service_name, 'str'),
            'certificateName': self._serialize.url("certificate_name", certificate_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if certificatename is not None:
            query_parameters['certificate.name'] = self._serialize.query("certificatename", certificatename, 'str')
        if certificateraw_bytes is not None:
            query_parameters['certificate.rawBytes'] = self._serialize.query("certificateraw_bytes", certificateraw_bytes, 'bytearray')
        if certificateis_verified is not None:
            query_parameters['certificate.isVerified'] = self._serialize.query("certificateis_verified", certificateis_verified, 'bool')
        if certificatepurpose is not None:
            query_parameters['certificate.purpose'] = self._serialize.query("certificatepurpose", certificatepurpose, 'str')
        if certificatecreated is not None:
            query_parameters['certificate.created'] = self._serialize.query("certificatecreated", certificatecreated, 'iso-8601')
        if certificatelast_updated is not None:
            query_parameters['certificate.lastUpdated'] = self._serialize.query("certificatelast_updated", certificatelast_updated, 'iso-8601')
        if certificatehas_private_key is not None:
            query_parameters['certificate.hasPrivateKey'] = self._serialize.query("certificatehas_private_key", certificatehas_private_key, 'bool')
        if certificatenonce is not None:
            query_parameters['certificate.nonce'] = self._serialize.query("certificatenonce", certificatenonce, 'str')
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        request = self._client.delete(url, query_parameters)
        response = self._client.send(request, header_parameters, stream=False, **operation_config)

        if response.status_code not in [200, 204]:
            raise models.ErrorDetailsException(self._deserialize, response)

        if raw:
            client_raw_response = ClientRawResponse(None, response)
            return client_raw_response
def delete(
            self, resource_group_name, if_match, provisioning_service_name, certificate_name, certificatename=None, certificateraw_bytes=None, certificateis_verified=None, certificatepurpose=None, certificatecreated=None, certificatelast_updated=None, certificatehas_private_key=None, certificatenonce=None, custom_headers=None, raw=False, **operation_config):
        # Construct URL
        url = self.delete.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
            'provisioningServiceName': self._serialize.url("provisioning_service_name", provisioning_service_name, 'str'),
            'certificateName': self._serialize.url("certificate_name", certificate_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        if certificatename is not None:
            query_parameters['certificate.name'] = self._serialize.query("certificatename", certificatename, 'str')
        if certificateraw_bytes is not None:
            query_parameters['certificate.rawBytes'] = self._serialize.query("certificateraw_bytes", certificateraw_bytes, 'bytearray')
        if certificateis_verified is not None:
            query_parameters['certificate.isVerified'] = self._serialize.query("certificateis_verified", certificateis_verified, 'bool')
        if certificatepurpose is not None:
            query_parameters['certificate.purpose'] = self._serialize.query("certificatepurpose", certificatepurpose, 'str')
        if certificatecreated is not None:
            query_parameters['certificate.created'] = self._serialize.query("certificatecreated", certificatecreated, 'iso-8601')
        if certificatelast_updated is not None:
            query_parameters['certificate.lastUpdated'] = self._serialize.query("certificatelast_updated", certificatelast_updated, 'iso-8601')
        if certificatehas_private_key is not None:
            query_parameters['certificate.hasPrivateKey'] = self._serialize.query("certificatehas_private_key", certificatehas_private_key, 'bool')
        if certificatenonce is not None:
            query_parameters['certificate.nonce'] = self._serialize.query("certificatenonce", certificatenonce, 'str')
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Content-Type'] = 'application/json; charset=utf-8'
        if self.config.generate_client_request_id:
            header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
        if custom_headers:
            header_parameters.update(custom_headers)
        header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        if self.config.accept_language is not None:
            header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

        # Construct and send request
        request = self._client.delete(url, query_parameters)
        response = self._client.send(request, header_parameters, stream=False, **operation_config)

        if response.status_code not in [200, 204]:
            raise models.ErrorDetailsException(self._deserialize, response)

        if raw:
            client_raw_response = ClientRawResponse(None, response)
            return client_raw_response
def delete ( self , resource_group_name , if_match , provisioning_service_name , certificate_name , certificatename = None , certificateraw_bytes = None , certificateis_verified = None , certificatepurpose = None , certificatecreated = None , certificatelast_updated = None , certificatehas_private_key = None , certificatenonce = None , custom_headers = None , raw = False , * * operation_config ) : # Construct URL url = self . delete . metadata [ 'url' ] path_format_arguments = { 'subscriptionId' : self . _serialize . url ( "self.config.subscription_id" , self . config . subscription_id , 'str' ) , 'resourceGroupName' : self . _serialize . url ( "resource_group_name" , resource_group_name , 'str' ) , 'provisioningServiceName' : self . _serialize . url ( "provisioning_service_name" , provisioning_service_name , 'str' ) , 'certificateName' : self . _serialize . url ( "certificate_name" , certificate_name , 'str' ) } url = self . _client . format_url ( url , * * path_format_arguments ) # Construct parameters query_parameters = { } if certificatename is not None : query_parameters [ 'certificate.name' ] = self . _serialize . query ( "certificatename" , certificatename , 'str' ) if certificateraw_bytes is not None : query_parameters [ 'certificate.rawBytes' ] = self . _serialize . query ( "certificateraw_bytes" , certificateraw_bytes , 'bytearray' ) if certificateis_verified is not None : query_parameters [ 'certificate.isVerified' ] = self . _serialize . query ( "certificateis_verified" , certificateis_verified , 'bool' ) if certificatepurpose is not None : query_parameters [ 'certificate.purpose' ] = self . _serialize . query ( "certificatepurpose" , certificatepurpose , 'str' ) if certificatecreated is not None : query_parameters [ 'certificate.created' ] = self . _serialize . query ( "certificatecreated" , certificatecreated , 'iso-8601' ) if certificatelast_updated is not None : query_parameters [ 'certificate.lastUpdated' ] = self . _serialize . query ( "certificatelast_updated" , certificatelast_updated , 'iso-8601' ) if certificatehas_private_key is not None : query_parameters [ 'certificate.hasPrivateKey' ] = self . _serialize . query ( "certificatehas_private_key" , certificatehas_private_key , 'bool' ) if certificatenonce is not None : query_parameters [ 'certificate.nonce' ] = self . _serialize . query ( "certificatenonce" , certificatenonce , 'str' ) query_parameters [ 'api-version' ] = self . _serialize . query ( "self.api_version" , self . api_version , 'str' ) # Construct headers header_parameters = { } header_parameters [ 'Content-Type' ] = 'application/json; charset=utf-8' if self . config . generate_client_request_id : header_parameters [ 'x-ms-client-request-id' ] = str ( uuid . uuid1 ( ) ) if custom_headers : header_parameters . update ( custom_headers ) header_parameters [ 'If-Match' ] = self . _serialize . header ( "if_match" , if_match , 'str' ) if self . config . accept_language is not None : header_parameters [ 'accept-language' ] = self . _serialize . header ( "self.config.accept_language" , self . config . accept_language , 'str' ) # Construct and send request request = self . _client . delete ( url , query_parameters ) response = self . _client . send ( request , header_parameters , stream = False , * * operation_config ) if response . status_code not in [ 200 , 204 ] : raise models . ErrorDetailsException ( self . _deserialize , response ) if raw : client_raw_response = ClientRawResponse ( None , response ) return client_raw_response
Delete the Provisioning Service Certificate.

        Deletes the specified certificate assosciated with the Provisioning
        Service.

        :param resource_group_name: Resource group identifier.
        :type resource_group_name: str
        :param if_match: ETag of the certificate
        :type if_match: str
        :param provisioning_service_name: The name of the provisioning
         service.
        :type provisioning_service_name: str
        :param certificate_name: This is a mandatory field, and is the logical
         name of the certificate that the provisioning service will access by.
        :type certificate_name: str
        :param certificatename: This is optional, and it is the Common Name of
         the certificate.
        :type certificatename: str
        :param certificateraw_bytes: Raw data within the certificate.
        :type certificateraw_bytes: bytearray
        :param certificateis_verified: Indicates if certificate has been
         verified by owner of the private key.
        :type certificateis_verified: bool
        :param certificatepurpose: A description that mentions the purpose of
         the certificate. Possible values include: 'clientAuthentication',
         'serverAuthentication'
        :type certificatepurpose: str or
         ~azure.mgmt.iothubprovisioningservices.models.CertificatePurpose
        :param certificatecreated: Time the certificate is created.
        :type certificatecreated: datetime
        :param certificatelast_updated: Time the certificate is last updated.
        :type certificatelast_updated: datetime
        :param certificatehas_private_key: Indicates if the certificate
         contains a private key.
        :type certificatehas_private_key: bool
        :param certificatenonce: Random number generated to indicate Proof of
         Possession.
        :type certificatenonce: 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:`ErrorDetailsException<azure.mgmt.iothubprovisioningservices.models.ErrorDetailsException>`
Delete the Provisioning Service Certificate .