Interface Certificates


  • public interface Certificates
    Resource collection API of Certificates.
    • Method Detail

      • listByIotHub

        CertificateListDescription listByIotHub​(String resourceGroupName,
                                                String resourceName)
        Returns the list of certificates.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        Returns:
        the JSON-serialized array of Certificate objects.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • listByIotHubWithResponse

        com.azure.core.http.rest.Response<CertificateListDescription> listByIotHubWithResponse​(String resourceGroupName,
                                                                                               String resourceName,
                                                                                               com.azure.core.util.Context context)
        Returns the list of certificates.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        context - The context to associate with this operation.
        Returns:
        the JSON-serialized array of Certificate objects along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • get

        CertificateDescription get​(String resourceGroupName,
                                   String resourceName,
                                   String certificateName)
        Returns the certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        Returns:
        the X509 Certificate.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getWithResponse

        com.azure.core.http.rest.Response<CertificateDescription> getWithResponse​(String resourceGroupName,
                                                                                  String resourceName,
                                                                                  String certificateName,
                                                                                  com.azure.core.util.Context context)
        Returns the certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        context - The context to associate with this operation.
        Returns:
        the X509 Certificate along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • delete

        void delete​(String resourceGroupName,
                    String resourceName,
                    String certificateName,
                    String ifMatch)
        Deletes an existing X509 certificate or does nothing if it does not exist.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteWithResponse

        com.azure.core.http.rest.Response<Void> deleteWithResponse​(String resourceGroupName,
                                                                   String resourceName,
                                                                   String certificateName,
                                                                   String ifMatch,
                                                                   com.azure.core.util.Context context)
        Deletes an existing X509 certificate or does nothing if it does not exist.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        context - The context to associate with this operation.
        Returns:
        the Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • generateVerificationCode

        CertificateWithNonceDescription generateVerificationCode​(String resourceGroupName,
                                                                 String resourceName,
                                                                 String certificateName,
                                                                 String ifMatch)
        Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        Returns:
        the X509 Certificate.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • generateVerificationCodeWithResponse

        com.azure.core.http.rest.Response<CertificateWithNonceDescription> generateVerificationCodeWithResponse​(String resourceGroupName,
                                                                                                                String resourceName,
                                                                                                                String certificateName,
                                                                                                                String ifMatch,
                                                                                                                com.azure.core.util.Context context)
        Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        context - The context to associate with this operation.
        Returns:
        the X509 Certificate along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • verify

        CertificateDescription verify​(String resourceGroupName,
                                      String resourceName,
                                      String certificateName,
                                      String ifMatch,
                                      CertificateVerificationDescription certificateVerificationBody)
        Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        certificateVerificationBody - The name of the certificate.
        Returns:
        the X509 Certificate.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • verifyWithResponse

        com.azure.core.http.rest.Response<CertificateDescription> verifyWithResponse​(String resourceGroupName,
                                                                                     String resourceName,
                                                                                     String certificateName,
                                                                                     String ifMatch,
                                                                                     CertificateVerificationDescription certificateVerificationBody,
                                                                                     com.azure.core.util.Context context)
        Verifies the certificate's private key possession by providing the leaf cert issued by the verifying pre uploaded certificate.
        Parameters:
        resourceGroupName - The name of the resource group that contains the IoT hub.
        resourceName - The name of the IoT hub.
        certificateName - The name of the certificate.
        ifMatch - ETag of the Certificate.
        certificateVerificationBody - The name of the certificate.
        context - The context to associate with this operation.
        Returns:
        the X509 Certificate along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getByIdWithResponse

        com.azure.core.http.rest.Response<CertificateDescription> getByIdWithResponse​(String id,
                                                                                      com.azure.core.util.Context context)
        Returns the certificate.
        Parameters:
        id - the resource ID.
        context - The context to associate with this operation.
        Returns:
        the X509 Certificate along with Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteById

        void deleteById​(String id)
        Deletes an existing X509 certificate or does nothing if it does not exist.
        Parameters:
        id - the resource ID.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • deleteByIdWithResponse

        com.azure.core.http.rest.Response<Void> deleteByIdWithResponse​(String id,
                                                                       String ifMatch,
                                                                       com.azure.core.util.Context context)
        Deletes an existing X509 certificate or does nothing if it does not exist.
        Parameters:
        id - the resource ID.
        ifMatch - ETag of the Certificate.
        context - The context to associate with this operation.
        Returns:
        the Response.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        ErrorDetailsException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.