Class: Aws::ACM::Client

Inherits:
Seahorse::Client::Base
  • Object
show all
Includes:
ClientStubs
Defined in:
lib/aws-sdk-acm/client.rb

Overview

An API client for ACM. To construct a client, you need to configure a ‘:region` and `:credentials`.

client = Aws::ACM::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

See #initialize for a full list of supported configuration options.

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • ‘Aws::Credentials` - Used for configuring static, non-refreshing credentials.

    • ‘Aws::SharedCredentials` - Used for loading static credentials from a shared file, such as `~/.aws/config`.

    • ‘Aws::AssumeRoleCredentials` - Used when you need to assume a role.

    • ‘Aws::AssumeRoleWebIdentityCredentials` - Used when you need to assume a role after providing credentials via the web.

    • ‘Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an access token generated from `aws login`.

    • ‘Aws::ProcessCredentials` - Used for loading credentials from a process that outputs to stdout.

    • ‘Aws::InstanceProfileCredentials` - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • ‘Aws::ECSCredentials` - Used for loading credentials from instances running in ECS.

    • ‘Aws::CognitoIdentityCredentials` - Used for loading credentials from the Cognito Identity service.

    When ‘:credentials` are not configured directly, the following locations will be searched for credentials:

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV, ENV, ENV, and ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV to true.

  • :region (required, String)

    The AWS region to connect to. The configured ‘:region` is used to determine the service `:endpoint`. When not passed, a default `:region` is searched for in the following locations:

  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to ‘true`, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to `false`.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in ‘adaptive` retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a `RetryCapacityNotAvailableError` and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When ‘true`, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When ‘true`, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in ‘standard` and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to ‘true’ the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the ‘:endpoint` option directly. This is normally constructed from the `:region` option. Configuring `:endpoint` is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to ‘true`, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the ‘:logger` at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in ‘standard` and `adaptive` retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, ‘default’ is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the ‘legacy` retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the ‘legacy` retry mode.

    @see www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the ‘legacy` retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • ‘legacy` - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • ‘standard` - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • ‘adaptive` - An experimental retry mode that includes all the functionality of `standard` mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    ** Please note ** When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • ‘Aws::StaticTokenProvider` - Used for configuring static, non-refreshing tokens.

    • ‘Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an access token generated from `aws login`.

    When ‘:token_provider` is not configured directly, the `Aws::TokenProviderChain` will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to ‘true`, dualstack enabled endpoints (with `.aws` TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to ‘true`, fips compatible endpoints will be used if available. When a `fips` region is used, the region is normalized and this config is set to `true`.

  • :validate_params (Boolean) — default: true

    When ‘true`, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::ACM::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::ACM::EndpointParameters`.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has “Expect” header set to “100-continue”. Defaults to ‘nil` which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When ‘true`, HTTP debug output will be sent to the `:logger`.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a ‘content-length`).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When ‘true`, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'lib/aws-sdk-acm/client.rb', line 451

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1643
1644
1645
# File 'lib/aws-sdk-acm/client.rb', line 1643

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



1646
1647
1648
# File 'lib/aws-sdk-acm/client.rb', line 1646

def errors_module
  Errors
end

Instance Method Details

#add_tags_to_certificate(params = {}) ⇒ Struct

Adds one or more tags to an ACM certificate. Tags are labels that you can use to identify and organize your Amazon Web Services resources. Each tag consists of a ‘key` and an optional `value`. You specify the certificate on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair.

You can apply a tag to just one certificate if you want to identify a specific characteristic of that certificate, or you can apply the same tag to multiple certificates if you want to filter for a common relationship among those certificates. Similarly, you can apply the same tag to multiple resources if you want to specify a relationship among those resources. For example, you can add the same tag to an ACM certificate and an Elastic Load Balancing load balancer to indicate that they are both used by the same website. For more information, see [Tagging ACM certificates].

To remove one or more tags, use the RemoveTagsFromCertificate action. To view all of the tags that have been applied to the certificate, use the ListTagsForCertificate action.

[1]: docs.aws.amazon.com/acm/latest/userguide/tags.html

Examples:

Request syntax with placeholder values


resp = client.add_tags_to_certificate({
  certificate_arn: "Arn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the ACM certificate to which the tag is to be applied. This must be of the form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

  • :tags (required, Array<Types::Tag>)

    The key-value pair that defines the tag. The tag value is optional.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



515
516
517
518
# File 'lib/aws-sdk-acm/client.rb', line 515

def add_tags_to_certificate(params = {}, options = {})
  req = build_request(:add_tags_to_certificate, params)
  req.send_request(options)
end

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • params ({}) (defaults to: {})


1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
# File 'lib/aws-sdk-acm/client.rb', line 1503

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::ACM')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-acm'
  context[:gem_version] = '1.80.0'
  Seahorse::Client::Request.new(handlers, context)
end

#delete_certificate(params = {}) ⇒ Struct

Deletes a certificate and its associated private key. If this action succeeds, the certificate no longer appears in the list that can be displayed by calling the ListCertificates action or be retrieved by calling the GetCertificate action. The certificate will not be available for use by Amazon Web Services services integrated with ACM.

<note markdown=“1”> You cannot delete an ACM certificate that is being used by another Amazon Web Services service. To delete a certificate that is in use, the certificate association must first be removed.

</note>

Examples:

Request syntax with placeholder values


resp = client.delete_certificate({
  certificate_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the ACM certificate to be deleted. This must be of the form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Returns:

  • (Struct)

    Returns an empty response.

See Also:



557
558
559
560
# File 'lib/aws-sdk-acm/client.rb', line 557

def delete_certificate(params = {}, options = {})
  req = build_request(:delete_certificate, params)
  req.send_request(options)
end

#describe_certificate(params = {}) ⇒ Types::DescribeCertificateResponse

Returns detailed metadata about the specified ACM certificate.

If you have just created a certificate using the ‘RequestCertificate` action, there is a delay of several seconds before you can retrieve information about it.

