azure-keyvault/azure/keyvault/v7_0/key_vault_client.py
def get_certificates(
            self, vault_base_url, maxresults=None, include_pending=None, custom_headers=None, raw=False, **operation_config):
        """List certificates in a specified key vault.

        The GetCertificates operation returns the set of certificates resources
        in the specified key vault. This operation requires the
        certificates/list permission.

        :param vault_base_url: The vault name, for example
         https://myvault.vault.azure.net.
        :type vault_base_url: str
        :param maxresults: Maximum number of results to return in a page. If
         not specified the service will return up to 25 results.
        :type maxresults: int
        :param include_pending: Specifies whether to include certificates
         which are not completely provisioned.
        :type include_pending: bool
        :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 CertificateItem
        :rtype:
         ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem]
        :raises:
         :class:`KeyVaultErrorException<azure.keyvault.v7_0.models.KeyVaultErrorException>`
        """
        def internal_paging(next_link=None, raw=False):

            if not next_link:
                # Construct URL
                url = self.get_certificates.metadata['url']
                path_format_arguments = {
                    'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True)
                }
                url = self._client.format_url(url, **path_format_arguments)

                # Construct parameters
                query_parameters = {}
                if maxresults is not None:
                    query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1)
                if include_pending is not None:
                    query_parameters['includePending'] = self._serialize.query("include_pending", include_pending, 'bool')
                query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

            else:
                url = next_link
                query_parameters = {}

            # 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)
            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.get(url, query_parameters)
            response = self._client.send(
                request, header_parameters, stream=False, **operation_config)

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

            return response

        # Deserialize response
        deserialized = models.CertificateItemPaged(internal_paging, self._deserialize.dependencies)

        if raw:
            header_dict = {}
            client_raw_response = models.CertificateItemPaged(internal_paging, self._deserialize.dependencies, header_dict)
            return client_raw_response

        return deserialized
def get_certificates(
            self, vault_base_url, maxresults=None, include_pending=None, custom_headers=None, raw=False, **operation_config):
        def internal_paging(next_link=None, raw=False):

            if not next_link:
                # Construct URL
                url = self.get_certificates.metadata['url']
                path_format_arguments = {
                    'vaultBaseUrl': self._serialize.url("vault_base_url", vault_base_url, 'str', skip_quote=True)
                }
                url = self._client.format_url(url, **path_format_arguments)

                # Construct parameters
                query_parameters = {}
                if maxresults is not None:
                    query_parameters['maxresults'] = self._serialize.query("maxresults", maxresults, 'int', maximum=25, minimum=1)
                if include_pending is not None:
                    query_parameters['includePending'] = self._serialize.query("include_pending", include_pending, 'bool')
                query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

            else:
                url = next_link
                query_parameters = {}

            # 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)
            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.get(url, query_parameters)
            response = self._client.send(
                request, header_parameters, stream=False, **operation_config)

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

            return response

        # Deserialize response
        deserialized = models.CertificateItemPaged(internal_paging, self._deserialize.dependencies)

        if raw:
            header_dict = {}
            client_raw_response = models.CertificateItemPaged(internal_paging, self._deserialize.dependencies, header_dict)
            return client_raw_response

        return deserialized
def get_certificates ( self , vault_base_url , maxresults = None , include_pending = None , custom_headers = None , raw = False , * * operation_config ) : def internal_paging ( next_link = None , raw = False ) : if not next_link : # Construct URL url = self . get_certificates . metadata [ 'url' ] path_format_arguments = { 'vaultBaseUrl' : self . _serialize . url ( "vault_base_url" , vault_base_url , 'str' , skip_quote = True ) } url = self . _client . format_url ( url , * * path_format_arguments ) # Construct parameters query_parameters = { } if maxresults is not None : query_parameters [ 'maxresults' ] = self . _serialize . query ( "maxresults" , maxresults , 'int' , maximum = 25 , minimum = 1 ) if include_pending is not None : query_parameters [ 'includePending' ] = self . _serialize . query ( "include_pending" , include_pending , 'bool' ) query_parameters [ 'api-version' ] = self . _serialize . query ( "self.api_version" , self . api_version , 'str' ) else : url = next_link query_parameters = { } # 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 ) 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 . get ( url , query_parameters ) response = self . _client . send ( request , header_parameters , stream = False , * * operation_config ) if response . status_code not in [ 200 ] : raise models . KeyVaultErrorException ( self . _deserialize , response ) return response # Deserialize response deserialized = models . CertificateItemPaged ( internal_paging , self . _deserialize . dependencies ) if raw : header_dict = { } client_raw_response = models . CertificateItemPaged ( internal_paging , self . _deserialize . dependencies , header_dict ) return client_raw_response return deserialized
List certificates in a specified key vault.

        The GetCertificates operation returns the set of certificates resources
        in the specified key vault. This operation requires the
        certificates/list permission.

        :param vault_base_url: The vault name, for example
         https://myvault.vault.azure.net.
        :type vault_base_url: str
        :param maxresults: Maximum number of results to return in a page. If
         not specified the service will return up to 25 results.
        :type maxresults: int
        :param include_pending: Specifies whether to include certificates
         which are not completely provisioned.
        :type include_pending: bool
        :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 CertificateItem
        :rtype:
         ~azure.keyvault.v7_0.models.CertificateItemPaged[~azure.keyvault.v7_0.models.CertificateItem]
        :raises:
         :class:`KeyVaultErrorException<azure.keyvault.v7_0.models.KeyVaultErrorException>`
List certificates in a specified key vault .