Transfer / Client / import_certificate



Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner profiles.

See also: AWS API Documentation

Request Syntax

response = client.import_certificate(
    ActiveDate=datetime(2015, 1, 1),
    InactiveDate=datetime(2015, 1, 1),
            'Key': 'string',
            'Value': 'string'
  • Usage (string) –


    Specifies whether this certificate is used for signing or encryption.

  • Certificate (string) –


    • For the CLI, provide a file path for a certificate in URI format. For example, --certificate file://encryption-cert.pem. Alternatively, you can provide the raw content.

    • For the SDK, specify the raw content of a certificate file. For example, --certificate "`cat encryption-cert.pem`".

  • CertificateChain (string) – An optional list of certificates that make up the chain for the certificate that’s being imported.

  • PrivateKey (string) –

    • For the CLI, provide a file path for a private key in URI format.For example, --private-key file://encryption-key.pem. Alternatively, you can provide the raw content of the private key file.

    • For the SDK, specify the raw content of a private key file. For example, --private-key "`cat encryption-key.pem`"

  • ActiveDate (datetime) – An optional date that specifies when the certificate becomes active.

  • InactiveDate (datetime) – An optional date that specifies when the certificate becomes inactive.

  • Description (string) – A short description that helps identify the certificate.

  • Tags (list) –

    Key-value pairs that can be used to group and search for certificates.

    • (dict) –

      Creates a key-value pair for a specific resource. Tags are metadata that you can use to search for and group a resource for various purposes. You can apply tags to servers, users, and roles. A tag key can take more than one value. For example, to group servers for accounting purposes, you might create a tag called Group and assign the values Research and Accounting to that group.

      • Key (string) – [REQUIRED]

        The name assigned to the tag that you create.

      • Value (string) – [REQUIRED]

        Contains one or more values that you assigned to the key name you create.

Return type:



Response Syntax

    'CertificateId': 'string'

Response Structure

  • (dict) –

    • CertificateId (string) –

      An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.


  • Transfer.Client.exceptions.ServiceUnavailableException

  • Transfer.Client.exceptions.InternalServiceError

  • Transfer.Client.exceptions.InvalidRequestException

  • Transfer.Client.exceptions.ResourceNotFoundException