The following waiters are defined for this operation (see #wait_until for detailed usage):

* certificate_validated

Examples:

Request syntax with placeholder values


resp = client.describe_certificate({
  certificate_arn: "Arn", # required
})

Response structure


resp.certificate.certificate_arn #=> String
resp.certificate.domain_name #=> String
resp.certificate.subject_alternative_names #=> Array
resp.certificate.subject_alternative_names[0] #=> String
resp.certificate.domain_validation_options #=> Array
resp.certificate.domain_validation_options[0].domain_name #=> String
resp.certificate.domain_validation_options[0].validation_emails #=> Array
resp.certificate.domain_validation_options[0].validation_emails[0] #=> String
resp.certificate.domain_validation_options[0].validation_domain #=> String
resp.certificate.domain_validation_options[0].validation_status #=> String, one of "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.certificate.domain_validation_options[0].resource_record.name #=> String
resp.certificate.domain_validation_options[0].resource_record.type #=> String, one of "CNAME"
resp.certificate.domain_validation_options[0].resource_record.value #=> String
resp.certificate.domain_validation_options[0].validation_method #=> String, one of "EMAIL", "DNS"
resp.certificate.serial #=> String
resp.certificate.subject #=> String
resp.certificate.issuer #=> String
resp.certificate.created_at #=> Time
resp.certificate.issued_at #=> Time
resp.certificate.imported_at #=> Time
resp.certificate.status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.certificate.revoked_at #=> Time
resp.certificate.revocation_reason #=> String, one of "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERCEDED", "CESSATION_OF_OPERATION", "CERTIFICATE_HOLD", "REMOVE_FROM_CRL", "PRIVILEGE_WITHDRAWN", "A_A_COMPROMISE"
resp.certificate.not_before #=> Time
resp.certificate.not_after #=> Time
resp.certificate.key_algorithm #=> String, one of "RSA_1024", "RSA_2048", "RSA_3072", "RSA_4096", "EC_prime256v1", "EC_secp384r1", "EC_secp521r1"
resp.certificate.signature_algorithm #=> String
resp.certificate.in_use_by #=> Array
resp.certificate.in_use_by[0] #=> String
resp.certificate.failure_reason #=> String, one of "NO_AVAILABLE_CONTACTS", "ADDITIONAL_VERIFICATION_REQUIRED", "DOMAIN_NOT_ALLOWED", "INVALID_PUBLIC_DOMAIN", "DOMAIN_VALIDATION_DENIED", "CAA_ERROR", "PCA_LIMIT_EXCEEDED", "PCA_INVALID_ARN", "PCA_INVALID_STATE", "PCA_REQUEST_FAILED", "PCA_NAME_CONSTRAINTS_VALIDATION", "PCA_RESOURCE_NOT_FOUND", "PCA_INVALID_ARGS", "PCA_INVALID_DURATION", "PCA_ACCESS_DENIED", "SLR_NOT_FOUND", "OTHER"
resp.certificate.type #=> String, one of "IMPORTED", "AMAZON_ISSUED", "PRIVATE"
resp.certificate.renewal_summary.renewal_status #=> String, one of "PENDING_AUTO_RENEWAL", "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.certificate.renewal_summary.domain_validation_options #=> Array
resp.certificate.renewal_summary.domain_validation_options[0].domain_name #=> String
resp.certificate.renewal_summary.domain_validation_options[0].validation_emails #=> Array
resp.certificate.renewal_summary.domain_validation_options[0].validation_emails[0] #=> String
resp.certificate.renewal_summary.domain_validation_options[0].validation_domain #=> String
resp.certificate.renewal_summary.domain_validation_options[0].validation_status #=> String, one of "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.certificate.renewal_summary.domain_validation_options[0].resource_record.name #=> String
resp.certificate.renewal_summary.domain_validation_options[0].resource_record.type #=> String, one of "CNAME"
resp.certificate.renewal_summary.domain_validation_options[0].resource_record.value #=> String
resp.certificate.renewal_summary.domain_validation_options[0].validation_method #=> String, one of "EMAIL", "DNS"
resp.certificate.renewal_summary.renewal_status_reason #=> String, one of "NO_AVAILABLE_CONTACTS", "ADDITIONAL_VERIFICATION_REQUIRED", "DOMAIN_NOT_ALLOWED", "INVALID_PUBLIC_DOMAIN", "DOMAIN_VALIDATION_DENIED", "CAA_ERROR", "PCA_LIMIT_EXCEEDED", "PCA_INVALID_ARN", "PCA_INVALID_STATE", "PCA_REQUEST_FAILED", "PCA_NAME_CONSTRAINTS_VALIDATION", "PCA_RESOURCE_NOT_FOUND", "PCA_INVALID_ARGS", "PCA_INVALID_DURATION", "PCA_ACCESS_DENIED", "SLR_NOT_FOUND", "OTHER"
resp.certificate.renewal_summary.updated_at #=> Time
resp.certificate.key_usages #=> Array
resp.certificate.key_usages[0].name #=> String, one of "DIGITAL_SIGNATURE", "NON_REPUDIATION", "KEY_ENCIPHERMENT", "DATA_ENCIPHERMENT", "KEY_AGREEMENT", "CERTIFICATE_SIGNING", "CRL_SIGNING", "ENCIPHER_ONLY", "DECIPHER_ONLY", "ANY", "CUSTOM"
resp.certificate.extended_key_usages #=> Array
resp.certificate.extended_key_usages[0].name #=> String, one of "TLS_WEB_SERVER_AUTHENTICATION", "TLS_WEB_CLIENT_AUTHENTICATION", "CODE_SIGNING", "EMAIL_PROTECTION", "TIME_STAMPING", "OCSP_SIGNING", "IPSEC_END_SYSTEM", "IPSEC_TUNNEL", "IPSEC_USER", "ANY", "NONE", "CUSTOM"
resp.certificate.extended_key_usages[0].oid #=> String
resp.certificate.certificate_authority_arn #=> String
resp.certificate.renewal_eligibility #=> String, one of "ELIGIBLE", "INELIGIBLE"
resp.certificate.options.certificate_transparency_logging_preference #=> String, one of "ENABLED", "DISABLED"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    The Amazon Resource Name (ARN) of the ACM certificate. The ARN must have the following form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Returns:

See Also:



655
656
657
658
# File 'lib/aws-sdk-acm/client.rb', line 655

def describe_certificate(params = {}, options = {})
  req = build_request(:describe_certificate, params)
  req.send_request(options)
end

#export_certificate(params = {}) ⇒ Types::ExportCertificateResponse

Exports a private certificate issued by a private certificate authority (CA) for use anywhere. The exported file contains the certificate, the certificate chain, and the encrypted private 2048-bit RSA key associated with the public key that is embedded in the certificate. For security, you must assign a passphrase for the private key when exporting it.

For information about exporting and formatting a certificate using the ACM console or CLI, see [Export a Private Certificate].

[1]: docs.aws.amazon.com/acm/latest/userguide/gs-acm-export-private.html

Examples:

Request syntax with placeholder values


resp = client.export_certificate({
  certificate_arn: "Arn", # required
  passphrase: "data", # required
})

Response structure


resp.certificate #=> String
resp.certificate_chain #=> String
resp.private_key #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:

    ‘arn:aws:acm:region:account:certificate/12345678-1234-1234-1234-123456789012`

  • :passphrase (required, String, StringIO, File)

    Passphrase to associate with the encrypted exported private key.

    <note markdown=“1”> When creating your passphrase, you can use any ASCII character except #, $, or %.

    </note>
    

    If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key. After entering the command, you are prompted for the passphrase.

    ‘openssl rsa -in encrypted_key.pem -out decrypted_key.pem`

Returns:

See Also:



718
719
720
721
# File 'lib/aws-sdk-acm/client.rb', line 718

def export_certificate(params = {}, options = {})
  req = build_request(:export_certificate, params)
  req.send_request(options)
end

#get_account_configuration(params = {}) ⇒ Types::GetAccountConfigurationResponse

Returns the account configuration options associated with an Amazon Web Services account.

Examples:

Response structure


resp.expiry_events.days_before_expiry #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



738
739
740
741
# File 'lib/aws-sdk-acm/client.rb', line 738

def (params = {}, options = {})
  req = build_request(:get_account_configuration, params)
  req.send_request(options)
end

#get_certificate(params = {}) ⇒ Types::GetCertificateResponse

Retrieves a certificate and its certificate chain. The certificate may be either a public or private certificate issued using the ACM ‘RequestCertificate` action, or a certificate imported into ACM using the `ImportCertificate` action. The chain consists of the certificate of the issuing CA and the intermediate certificates of any other subordinate CAs. All of the certificates are base64 encoded. You can use [OpenSSL] to decode the certificates and inspect individual fields.

[1]: wiki.openssl.org/index.php/Command_Line_Utilities

Examples:

Request syntax with placeholder values


resp = client.get_certificate({
  certificate_arn: "Arn", # required
})

Response structure


resp.certificate #=> String
resp.certificate_chain #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

Returns:

See Also:



788
789
790
791
# File 'lib/aws-sdk-acm/client.rb', line 788

def get_certificate(params = {}, options = {})
  req = build_request(:get_certificate, params)
  req.send_request(options)
end

#import_certificate(params = {}) ⇒ Types::ImportCertificateResponse

Imports a certificate into Certificate Manager (ACM) to use with services that are integrated with ACM. Note that [integrated services] allow only certificate types and keys they support to be associated with their resources. Further, their support differs depending on whether the certificate is imported into IAM or into ACM. For more information, see the documentation for each service. For more information about importing certificates into ACM, see [Importing Certificates] in the *Certificate Manager User Guide*.

<note markdown=“1”> ACM does not provide [managed renewal] for certificates that you import.

</note>

Note the following guidelines when importing third party certificates:

  • You must enter the private key that matches the certificate you are importing.

  • The private key must be unencrypted. You cannot import a private key that is protected by a password or a passphrase.

  • The private key must be no larger than 5 KB (5,120 bytes).

  • The certificate, private key, and certificate chain must be PEM-encoded.

  • The current time must be between the ‘Not Before` and `Not After` certificate fields.

  • The ‘Issuer` field must not be empty.

  • The OCSP authority URL, if present, must not exceed 1000 characters.

  • To import a new certificate, omit the ‘CertificateArn` argument. Include this argument only when you want to replace a previously imported certificate.

  • When you import a certificate by using the CLI, you must specify the certificate, the certificate chain, and the private key by their file names preceded by ‘fileb://`. For example, you can specify a certificate saved in the `C:temp` folder as `fileb://C:tempcertificate_to_import.pem`. If you are making an HTTP or HTTPS Query request, include these arguments as BLOBs.

  • When you import a certificate by using an SDK, you must specify the certificate, the certificate chain, and the private key files in the manner required by the programming language you’re using.

  • The cryptographic algorithm of an imported certificate must match the algorithm of the signing CA. For example, if the signing CA key type is RSA, then the certificate key type must also be RSA.

This operation returns the [Amazon Resource Name (ARN)] of the imported certificate.

[1]: docs.aws.amazon.com/acm/latest/userguide/acm-services.html [2]: docs.aws.amazon.com/acm/latest/userguide/import-certificate.html [3]: docs.aws.amazon.com/acm/latest/userguide/acm-renewal.html [4]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Examples:

Request syntax with placeholder values


resp = client.import_certificate({
  certificate_arn: "Arn",
  certificate: "data", # required
  private_key: "data", # required
  certificate_chain: "data",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.certificate_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (String)

    The [Amazon Resource Name (ARN)] of an imported certificate to replace. To import a new certificate, omit this field.

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

  • :certificate (required, String, StringIO, File)

    The certificate to import.

  • :private_key (required, String, StringIO, File)

    The private key that matches the public key in the certificate.

  • :certificate_chain (String, StringIO, File)

    The PEM encoded certificate chain.

  • :tags (Array<Types::Tag>)

    One or more resource tags to associate with the imported certificate.

    Note: You cannot apply tags when reimporting a certificate.

Returns:

See Also:



905
906
907
908
# File 'lib/aws-sdk-acm/client.rb', line 905

def import_certificate(params = {}, options = {})
  req = build_request(:import_certificate, params)
  req.send_request(options)
end

#list_certificates(params = {}) ⇒ Types::ListCertificatesResponse

Retrieves a list of certificate ARNs and domain names. By default, the API returns RSA_2048 certificates. To return all certificates in the account, include the ‘keyType` filter with the values `[RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1]`.

In addition to ‘keyType`, you can also filter by the `CertificateStatuses`, `keyUsage`, and `extendedKeyUsage` attributes on the certificate. For more information, see Filters.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_certificates({
  certificate_statuses: ["PENDING_VALIDATION"], # accepts PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED
  includes: {
    extended_key_usage: ["TLS_WEB_SERVER_AUTHENTICATION"], # accepts TLS_WEB_SERVER_AUTHENTICATION, TLS_WEB_CLIENT_AUTHENTICATION, CODE_SIGNING, EMAIL_PROTECTION, TIME_STAMPING, OCSP_SIGNING, IPSEC_END_SYSTEM, IPSEC_TUNNEL, IPSEC_USER, ANY, NONE, CUSTOM
    key_usage: ["DIGITAL_SIGNATURE"], # accepts DIGITAL_SIGNATURE, NON_REPUDIATION, KEY_ENCIPHERMENT, DATA_ENCIPHERMENT, KEY_AGREEMENT, CERTIFICATE_SIGNING, CRL_SIGNING, ENCIPHER_ONLY, DECIPHER_ONLY, ANY, CUSTOM
    key_types: ["RSA_1024"], # accepts RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1
  },
  next_token: "NextToken",
  max_items: 1,
  sort_by: "CREATED_AT", # accepts CREATED_AT
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
})

Response structure


resp.next_token #=> String
resp.certificate_summary_list #=> Array
resp.certificate_summary_list[0].certificate_arn #=> String
resp.certificate_summary_list[0].domain_name #=> String
resp.certificate_summary_list[0].subject_alternative_name_summaries #=> Array
resp.certificate_summary_list[0].subject_alternative_name_summaries[0] #=> String
resp.certificate_summary_list[0].has_additional_subject_alternative_names #=> Boolean
resp.certificate_summary_list[0].status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.certificate_summary_list[0].type #=> String, one of "IMPORTED", "AMAZON_ISSUED", "PRIVATE"
resp.certificate_summary_list[0].key_algorithm #=> String, one of "RSA_1024", "RSA_2048", "RSA_3072", "RSA_4096", "EC_prime256v1", "EC_secp384r1", "EC_secp521r1"
resp.certificate_summary_list[0].key_usages #=> Array
resp.certificate_summary_list[0].key_usages[0] #=> String, one of "DIGITAL_SIGNATURE", "NON_REPUDIATION", "KEY_ENCIPHERMENT", "DATA_ENCIPHERMENT", "KEY_AGREEMENT", "CERTIFICATE_SIGNING", "CRL_SIGNING", "ENCIPHER_ONLY", "DECIPHER_ONLY", "ANY", "CUSTOM"
resp.certificate_summary_list[0].extended_key_usages #=> Array
resp.certificate_summary_list[0].extended_key_usages[0] #=> String, one of "TLS_WEB_SERVER_AUTHENTICATION", "TLS_WEB_CLIENT_AUTHENTICATION", "CODE_SIGNING", "EMAIL_PROTECTION", "TIME_STAMPING", "OCSP_SIGNING", "IPSEC_END_SYSTEM", "IPSEC_TUNNEL", "IPSEC_USER", "ANY", "NONE", "CUSTOM"
resp.certificate_summary_list[0].in_use #=> Boolean
resp.certificate_summary_list[0].exported #=> Boolean
resp.certificate_summary_list[0].renewal_eligibility #=> String, one of "ELIGIBLE", "INELIGIBLE"
resp.certificate_summary_list[0].not_before #=> Time
resp.certificate_summary_list[0].not_after #=> Time
resp.certificate_summary_list[0].created_at #=> Time
resp.certificate_summary_list[0].issued_at #=> Time
resp.certificate_summary_list[0].imported_at #=> Time
resp.certificate_summary_list[0].revoked_at #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_statuses (Array<String>)

    Filter the certificate list by status value.

  • :includes (Types::Filters)

    Filter the certificate list. For more information, see the Filters structure.

  • :next_token (String)

    Use this parameter only when paginating results and only in a subsequent request after you receive a response with truncated results. Set it to the value of ‘NextToken` from the response you just received.

  • :max_items (Integer)

    Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the ‘NextToken` element is sent in the response. Use this `NextToken` value in a subsequent request to retrieve additional items.

  • :sort_by (String)

    Specifies the field to sort results by. If you specify ‘SortBy`, you must also specify `SortOrder`.

  • :sort_order (String)

    Specifies the order of sorted results. If you specify ‘SortOrder`, you must also specify `SortBy`.

Returns:

See Also:



1000
1001
1002
1003
# File 'lib/aws-sdk-acm/client.rb', line 1000

def list_certificates(params = {}, options = {})
  req = build_request(:list_certificates, params)
  req.send_request(options)
end

#list_tags_for_certificate(params = {}) ⇒ Types::ListTagsForCertificateResponse

Lists the tags that have been applied to the ACM certificate. Use the certificate’s Amazon Resource Name (ARN) to specify the certificate. To add a tag to an ACM certificate, use the AddTagsToCertificate action. To delete a tag, use the RemoveTagsFromCertificate action.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_certificate({
  certificate_arn: "Arn", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the ACM certificate for which you want to list the tags. This must have the following form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Returns:

See Also:



1043
1044
1045
1046
# File 'lib/aws-sdk-acm/client.rb', line 1043

def list_tags_for_certificate(params = {}, options = {})
  req = build_request(:list_tags_for_certificate, params)
  req.send_request(options)
end

#put_account_configuration(params = {}) ⇒ Struct

Adds or modifies account-level configurations in ACM.

The supported configuration option is ‘DaysBeforeExpiry`. This option specifies the number of days prior to certificate expiration when ACM starts generating `EventBridge` events. ACM sends one event per day per certificate until the certificate expires. By default, accounts receive events starting 45 days before certificate expiration.

Examples:

Request syntax with placeholder values


resp = client.({
  expiry_events: {
    days_before_expiry: 1,
  },
  idempotency_token: "IdempotencyToken", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :expiry_events (Types::ExpiryEventsConfiguration)

    Specifies expiration events associated with an account.

  • :idempotency_token (required, String)

    Customer-chosen string used to distinguish between calls to ‘PutAccountConfiguration`. Idempotency tokens time out after one hour. If you call `PutAccountConfiguration` multiple times with the same unexpired idempotency token, ACM treats it as the same request and returns the original result. If you change the idempotency token for each call, ACM treats each call as a new request.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1082
1083
1084
1085
# File 'lib/aws-sdk-acm/client.rb', line 1082

def (params = {}, options = {})
  req = build_request(:put_account_configuration, params)
  req.send_request(options)
end

#remove_tags_from_certificate(params = {}) ⇒ Struct

Remove one or more tags from an ACM certificate. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this function, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value.

To add tags to a certificate, use the AddTagsToCertificate action. To view all of the tags that have been applied to a specific ACM certificate, use the ListTagsForCertificate action.

Examples:

Request syntax with placeholder values


resp = client.remove_tags_from_certificate({
  certificate_arn: "Arn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the ACM Certificate with one or more tags that you want to remove. This must be of the form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

  • :tags (required, Array<Types::Tag>)

    The key-value pair that defines the tag to remove.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1131
1132
1133
1134
# File 'lib/aws-sdk-acm/client.rb', line 1131

def remove_tags_from_certificate(params = {}, options = {})
  req = build_request(:remove_tags_from_certificate, params)
  req.send_request(options)
end

#renew_certificate(params = {}) ⇒ Struct

Renews an eligible ACM certificate. At this time, only exported private certificates can be renewed with this operation. In order to renew your Amazon Web Services Private CA certificates with ACM, you must first [grant the ACM service principal permission to do so]. For more information, see [Testing Managed Renewal] in the ACM User Guide.

[1]: docs.aws.amazon.com/privateca/latest/userguide/PcaPermissions.html [2]: docs.aws.amazon.com/acm/latest/userguide/manual-renewal.html

Examples:

Request syntax with placeholder values


resp = client.renew_certificate({
  certificate_arn: "Arn", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the ACM certificate to be renewed. This must be of the form:

    ‘arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012`

    For more information about ARNs, see [Amazon Resource Names (ARNs)].

    [1]: docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1173
1174
1175
1176
# File 'lib/aws-sdk-acm/client.rb', line 1173

def renew_certificate(params = {}, options = {})
  req = build_request(:renew_certificate, params)
  req.send_request(options)
end

#request_certificate(params = {}) ⇒ Types::RequestCertificateResponse

Requests an ACM certificate for use with other Amazon Web Services services. To request an ACM certificate, you must specify a fully qualified domain name (FQDN) in the ‘DomainName` parameter. You can also specify additional FQDNs in the `SubjectAlternativeNames` parameter.

If you are requesting a private certificate, domain validation is not required. If you are requesting a public certificate, each domain name that you specify must be validated to verify that you own or control the domain. You can use [DNS validation] or [email validation]. We recommend that you use DNS validation. ACM issues public certificates after receiving approval from the domain owner.

<note markdown=“1”> ACM behavior differs from the [RFC 6125] specification of the certificate validation process. ACM first checks for a Subject Alternative Name, and, if it finds one, ignores the common name (CN).

</note>

After successful completion of the ‘RequestCertificate` action, there is a delay of several seconds before you can retrieve information about the new certificate.

[1]: docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html [2]: docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html [3]: datatracker.ietf.org/doc/html/rfc6125#appendix-B.2

Examples:

Request syntax with placeholder values


resp = client.request_certificate({
  domain_name: "DomainNameString", # required
  validation_method: "EMAIL", # accepts EMAIL, DNS
  subject_alternative_names: ["DomainNameString"],
  idempotency_token: "IdempotencyToken",
  domain_validation_options: [
    {
      domain_name: "DomainNameString", # required
      validation_domain: "DomainNameString", # required
    },
  ],
  options: {
    certificate_transparency_logging_preference: "ENABLED", # accepts ENABLED, DISABLED
  },
  certificate_authority_arn: "PcaArn",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  key_algorithm: "RSA_1024", # accepts RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1
})

Response structure


resp.certificate_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain_name (required, String)

    Fully qualified domain name (FQDN), such as www.example.com, that you want to secure with an ACM certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com.

    In compliance with [RFC 5280], the length of the domain name (technically, the Common Name) that you provide cannot exceed 64 octets (characters), including periods. To add a longer domain name, specify it in the Subject Alternative Name field, which supports names up to 253 octets in length.

    [1]: datatracker.ietf.org/doc/html/rfc5280

  • :validation_method (String)

    The method you want to use if you are requesting a public certificate to validate that you own or control domain. You can [validate with DNS] or [validate with email]. We recommend that you use DNS validation.

    [1]: docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-dns.html [2]: docs.aws.amazon.com/acm/latest/userguide/gs-acm-validate-email.html

  • :subject_alternative_names (Array<String>)

    Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. For example, add the name www.example.net to a certificate for which the ‘DomainName` field is www.example.com if users can reach your site by using either name. The maximum number of domain names that you can add to an ACM certificate is 100. However, the initial quota is 10 domain names. If you need more than 10 names, you must request a quota increase. For more information, see [Quotas].

    The maximum length of a SAN DNS name is 253 octets. The name is made up of multiple labels separated by periods. No label can be longer than 63 octets. Consider the following examples:

    • ‘(63 octets).(63 octets).(63 octets).(61 octets)` is legal because the total length is 253 octets (63+1+63+1+63+1+61) and no label exceeds 63 octets.

    • ‘(64 octets).(63 octets).(63 octets).(61 octets)` is not legal because the total length exceeds 253 octets (64+1+63+1+63+1+61) and the first label exceeds 63 octets.

    • ‘(63 octets).(63 octets).(63 octets).(62 octets)` is not legal because the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets.

    [1]: docs.aws.amazon.com/acm/latest/userguide/acm-limits.html

  • :idempotency_token (String)

    Customer chosen string that can be used to distinguish between calls to ‘RequestCertificate`. Idempotency tokens time out after one hour. Therefore, if you call `RequestCertificate` multiple times with the same idempotency token within one hour, ACM recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, ACM recognizes that you are requesting multiple certificates.

  • :domain_validation_options (Array<Types::DomainValidationOption>)

    The domain name that you want ACM to use to send you emails so that you can validate domain ownership.

  • :options (Types::CertificateOptions)

    Currently, you can use this parameter to specify whether to add the certificate to a certificate transparency log. Certificate transparency makes it possible to detect SSL/TLS certificates that have been mistakenly or maliciously issued. Certificates that have not been logged typically produce an error message in a browser. For more information, see [Opting Out of Certificate Transparency Logging].

    [1]: docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency

  • :certificate_authority_arn (String)

    The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate. If you do not provide an ARN and you are trying to request a private certificate, ACM will attempt to issue a public certificate. For more information about private CAs, see the [Amazon Web Services Private Certificate Authority] user guide. The ARN must have the following form:

    ‘arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012`

    [1]: docs.aws.amazon.com/privateca/latest/userguide/PcaWelcome.html

  • :tags (Array<Types::Tag>)

    One or more resource tags to associate with the certificate.

  • :key_algorithm (String)

    Specifies the algorithm of the public and private key pair that your certificate uses to encrypt data. RSA is the default key algorithm for ACM certificates. Elliptic Curve Digital Signature Algorithm (ECDSA) keys are smaller, offering security comparable to RSA keys but with greater computing efficiency. However, ECDSA is not supported by all network clients. Some Amazon Web Services services may require RSA keys, or only support ECDSA keys of a particular size, while others allow the use of either RSA and ECDSA keys to ensure that compatibility is not broken. Check the requirements for the Amazon Web Services service where you plan to deploy your certificate. For more information about selecting an algorithm, see [Key algorithms].

    <note markdown=“1”> Algorithms supported for an ACM certificate request include:

    * `RSA_2048`
    
    • ‘EC_prime256v1`

    • ‘EC_secp384r1`

    Other listed algorithms are for imported certificates only.
    
    </note>
    

    <note markdown=“1”> When you request a private PKI certificate signed by a CA from Amazon Web Services Private CA, the specified signing algorithm family (RSA or ECDSA) must match the algorithm family of the CA’s secret key.

    </note>
    

    Default: RSA_2048

    [1]: docs.aws.amazon.com/acm/latest/userguide/acm-certificate.html#algorithms

Returns:

See Also:



1382
1383
1384
1385
# File 'lib/aws-sdk-acm/client.rb', line 1382

def request_certificate(params = {}, options = {})
  req = build_request(:request_certificate, params)
  req.send_request(options)
end

#resend_validation_email(params = {}) ⇒ Struct

Resends the email that requests domain ownership validation. The domain owner or an authorized representative must approve the ACM certificate before it can be issued. The certificate can be approved by clicking a link in the mail to navigate to the Amazon certificate approval website and then clicking **I Approve**. However, the validation email can be blocked by spam filters. Therefore, if you do not receive the original mail, you can request that the mail be resent within 72 hours of requesting the ACM certificate. If more than 72 hours have elapsed since your original request or since your last attempt to resend validation mail, you must request a new certificate. For more information about setting up your contact email addresses, see [Configure Email for your Domain].

[1]: docs.aws.amazon.com/acm/latest/userguide/setup-email.html

Examples:

Request syntax with placeholder values


resp = client.resend_validation_email({
  certificate_arn: "Arn", # required
  domain: "DomainNameString", # required
  validation_domain: "DomainNameString", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    String that contains the ARN of the requested certificate. The certificate ARN is generated and returned by the RequestCertificate action as soon as the request is made. By default, using this parameter causes email to be sent to all top-level domains you specified in the certificate request. The ARN must be of the form:

    ‘arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012`

  • :domain (required, String)

    The fully qualified domain name (FQDN) of the certificate that needs to be validated.

  • :validation_domain (required, String)

    The base validation domain that will act as the suffix of the email addresses that are used to send the emails. This must be the same as the ‘Domain` value or a superdomain of the `Domain` value. For example, if you requested a certificate for `site.subdomain.example.com` and specify a ValidationDomain of `subdomain.example.com`, ACM sends email to the domain registrant, technical contact, and administrative contact in WHOIS and the following five addresses:

    • admin@subdomain.example.com

    • administrator@subdomain.example.com

    • hostmaster@subdomain.example.com

    • postmaster@subdomain.example.com

    • webmaster@subdomain.example.com

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1451
1452
1453
1454
# File 'lib/aws-sdk-acm/client.rb', line 1451

def resend_validation_email(params = {}, options = {})
  req = build_request(:resend_validation_email, params)
  req.send_request(options)
end

#update_certificate_options(params = {}) ⇒ Struct

Updates a certificate. Currently, you can use this function to specify whether to opt in to or out of recording your certificate in a certificate transparency log. For more information, see [ Opting Out of Certificate Transparency Logging].

[1]: docs.aws.amazon.com/acm/latest/userguide/acm-bestpractices.html#best-practices-transparency

Examples:

Request syntax with placeholder values


resp = client.update_certificate_options({
  certificate_arn: "Arn", # required
  options: { # required
    certificate_transparency_logging_preference: "ENABLED", # accepts ENABLED, DISABLED
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :certificate_arn (required, String)

    ARN of the requested certificate to update. This must be of the form:

    ‘arn:aws:acm:us-east-1:account:certificate/12345678-1234-1234-1234-123456789012 `

  • :options (required, Types::CertificateOptions)

    Use to update the options for your certificate. Currently, you can specify whether to add your certificate to a transparency log. Certificate transparency makes it possible to detect SSL/TLS certificates that have been mistakenly or maliciously issued. Certificates that have not been logged typically produce an error message in a browser.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1494
1495
1496
1497
# File 'lib/aws-sdk-acm/client.rb', line 1494

def update_certificate_options(params = {}, options = {})
  req = build_request(:update_certificate_options, params)
  req.send_request(options)
end

#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean

Polls an API operation until a resource enters a desired state.

## Basic Usage

A waiter will call an API operation until:

  • It is successful

  • It enters a terminal state

  • It makes the maximum number of attempts

In between attempts, the waiter will sleep.

# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)

## Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.

# poll for ~25 seconds
client.wait_until(waiter_name, params, {
  max_attempts: 5,
  delay: 5,
})

## Callbacks

You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(waiter_name, params, {

  # disable max attempts
  max_attempts: nil,

  # poll for 1 hour, instead of a number of attempts
  before_wait: -> (attempts, response) do
    throw :failure if Time.now - started_at > 3600
  end
})

## Handling Errors

When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

## Valid Waiters

The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.

| waiter_name | params | :delay | :max_attempts | | ——————— | —————————– | ——– | ————- | | certificate_validated | #describe_certificate | 60 | 40 |

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {})

    ({})

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns ‘true` if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



1609
1610
1611
1612
1613
# File 'lib/aws-sdk-acm/client.rb', line 1609

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


1617
1618
1619
# File 'lib/aws-sdk-acm/client.rb', line 1617

def waiter_names
  waiters.keys
end