Class: Aws::ACM::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-acm/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.

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

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

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 used for authentication. This can be any class that includes and implements Aws::CredentialProvider, or 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[:credentials]

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

    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID'].

    • ~/.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['AWS_EC2_METADATA_DISABLED'] 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:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :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.

  • :auth_scheme_preference (Array<String>) —

    A list of preferred authentication schemes to use when making a request. Supported values are: sigv4, sigv4a, httpBearerAuth, and noAuth. When set using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or in shared config as auth_scheme_preference, the value should be a comma-separated list.

  • :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. Takes effect only when disable_clock_skew_correction is not set.

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

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

  • :disable_clock_skew_correction (Boolean) —

    Used only in standard and adaptive retry modes. When true, the SDK does not apply a clock skew correction, does not update its stored skew from responses, and does not retry clock skew errors. Clock skew correction is enabled by default.

  • :disable_host_prefix_injection (Boolean) — default: false —

    When true, the SDK will not prepend the modeled host prefix to the endpoint.

  • :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. Defaults to 3, except for DynamoDB and DynamoDB Streams, which default to 4.

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

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

  • :request_checksum_calculation (String) — default: "when_supported" —

    Determines when a checksum will be calculated for request payloads. Values are:

    • when_supported - (default) When set, a checksum will be calculated for all request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true and/or a requestAlgorithmMember is modeled.
    • when_required - When set, a checksum will only be calculated for request payloads of operations modeled with the httpChecksum trait where requestChecksumRequired is true or where a requestAlgorithmMember is modeled and supplied.
  • :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.

  • :response_checksum_validation (String) — default: "when_supported" —

    Determines when checksum validation will be performed on response payloads. Values are:

    • when_supported - (default) When set, checksum validation is performed on all response payloads of operations modeled with the httpChecksum trait where responseAlgorithms is modeled, except when no modeled checksum algorithms are supported.
    • when_required - When set, checksum validation is not performed on response payloads of operations unless the checksum algorithm is supported and the requestValidationModeMember member is set to ENABLED.
  • :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 https://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: "standard" —

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior.

    • 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. This is the default value if no retry mode is provided.

    • adaptive - A retry mode that includes all the functionality of standard mode along with automatic client side throttling.

  • :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:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :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) —

    Your Bearer token used for authentication. This can be any class that includes and implements Aws::TokenProvider, or 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.

  • :service_type (string) —

    The service type: ACM, ACM-ACME or ACM-INVENTORY. Injected via @staticContextParams.

  • :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 'http://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.



489
490
491
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 489

def initialize(*args)
  super
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.

This action applies only to the certificate resource type. For all other ACM resource types, use TagResource instead.

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.

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).

  • :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:



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

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

#create_acme_domain_validation(params = {}) ⇒ Types::CreateAcmeDomainValidationResponse

Creates a domain validation for an ACME endpoint. Domain validations authorize the endpoint to issue certificates for specified domain names. You configure prevalidation to prove domain ownership.

Examples:

Request syntax with placeholder values


resp = client.create_acme_domain_validation({
  idempotency_token: "String",
  acme_endpoint_arn: "AcmeEndpointArn", # required
  domain_name: "DomainName", # required
  prevalidation_options: { # required
    dns_prevalidation: {
      domain_scope: {
        exact_domain: "ENABLED", # accepts ENABLED, DISABLED
        subdomains: "ENABLED", # accepts ENABLED, DISABLED
        wildcards: "ENABLED", # accepts ENABLED, DISABLED
      },
      hosted_zone_id: "HostedZoneId",
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.acme_domain_validation_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :idempotency_token (String) —

    A unique, case-sensitive identifier to ensure idempotency of the request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

  • :domain_name (required, String) —

    The domain name to validate.

  • :prevalidation_options (required, Types::PrevalidationOptions) —

    The prevalidation options for the domain.

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

    One or more tags to associate with the domain validation.

Returns:

See Also:



622
623
624
625
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 622

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

#create_acme_endpoint(params = {}) ⇒ Types::CreateAcmeEndpointResponse

Creates an ACME endpoint, which is a managed ACME server with a unique endpoint URL. After creation, ACME clients can use the endpoint URL to automate certificate issuance using the ACME protocol.

Examples:

Request syntax with placeholder values


resp = client.create_acme_endpoint({
  idempotency_token: "String",
  authorization_behavior: "PRE_APPROVED", # required, accepts PRE_APPROVED
  contact: "REQUIRED", # accepts REQUIRED, NOT_REQUIRED
  certificate_authority: { # required
    public_certificate_authority: {
      allowed_key_algorithms: ["RSA_2048"], # accepts RSA_2048, EC_prime256v1, EC_secp384r1
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
  certificate_tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.acme_endpoint_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :idempotency_token (String) —

    A unique, case-sensitive identifier to ensure idempotency of the request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :authorization_behavior (required, String) —

    The authorization behavior for the ACME endpoint.

  • :contact (String) —

    Specifies whether ACME clients must provide contact information during account registration.

  • :certificate_authority (required, Types::CertificateAuthority) —

    The type of certificate authority to use for issuing certificates through this ACME endpoint.

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

    One or more tags to associate with the ACME endpoint.

  • :certificate_tags (Array<Types::Tag>) —

    Tags to apply to certificates issued through this ACME endpoint.

Returns:

See Also:



692
693
694
695
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 692

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

#create_acme_external_account_binding(params = {}) ⇒ Types::CreateAcmeExternalAccountBindingResponse

Creates an external account binding (EAB) for an ACME endpoint. An EAB provides credentials that authorize an ACME client to register an account with the endpoint. Each EAB is associated with an IAM role that controls what certificate operations the ACME client can perform.

Examples:

Request syntax with placeholder values


resp = client.({
  idempotency_token: "String",
  acme_endpoint_arn: "AcmeEndpointArn", # required
  role_arn: "RoleArn", # required
  expiration: {
    value: 1, # required
    type: "MINUTES", # required, accepts MINUTES, HOURS, DAYS
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue",
    },
  ],
})

Response structure


resp.. #=> String
resp..acme_endpoint_arn #=> String
resp..role_arn #=> String
resp..expires_at #=> Time
resp..revoked_at #=> Time
resp..last_used_at #=> Time
resp..created_at #=> Time
resp..updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :idempotency_token (String) —

    A unique, case-sensitive identifier to ensure idempotency of the request.

    A suitable default value is auto-generated. You should normally not need to pass this option.**

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

  • :role_arn (required, String) —

    The Amazon Resource Name (ARN) of the IAM role to associate with the external account binding.

  • :expiration (Types::Expiration) —

    The expiration configuration for the external account binding.

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

    One or more tags to associate with the external account binding.

Returns:

See Also:



759
760
761
762
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 759

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

#delete_acme_domain_validation(params = {}) ⇒ Struct

Deletes a domain validation. After deletion, the ACME endpoint can no longer issue certificates for the associated domain.

Examples:

Request syntax with placeholder values


resp = client.delete_acme_domain_validation({
  acme_domain_validation_arn: "AcmeDomainValidationArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_domain_validation_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME domain validation to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



783
784
785
786
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 783

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

#delete_acme_endpoint(params = {}) ⇒ Struct

Deletes an ACME endpoint. After deletion, the endpoint URL is no longer accessible and ACME clients cannot issue certificates through it. Any existing external account bindings and domain validations associated with the endpoint are also deleted.

Examples:

Request syntax with placeholder values


resp = client.delete_acme_endpoint({
  acme_endpoint_arn: "AcmeEndpointArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



808
809
810
811
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 808

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

#delete_acme_external_account_binding(params = {}) ⇒ Struct

Deletes an external account binding. Previously fetched credentials for this binding will no longer be usable for account registration. A deleted binding cannot be recovered.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_external_account_binding_arn: "AcmeExternalAccountBindingArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_external_account_binding_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME external account binding to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



833
834
835
836
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 833

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

#delete_certificate(params = {}) ⇒ Struct

Deletes a certificate and its associated private key. If this action succeeds, the certificate is not available for use by Amazon Web Services services integrated with ACM. Deleting a certificate is eventually consistent. The may be a short delay before 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.

You cannot delete an ACM certificate that is being used by another Amazon Web Services service. To delete a certificate that is in use, you must first remove the certificate association using the console or the CLI for the associated service.

Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting Your Private CA in the Private Certificate Authority User Guide.

You cannot delete a certificate with a CertificateKeyPairOrigin of ACME. ACM automatically deletes these certificates 1 year after they expire.

Deleting a certificate issued by a private certificate authority (CA) has no effect on the CA. You will continue to be charged for the CA until it is deleted. For more information, see Deleting your private CA in the Amazon Web Services Private Certificate Authority User Guide.

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).

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



897
898
899
900
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 897

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

#delete_member_certificate(params = {}) ⇒ Struct

Deletes an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization. ACM applies the rules of its DeleteCertificate operation, including when it cannot delete a certificate. For details, see DeleteCertificate in the AWS Certificate Manager API Reference.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see RenewMemberCertificate.

Examples:

Example: Delete a certificate in a member account


# No AWS resource in account 444455556666 uses the certificate any longer.

resp = client.delete_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
})

resp.to_h outputs the following:
{
}

Example: Delete a certificate that is still in use


# A load balancer in the member account still uses the certificate.

resp = client.delete_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
})

Request syntax with placeholder values


resp = client.delete_member_certificate({
  certificate_arn: "MemberCertificateArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The ARN of the certificate to delete.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



949
950
951
952
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 949

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

#delete_member_certificate_authority(params = {}) ⇒ Struct

Deletes a private certificate authority (CA) in a member account of the caller's organization. AWS Private Certificate Authority (AWS Private CA) applies the rules of its DeleteCertificateAuthority operation, including which CA states can be deleted and how long a deleted CA can be restored. For details, see DeleteCertificateAuthority in the AWS Private CA API Reference.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see UpdateMemberCertificateAuthority.

Examples:

Example: Delete a certificate authority in a member account


# The certificate authority is DISABLED and can be restored for 7 days.

resp = client.delete_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
  permanent_deletion_time_in_days: 7, 
})

resp.to_h outputs the following:
{
}

Example: Delete a certificate authority that is still active


# AWS Private CA rejects the request because the certificate authority is ACTIVE.

resp = client.delete_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
})

Request syntax with placeholder values


resp = client.delete_member_certificate_authority({
  certificate_authority_arn: "MemberCertificateAuthorityArn", # required
  permanent_deletion_time_in_days: 1,
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_authority_arn (required, String) —

    The ARN of the certificate authority to delete.

  • :permanent_deletion_time_in_days (Integer) —

    How many days the deleted certificate authority can be restored, 7 to 30. If you omit it, AWS Private Certificate Authority (AWS Private CA) applies its default; see DeleteCertificateAuthority in the AWS Private CA API Reference.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



1010
1011
1012
1013
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1010

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

#describe_acme_account(params = {}) ⇒ Types::DescribeAcmeAccountResponse

Returns detailed metadata about the specified ACME account, including its status, public key thumbprint, and associated external account binding.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_endpoint_arn: "AcmeEndpointArn", # required
  account_url: "String", # required
})

Response structure


resp.. #=> String
resp..public_key_thumbprint #=> String
resp..status #=> String, one of "VALID", "DEACTIVATED", "REVOKED"
resp..created_at #=> Time
resp.. #=> String
resp..contacts #=> Array
resp..contacts[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

  • :account_url (required, String) —

    The URL of the ACME account.

Returns:

See Also:



1050
1051
1052
1053
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1050

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

#describe_acme_domain_validation(params = {}) ⇒ Types::DescribeAcmeDomainValidationResponse

Returns detailed metadata about the specified domain validation, including its status, domain scope, and DNS resource records required for validation.

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

  • acme_domain_validation_deleted
  • acme_domain_validation_validated

Examples:

Request syntax with placeholder values


resp = client.describe_acme_domain_validation({
  acme_domain_validation_arn: "AcmeDomainValidationArn", # required
})

Response structure


resp.acme_domain_validation.acme_domain_validation_arn #=> String
resp.acme_domain_validation.acme_endpoint_arn #=> String
resp.acme_domain_validation.domain_name #=> String
resp.acme_domain_validation.prevalidation_type #=> String, one of "DNS_PREVALIDATION"
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.domain_scope.exact_domain #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.domain_scope.subdomains #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.domain_scope.wildcards #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.hosted_zone_id #=> String
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.resource_record.name #=> String
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.resource_record.type #=> String, one of "CNAME"
resp.acme_domain_validation.prevalidation_details.dns_prevalidation.resource_record.value #=> String
resp.acme_domain_validation.status #=> String, one of "VALIDATING", "VALID", "INVALID", "DELETING"
resp.acme_domain_validation.failure_details.reason #=> String, one of "ACCESS_DENIED", "DOMAIN_MISMATCH", "DOMAIN_NOT_ALLOWED", "ENDPOINT_NOT_ACTIVE", "HOSTED_ZONE_NOT_FOUND", "INTERNAL_FAILURE", "INVALID_CHANGE_BATCH", "INVALID_PUBLIC_DOMAIN", "TIMED_OUT"
resp.acme_domain_validation.failure_details.message #=> String
resp.acme_domain_validation.created_at #=> Time
resp.acme_domain_validation.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :acme_domain_validation_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME domain validation.

Returns:

See Also:



1101
1102
1103
1104
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1101

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

#describe_acme_endpoint(params = {}) ⇒ Types::DescribeAcmeEndpointResponse

Returns detailed metadata about the specified ACME endpoint, including its status, URL, authorization behavior, and certificate authority configuration.

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

  • acme_endpoint_active
  • acme_endpoint_deleted

Examples:

Request syntax with placeholder values


resp = client.describe_acme_endpoint({
  acme_endpoint_arn: "AcmeEndpointArn", # required
})

Response structure


resp.acme_endpoint.acme_endpoint_arn #=> String
resp.acme_endpoint.endpoint_url #=> String
resp.acme_endpoint.status #=> String, one of "CREATING", "ACTIVE", "DELETING", "FAILED"
resp.acme_endpoint.failure_reason #=> String
resp.acme_endpoint.authorization_behavior #=> String, one of "PRE_APPROVED"
resp.acme_endpoint.contact #=> String, one of "REQUIRED", "NOT_REQUIRED"
resp.acme_endpoint.certificate_authority.public_certificate_authority.allowed_key_algorithms #=> Array
resp.acme_endpoint.certificate_authority.public_certificate_authority.allowed_key_algorithms[0] #=> String, one of "RSA_2048", "EC_prime256v1", "EC_secp384r1"
resp.acme_endpoint.certificate_tags #=> Array
resp.acme_endpoint.certificate_tags[0].key #=> String
resp.acme_endpoint.certificate_tags[0].value #=> String
resp.acme_endpoint.created_at #=> Time
resp.acme_endpoint.updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

Returns:

See Also:



1149
1150
1151
1152
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1149

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

#describe_acme_external_account_binding(params = {}) ⇒ Types::DescribeAcmeExternalAccountBindingResponse

Returns detailed metadata about the specified external account binding, including the associated IAM role, expiration time, and usage history.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_external_account_binding_arn: "AcmeExternalAccountBindingArn", # required
})

Response structure


resp.. #=> String
resp..acme_endpoint_arn #=> String
resp..role_arn #=> String
resp..expires_at #=> Time
resp..revoked_at #=> Time
resp..last_used_at #=> Time
resp..created_at #=> Time
resp..updated_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :acme_external_account_binding_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME external account binding.

Returns:

See Also:



1186
1187
1188
1189
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1186

def (params = {}, options = {})
  req = build_request(:describe_acme_external_account_binding, 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.managed_by #=> String, one of "CLOUDFRONT"
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].http_redirect.redirect_from #=> String
resp.certificate.domain_validation_options[0].http_redirect.redirect_to #=> String
resp.certificate.domain_validation_options[0].validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
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", "SUPERSEDED", "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].http_redirect.redirect_from #=> String
resp.certificate.renewal_summary.domain_validation_options[0].http_redirect.redirect_to #=> String
resp.certificate.renewal_summary.domain_validation_options[0].validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
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"
resp.certificate.options.export #=> String, one of "ENABLED", "DISABLED"
resp.certificate.options.validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
resp.certificate.update_summary.status #=> String, one of "PENDING_DOMAIN_VALIDATION", "SUCCESS", "FAILED"
resp.certificate.update_summary.type #=> String, one of "DOMAIN_VALIDATION_METHOD"
resp.certificate.update_summary.domain_validation_method_update_summary.from #=> String, one of "EMAIL", "DNS", "HTTP"
resp.certificate.update_summary.domain_validation_method_update_summary.to #=> String, one of "EMAIL", "DNS", "HTTP"
resp.certificate.update_summary.requested_at #=> Time
resp.certificate.update_summary.updated_at #=> Time
resp.certificate.certificate_key_pair_origin #=> String, one of "AWS_MANAGED", "ACME", "CUSTOMER_PROVIDED"
resp.certificate.acme_endpoint_arn #=> String
resp.certificate. #=> String
resp.certificate.certificate_usage #=> String, one of "CLIENT_AND_SERVER_AUTH", "CLIENT_AUTH_ONLY"
resp.certificate.root_hierarchy_type #=> String, one of "N2_AMAZON_MANAGED", "N2_SFG2_AMAZON_MANAGED"

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).

Returns:

See Also:



1302
1303
1304
1305
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1302

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) or a public certificate for use anywhere. The exported file contains the certificate, the certificate chain, and the encrypted private 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 and Export a public certificate.

ACM public certificates created prior to June 17, 2025 cannot be exported.

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.

    When creating your passphrase, you can use any ASCII character except

    , $, or %.

    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:



1372
1373
1374
1375
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1372

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:



1392
1393
1394
1395
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1392

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

#get_acme_external_account_binding_credentials(params = {}) ⇒ Types::GetAcmeExternalAccountBindingCredentialsResponse

Retrieves the key ID and MAC key credentials for an external account binding. These credentials are used by ACME clients during account registration to bind to the endpoint.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_external_account_binding_arn: "AcmeExternalAccountBindingArn", # required
})

Response structure


resp.key_id #=> String
resp.mac_key #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :acme_external_account_binding_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME external account binding.

Returns:

See Also:



1424
1425
1426
1427
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1424

def (params = {}, options = {})
  req = build_request(:get_acme_external_account_binding_credentials, 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.

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):

  • :certificate_arn (required, String) —

    String that contains a certificate ARN in the following format:

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

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

Returns:

See Also:



1474
1475
1476
1477
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1474

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

#get_inventory_configuration(params = {}) ⇒ Types::GetInventoryConfigurationOutput

Returns the organization's configuration for Certificate inventory for organizations. The certificate inventory is the set of certificates observed in the organization's accounts. The configuration says which Regions and accounts are collected, how long data is kept, and whether collection is on. It also shows how far setup has progressed, the organization's AWS Certificate Manager (ACM) plan (Essentials or Pro), and whether Certificate actions for organizations are on. Certificate actions are the operations that act on certificates and certificate authorities in the organization's member accounts.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. Before the first PutInventoryConfiguration call, the operation returns ResourceNotFoundException.

Examples:

Example: Get the inventory configuration


# Collection is on for every Region and for every account except one. Data is kept for 180 days. Expiry notifications go
# weekly to an Amazon SNS topic, starting 30 days before a certificate expires. The latest notification was delivered.

resp = client.get_inventory_configuration({
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      account_ids: [
        "444455556666", 
      ], 
      mode: "EXCLUDE", 
    }, 
    data_retention_days: 180, 
    expiry_notification: {
      channel: "SNS", 
      enabled: true, 
      frequency: "WEEKLY", 
      lead_time_days: 30, 
      topic_arn: "arn:aws:sns:us-east-1:111122223333:cert-expiry", 
    }, 
    home_region: "us-east-1", 
    inventory_tier_configuration: {
      status: "ACTIVE", 
      tier: "PRO", 
    }, 
    last_delivery_status: {
      status: "DELIVERED", 
      updated_at: Time.parse(1794819600), 
    }, 
    lifecycle_management: {
      provisioning_status: "ENABLED", 
      status: "ENABLED", 
    }, 
    provisioning_status: "ENABLED", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Get the configuration while the ACM plan is scheduled to end


# The organization is on the Pro plan, and the plan is scheduled to end on December 1, 2026. The plan stays in effect
# until then. After that, the configuration has no InventoryTierConfiguration.

resp = client.get_inventory_configuration({
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    inventory_tier_configuration: {
      scheduled_change: {
        effective_at: Time.parse(1796083200), 
      }, 
      status: "ACTIVE", 
      tier: "PRO", 
    }, 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLED", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Get the configuration while a new ACM plan is being applied


# PutInventoryConfiguration requested the Pro plan a few seconds ago. The plan is PENDING until it takes effect, usually
# within seconds.

resp = client.get_inventory_configuration({
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    inventory_tier_configuration: {
      status: "PENDING", 
      tier: "PRO", 
    }, 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLING", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Get the configuration before inventory is set up


# The organization has never called PutInventoryConfiguration.

resp = client.get_inventory_configuration({
})

Response structure


resp.configuration.regional_scope.mode #=> String, one of "ALL_REGIONS", "INCLUDE", "EXCLUDE"
resp.configuration.regional_scope.regions #=> Array
resp.configuration.regional_scope.regions[0] #=> String
resp.configuration..mode #=> String, one of "ALL_ACCOUNTS", "INCLUDE", "EXCLUDE"
resp.configuration..organizational_unit_ids #=> Array
resp.configuration..organizational_unit_ids[0] #=> String
resp.configuration.. #=> Array
resp.configuration..[0] #=> String
resp.configuration.data_retention_days #=> Integer
resp.configuration.status #=> String, one of "ENABLED", "DISABLED"
resp.configuration.provisioning_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "FAILED"
resp.configuration.provisioning_status_reason.code #=> String, one of "TRUSTED_ACCESS_DISABLED", "INTERNAL_FAILURE"
resp.configuration.provisioning_status_reason.message #=> String
resp.configuration.home_region #=> String
resp.configuration.lifecycle_management.status #=> String, one of "ENABLED", "DISABLED"
resp.configuration.lifecycle_management.provisioning_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "FAILED"
resp.configuration.lifecycle_management.provisioning_status_reason.code #=> String, one of "TRUSTED_ACCESS_DISABLED", "INTERNAL_FAILURE"
resp.configuration.lifecycle_management.provisioning_status_reason.message #=> String
resp.configuration.expiry_notification.enabled #=> Boolean
resp.configuration.expiry_notification.channel #=> String, one of "SNS"
resp.configuration.expiry_notification.topic_arn #=> String
resp.configuration.expiry_notification.lead_time_days #=> Integer
resp.configuration.expiry_notification.frequency #=> String, one of "ONCE", "DAILY", "WEEKLY"
resp.configuration.last_delivery_status.status #=> String, one of "PENDING_VERIFICATION", "VERIFIED", "VERIFICATION_FAILED", "DELIVERED", "DELIVERY_FAILED"
resp.configuration.last_delivery_status.updated_at #=> Time
resp.configuration.last_delivery_status.message #=> String
resp.configuration.inventory_tier_configuration.tier #=> String, one of "ESSENTIALS", "PRO"
resp.configuration.inventory_tier_configuration.status #=> String, one of "PENDING", "ACTIVE"
resp.configuration.inventory_tier_configuration.scheduled_change.tier #=> String, one of "ESSENTIALS", "PRO"
resp.configuration.inventory_tier_configuration.scheduled_change.effective_at #=> Time

Parameters:

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

    ({})

Returns:

See Also:



1669
1670
1671
1672
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 1669

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

#get_inventory_insights(params = {}) ⇒ Types::GetInventoryInsightsOutput

Returns certificate counts from Certificate inventory for organizations, broken down by the requested aggregates. The certificate inventory is the set of certificates observed in the organization's accounts. An aggregate groups the count by one property, such as Region or key algorithm. Every aggregate except EXPIRY_WINDOW is ranked: it lists groups largest first and omits empty groups.

The counts are precomputed, so the response and each aggregate result carry their own UpdatedAt, which can be earlier than the request. For a count under any other filter, use SearchInventory, whose TotalCount is computed at query time.

Each aggregate is computed on its own, so one aggregate can be FAILED while the others are COMPLETE. Before the first PutInventoryConfiguration call, and while ProvisioningStatus is ENABLING, the counts might not be computed yet. Until they are, CertificateCount is 0 and UpdatedAt is absent. Ranked aggregates are COMPLETE with an empty Groups list. EXPIRY_WINDOW is FAILED until the first daily EXPIRY_WINDOW computation has run. While Status is DISABLED, retained data is served until retention removes it.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. GetInventoryInsights does not return ResourceNotFoundException. Before the first PutInventoryConfiguration call, only the management account can call it; a delegated administrator receives AccessDeniedException.

A repeated aggregate returns ValidationException. An entry that selects no aggregate, or more than one, also returns ValidationException.

Examples:

Example: Summarize certificate expiry, issuance type, and usage across the organization


# The counts are precomputed, so UpdatedAt can be earlier than the request. EXPIRY_WINDOW is computed once a day, so it
# can be older than the other aggregates. EXPIRY_WINDOW returns all six groups, including the empty 0 to 7 day group. Its
# counts sum to CertificateCount. ISSUANCE_TYPE and IN_USE list only non-empty groups, largest first.

resp = client.get_inventory_insights({
  requested_aggregates: [
    {
      expiry_window: {
      }, 
    }, 
    {
      issuance_type: {
      }, 
    }, 
    {
      in_use: {
      }, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  aggregates: [
    {
      aggregate: "EXPIRY_WINDOW", 
      groups: [
        {
          count: 12, 
          max_days: -1, 
        }, 
        {
          count: 0, 
          max_days: 7, 
          min_days: 0, 
        }, 
        {
          count: 85, 
          max_days: 30, 
          min_days: 8, 
        }, 
        {
          count: 93, 
          max_days: 60, 
          min_days: 31, 
        }, 
        {
          count: 110, 
          max_days: 90, 
          min_days: 61, 
        }, 
        {
          count: 180, 
          min_days: 91, 
        }, 
      ], 
      status: "COMPLETE", 
      updated_at: Time.parse(1792483200), 
    }, 
    {
      aggregate: "ISSUANCE_TYPE", 
      groups: [
        {
          count: 301, 
          value: "AMAZON_ISSUED", 
        }, 
        {
          count: 122, 
          value: "IMPORTED", 
        }, 
        {
          count: 57, 
          value: "PRIVATE_CA_ISSUED", 
        }, 
      ], 
      status: "COMPLETE", 
      updated_at: Time.parse(1792522800), 
    }, 
    {
      aggregate: "IN_USE", 
      groups: [
        {
          count: 352, 
          value: "true", 
        }, 
        {
          count: 128, 
          value: "false", 
        }, 
      ], 
      status: "COMPLETE", 
      updated_at: Time.parse(1792522800), 
    }, 
  ], 
  certificate_count: 480, 
  updated_at: Time.parse(1792522800), 
}

Example: Count certificates by their highest open finding severity


# HIGHEST_FINDING_SEVERITY lists only non-empty groups, largest first, with ties ordered by Value. Twenty certificates
# have not had their findings evaluated yet. They are counted in NOT_EVALUATED, so the groups sum to CertificateCount.

resp = client.get_inventory_insights({
  requested_aggregates: [
    {
      highest_finding_severity: {
      }, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  aggregates: [
    {
      aggregate: "HIGHEST_FINDING_SEVERITY", 
      groups: [
        {
          count: 312, 
          value: "HEALTHY", 
        }, 
        {
          count: 96, 
          value: "NOT_APPLICABLE", 
        }, 
        {
          count: 29, 
          value: "LOW", 
        }, 
        {
          count: 20, 
          value: "NOT_EVALUATED", 
        }, 
        {
          count: 14, 
          value: "HIGH", 
        }, 
        {
          count: 9, 
          value: "CRITICAL", 
        }, 
      ], 
      status: "COMPLETE", 
      updated_at: Time.parse(1792522800), 
    }, 
  ], 
  certificate_count: 480, 
  updated_at: Time.parse(1792522800), 
}

Example: Count certificates by highest open finding severity for each certificate type


# GroupBy CERTIFICATE_TYPE adds CertificateTypeGroups, ordered alphabetically by CertificateType value. Each type's
# severity groups are ranked like Groups. Groups still counts all types together. Four certificates have not had their
# findings evaluated yet: one IMPORTED, one PRIVATE_TLS, and two PUBLIC_TLS certificates. They are counted in
# NOT_EVALUATED, both in Groups and in their type's groups, so each type's groups sum to its CertificateCount.

resp = client.get_inventory_insights({
  requested_aggregates: [
    {
      highest_finding_severity: {
        group_by: "CERTIFICATE_TYPE", 
      }, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  aggregates: [
    {
      aggregate: "HIGHEST_FINDING_SEVERITY", 
      certificate_type_groups: [
        {
          certificate_count: 2, 
          certificate_type: "ACME", 
          groups: [
            {
              count: 2, 
              value: "HEALTHY", 
            }, 
          ], 
        }, 
        {
          certificate_count: 3, 
          certificate_type: "IMPORTED", 
          groups: [
            {
              count: 1, 
              value: "HEALTHY", 
            }, 
            {
              count: 1, 
              value: "HIGH", 
            }, 
            {
              count: 1, 
              value: "NOT_EVALUATED", 
            }, 
          ], 
        }, 
        {
          certificate_count: 3, 
          certificate_type: "OTHER", 
          groups: [
            {
              count: 3, 
              value: "NOT_APPLICABLE", 
            }, 
          ], 
        }, 
        {
          certificate_count: 9, 
          certificate_type: "PRIVATE_TLS", 
          groups: [
            {
              count: 6, 
              value: "HEALTHY", 
            }, 
            {
              count: 2, 
              value: "LOW", 
            }, 
            {
              count: 1, 
              value: "NOT_EVALUATED", 
            }, 
          ], 
        }, 
        {
          certificate_count: 17, 
          certificate_type: "PUBLIC_TLS", 
          groups: [
            {
              count: 10, 
              value: "HEALTHY", 
            }, 
            {
              count: 3, 
              value: "HIGH", 
            }, 
            {
              count: 2, 
              value: "CRITICAL", 
            }, 
            {
              count: 2, 
              value: "NOT_EVALUATED", 
            }, 
          ], 
        }, 
      ], 
      groups: [
        {
          count: 19, 
          value: "HEALTHY", 
        }, 
        {
          count: 4, 
          value: "HIGH", 
        }, 
        {
          count: 4, 
          value: "NOT_EVALUATED", 
        }, 
        {
          count: 3, 
          value: "NOT_APPLICABLE", 
        }, 
        {
          count: 2, 
          value: "CRITICAL", 
        }, 
        {
          count: 2, 
          value: "LOW", 
        }, 
      ], 
      status: "COMPLETE", 
      updated_at: Time.parse(1794769200), 
    }, 
  ], 
  certificate_count: 34, 
  updated_at: Time.parse(1794769200), 
}

Example: Read insights before the first EXPIRY_WINDOW computation


# The inventory was enabled just now, and no counts have been computed, so CertificateCount is 0 and UpdatedAt is absent.
# The first daily EXPIRY_WINDOW computation has not run, so EXPIRY_WINDOW is FAILED with no Groups and no UpdatedAt.
# REGION is COMPLETE with an empty Groups list, because no certificate has been counted yet.

resp = client.get_inventory_insights({
  requested_aggregates: [
    {
      expiry_window: {
      }, 
    }, 
    {
      region: {
      }, 
    }, 
  ], 
})

resp.to_h outputs the following:
{
  aggregates: [
    {
      aggregate: "EXPIRY_WINDOW", 
      status: "FAILED", 
    }, 
    {
      aggregate: "REGION", 
      groups: [
      ], 
      status: "COMPLETE", 
    }, 
  ], 
  certificate_count: 0, 
}

Example: Request the same aggregate twice


# The second entry repeats ISSUANCE_TYPE, so the request is rejected and names the repeated entry.

resp = client.get_inventory_insights({
  requested_aggregates: [
    {
      issuance_type: {
      }, 
    }, 
    {
      issuance_type: {
      }, 
    }, 
  ], 
})

Request syntax with placeholder values


resp = client.get_inventory_insights({
  requested_aggregates: [ # required
    {
      expiry_window: {
      },
      issuance_type: {
      },
      region: {
      },
      in_use: {
      },
      key_algorithm: {
      },
      highest_finding_severity: {
        group_by: "CERTIFICATE_TYPE", # accepts CERTIFICATE_TYPE
      },
    },
  ],
})

Response structure


resp.certificate_count #=> Integer
resp.updated_at #=> Time
resp.aggregates #=> Array
resp.aggregates[0].aggregate #=> String, one of "EXPIRY_WINDOW", "ISSUANCE_TYPE", "REGION", "IN_USE", "KEY_ALGORITHM", "HIGHEST_FINDING_SEVERITY"
resp.aggregates[0].status #=> String, one of "COMPLETE", "FAILED"
resp.aggregates[0].updated_at #=> Time
resp.aggregates[0].groups #=> Array
resp.aggregates[0].groups[0].value #=> String
resp.aggregates[0].groups[0].count #=> Integer
resp.aggregates[0].groups[0].min_days #=> Integer
resp.aggregates[0].groups[0].max_days #=> Integer
resp.aggregates[0].other_count #=> Integer
resp.aggregates[0].certificate_type_groups #=> Array
resp.aggregates[0].certificate_type_groups[0].certificate_type #=> String, one of "PUBLIC_TLS", "PRIVATE_TLS", "ACME", "IMPORTED", "OTHER"
resp.aggregates[0].certificate_type_groups[0].certificate_count #=> Integer
resp.aggregates[0].certificate_type_groups[0].groups #=> Array
resp.aggregates[0].certificate_type_groups[0].groups[0].value #=> String
resp.aggregates[0].certificate_type_groups[0].groups[0].count #=> Integer
resp.aggregates[0].certificate_type_groups[0].groups[0].min_days #=> Integer
resp.aggregates[0].certificate_type_groups[0].groups[0].max_days #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :requested_aggregates (required, Array<Types::InventoryAggregateRequest>) —

    The aggregates to return, 0 to 25 entries. CertificateCount is always returned and needs no entry, so an empty list returns CertificateCount with an empty Aggregates list. Each aggregate can appear at most once. A repeated aggregate, or an aggregate the service does not support, returns ValidationException.

Returns:

See Also:



2114
2115
2116
2117
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2114

def get_inventory_insights(params = {}, options = {})
  req = build_request(:get_inventory_insights, 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.

ACM does not provide managed renewal for certificates that you import.

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:\temp\certificate_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.

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.

  • :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:



2231
2232
2233
2234
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2231

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

#list_acme_accounts(params = {}) ⇒ Types::ListAcmeAccountsResponse

Retrieves a list of ACME accounts registered with the specified ACME endpoint. ACME accounts are created when clients use external account binding credentials to register.

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_acme_accounts({
  next_token: "String",
  max_results: 1,
  acme_endpoint_arn: "AcmeEndpointArn", # required
})

Response structure


resp.acme_accounts #=> Array
resp.acme_accounts[0]. #=> String
resp.acme_accounts[0].public_key_thumbprint #=> String
resp.acme_accounts[0].status #=> String, one of "VALID", "DEACTIVATED", "REVOKED"
resp.acme_accounts[0].created_at #=> Time
resp.acme_accounts[0]. #=> String
resp.acme_accounts[0].contacts #=> Array
resp.acme_accounts[0].contacts[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token for pagination.

  • :max_results (Integer) —

    The maximum number of results to return.

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

Returns:

See Also:



2280
2281
2282
2283
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2280

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

#list_acme_domain_validations(params = {}) ⇒ Types::ListAcmeDomainValidationsResponse

Retrieves a list of domain validations for the specified ACME endpoint.

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_acme_domain_validations({
  next_token: "String",
  max_results: 1,
  acme_endpoint_arn: "AcmeEndpointArn", # required
})

Response structure


resp.acme_domain_validations #=> Array
resp.acme_domain_validations[0].acme_domain_validation_arn #=> String
resp.acme_domain_validations[0].acme_endpoint_arn #=> String
resp.acme_domain_validations[0].domain_name #=> String
resp.acme_domain_validations[0].prevalidation_type #=> String, one of "DNS_PREVALIDATION"
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.domain_scope.exact_domain #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.domain_scope.subdomains #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.domain_scope.wildcards #=> String, one of "ENABLED", "DISABLED"
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.hosted_zone_id #=> String
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.resource_record.name #=> String
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.resource_record.type #=> String, one of "CNAME"
resp.acme_domain_validations[0].prevalidation_details.dns_prevalidation.resource_record.value #=> String
resp.acme_domain_validations[0].status #=> String, one of "VALIDATING", "VALID", "INVALID", "DELETING"
resp.acme_domain_validations[0].failure_details.reason #=> String, one of "ACCESS_DENIED", "DOMAIN_MISMATCH", "DOMAIN_NOT_ALLOWED", "ENDPOINT_NOT_ACTIVE", "HOSTED_ZONE_NOT_FOUND", "INTERNAL_FAILURE", "INVALID_CHANGE_BATCH", "INVALID_PUBLIC_DOMAIN", "TIMED_OUT"
resp.acme_domain_validations[0].failure_details.message #=> String
resp.acme_domain_validations[0].created_at #=> Time
resp.acme_domain_validations[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token for pagination.

  • :max_results (Integer) —

    The maximum number of results to return.

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

Returns:

See Also:



2337
2338
2339
2340
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2337

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

#list_acme_endpoints(params = {}) ⇒ Types::ListAcmeEndpointsResponse

Retrieves a list of ACME endpoints in your account. Use this operation to view all configured ACME endpoints and their current status.

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_acme_endpoints({
  next_token: "String",
  max_results: 1,
})

Response structure


resp.acme_endpoints #=> Array
resp.acme_endpoints[0].acme_endpoint_arn #=> String
resp.acme_endpoints[0].endpoint_url #=> String
resp.acme_endpoints[0].status #=> String, one of "CREATING", "ACTIVE", "DELETING", "FAILED"
resp.acme_endpoints[0].failure_reason #=> String
resp.acme_endpoints[0].authorization_behavior #=> String, one of "PRE_APPROVED"
resp.acme_endpoints[0].contact #=> String, one of "REQUIRED", "NOT_REQUIRED"
resp.acme_endpoints[0].certificate_authority.public_certificate_authority.allowed_key_algorithms #=> Array
resp.acme_endpoints[0].certificate_authority.public_certificate_authority.allowed_key_algorithms[0] #=> String, one of "RSA_2048", "EC_prime256v1", "EC_secp384r1"
resp.acme_endpoints[0].certificate_tags #=> Array
resp.acme_endpoints[0].certificate_tags[0].key #=> String
resp.acme_endpoints[0].certificate_tags[0].value #=> String
resp.acme_endpoints[0].created_at #=> Time
resp.acme_endpoints[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token for pagination.

  • :max_results (Integer) —

    The maximum number of results to return.

Returns:

See Also:



2387
2388
2389
2390
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2387

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

#list_acme_external_account_bindings(params = {}) ⇒ Types::ListAcmeExternalAccountBindingsResponse

Retrieves a list of external account bindings for the specified ACME endpoint.

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

Examples:

Request syntax with placeholder values


resp = client.({
  next_token: "String",
  max_results: 1,
  acme_endpoint_arn: "AcmeEndpointArn", # required
})

Response structure


resp. #=> Array
resp.[0]. #=> String
resp.[0].acme_endpoint_arn #=> String
resp.[0].role_arn #=> String
resp.[0].expires_at #=> Time
resp.[0].revoked_at #=> Time
resp.[0].last_used_at #=> Time
resp.[0].created_at #=> Time
resp.[0].updated_at #=> Time
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String) —

    A token for pagination.

  • :max_results (Integer) —

    The maximum number of results to return.

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

Returns:

See Also:



2436
2437
2438
2439
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2436

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

#list_certificate_domain_validations(params = {}) ⇒ Types::ListCertificateDomainValidationsResponse

Returns per-domain validation summaries for an ACM certificate. Each summary includes the domain name, the active validation configuration, and the requested validation configuration when a validation method migration is in progress. You can use the results to monitor the progress of an email-to-DNS validation migration and to retrieve the CNAME records required for DNS validation.

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_certificate_domain_validations({
  certificate_arn: "CertificateArn", # required
  next_token: "NextToken",
  max_items: 1,
})

Response structure


resp.domain_validation_summary_list #=> Array
resp.domain_validation_summary_list[0].domain_name #=> String
resp.domain_validation_summary_list[0].active_validation_configuration.validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.email_validation_challenge.validation_emails #=> Array
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.email_validation_challenge.validation_emails[0] #=> String
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.email_validation_challenge.validation_domain #=> String
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.name #=> String
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.type #=> String, one of "CNAME"
resp.domain_validation_summary_list[0].active_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.value #=> String
resp.domain_validation_summary_list[0].active_validation_configuration.validation_status #=> String, one of "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.email_validation_challenge.validation_emails #=> Array
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.email_validation_challenge.validation_emails[0] #=> String
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.email_validation_challenge.validation_domain #=> String
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.name #=> String
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.type #=> String, one of "CNAME"
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_challenge.dns_validation_challenge.resource_record.value #=> String
resp.domain_validation_summary_list[0].requested_validation_configuration.validation_status #=> String, one of "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The Amazon Resource Name (ARN) of the certificate for which to list domain validation summaries.

  • :next_token (String) —

    A token returned by a previous call to ListCertificateDomainValidations. If the number of results exceeds MaxItems, use this token to retrieve the next page of results.

  • :max_items (Integer) —

    The maximum number of domain validation summaries to return. If you don't specify a value, the default is 1000.

Returns:

See Also:



2502
2503
2504
2505
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2502

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

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

Retrieves a list of certificate ARNs and domain names. You can request that only certificates that match a specific status be listed. You can also filter by specific attributes of the certificate. Default filtering returns only RSA_2048 certificates. For more information, see Filters.

By default, this action does not return certificates with a CertificateKeyPairOrigin of ACME. To include ACME certificates, specify ACME in the CertificateKeyPairOrigins filter.

By default, this action does not return certificates with a RootHierarchyType of N2_AMAZON_MANAGED or N2_SFG2_AMAZON_MANAGED. To list only Amazon N2 certificates, specify one or both of these values in the RootHierarchyTypes filter.

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
  certificate_key_pair_origins: ["AWS_MANAGED"], # accepts AWS_MANAGED, ACME, CUSTOMER_PROVIDED
  root_hierarchy_types: ["N2_AMAZON_MANAGED"], # accepts N2_AMAZON_MANAGED, N2_SFG2_AMAZON_MANAGED
  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
    export_option: "ENABLED", # accepts ENABLED, DISABLED
    managed_by: "CLOUDFRONT", # accepts CLOUDFRONT
  },
  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].export_option #=> String, one of "ENABLED", "DISABLED"
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
resp.certificate_summary_list[0].managed_by #=> String, one of "CLOUDFRONT"
resp.certificate_summary_list[0].certificate_key_pair_origin #=> String, one of "AWS_MANAGED", "ACME", "CUSTOMER_PROVIDED"
resp.certificate_summary_list[0].certificate_usage #=> String, one of "CLIENT_AND_SERVER_AUTH", "CLIENT_AUTH_ONLY"
resp.certificate_summary_list[0].root_hierarchy_type #=> String, one of "N2_AMAZON_MANAGED", "N2_SFG2_AMAZON_MANAGED"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_statuses (Array<String>) —

    Filter the certificate list by status value.

  • :certificate_key_pair_origins (Array<String>) —

    Filter the certificate list by certificate key pair origin. Specify one or more CertificateKeyPairOrigin values. Default filtering returns only certificates with key pair origin of AWS_MANAGED and CUSTOMER_PROVIDED.

  • :root_hierarchy_types (Array<String>) —

    Filter the certificate list by root hierarchy type. Specify one or more RootHierarchyType values. By default, this action does not return certificates with a RootHierarchyType of N2_AMAZON_MANAGED or N2_SFG2_AMAZON_MANAGED. To list only Amazon N2 certificates, specify one or both of these values in the RootHierarchyTypes filter.

  • :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:



2629
2630
2631
2632
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2629

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

#list_inventory_findings(params = {}) ⇒ Types::ListInventoryFindingsOutput

Lists the open findings for one certificate. Returns one page of findings and the total number of findings.

A finding says that a certificate series has a problem you can fix, and how severe it is. A series is the set of certificates that one AWS Certificate Manager (ACM) certificate holds across renewals and reimports. A certificate's findings are the open findings of every series in which it is a current certificate. A rule that passes or does not apply produces no finding, so a certificate with no problems returns an empty list.

Findings are sorted by severity, highest first, and then by RuleId in alphabetical order. Ties are broken in a fixed order that is unique to each finding, so paging returns every finding at least once. A finding can change while you page, for example when its severity rises. Then it is returned again, with its new values, at the top of a later page. Its FindingId does not change, so you can replace the copy you already have.

To read the next page, repeat the request with the NextToken from the previous response. Keep the same CertificateIdentifier and Severity. A NextToken from a request with a different CertificateIdentifier or Severity returns ValidationException.

Every response also reports the certificate's HighestFindingSeverity. It is NOT_EVALUATED until the certificate's findings have been evaluated.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition.

The operation returns ResourceNotFoundException in two cases, each with its own message:

  • The inventory is not configured: no PutInventoryConfiguration call has run.
  • The inventory has no certificate with the identifier.

Do not match on the message to tell the cases apart. GetInventoryConfiguration says whether the inventory is configured.

Before the first PutInventoryConfiguration call, only the management account can call it; a delegated administrator receives AccessDeniedException.

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

Examples:

Example: List the findings of a certificate


# ACM has not renewed the exported certificate. The inventory cannot observe where an exported certificate is used.

resp = client.list_inventory_findings({
  certificate_identifier: "38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883", 
})

resp.to_h outputs the following:
{
  findings: [
    {
      actual: "The certificate expires on 2026-12-13 and has not been renewed.", 
      certificate_identifier: "38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883", 
      evaluated_at: Time.parse(1794531574), 
      expected: "ACM renews the certificate 45 days before it expires.", 
      finding_id: "f19cb34e5c046d43568f2d4f8bb233e0ff", 
      remediation: "Check the certificate's domain validation and renewal status in ACM and resolve what blocks renewal.", 
      rule_id: "ACM_RENEWAL_OVERDUE", 
      scope: {
        series: {
          account_id: "111122223333", 
          certificate_arn: "arn:aws:acm:us-west-2:111122223333:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE11111", 
          region: "us-west-2", 
        }, 
      }, 
      severity: "HIGH", 
    }, 
    {
      actual: "The certificate is exported, so the inventory cannot observe where it is used.", 
      certificate_identifier: "38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883", 
      evaluated_at: Time.parse(1794531574), 
      expected: "The certificate is used by at least one resource.", 
      finding_id: "f1164cd0676ee47e5a4a91b3f91c40c0e0", 
      reason: "USAGE_NOT_OBSERVABLE", 
      remediation: "The certificate may be used outside ACM-integrated services, for example on an EC2 instance or an on-premises server. Confirm where it is used, and delete it if it is no longer needed.", 
      rule_id: "NO_USAGE_EVIDENCE", 
      scope: {
        series: {
          account_id: "111122223333", 
          certificate_arn: "arn:aws:acm:us-west-2:111122223333:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE11111", 
          region: "us-west-2", 
        }, 
      }, 
      severity: "LOW", 
    }, 
  ], 
  highest_finding_severity: "HIGH", 
  total_count: 2, 
  total_count_relation: "EXACT", 
}

Example: List the findings of a healthy certificate


# Every rule that applies to the certificate passes.

resp = client.list_inventory_findings({
  certificate_identifier: "5b2d8e1f4a7c0936d2e5f8b1a4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1", 
})

resp.to_h outputs the following:
{
  findings: [
  ], 
  highest_finding_severity: "HEALTHY", 
  total_count: 0, 
  total_count_relation: "EXACT", 
}

Example: List the findings of a certificate the inventory has not observed


# No certificate in the organization's inventory has this identifier.

resp = client.list_inventory_findings({
  certificate_identifier: "9c1e4b7a2d5f8036e9b2c5f8a1d4e7b0c3f6a9d2e5b8c1f4a7d0e3b6c9f2a5d8", 
})

Example: Continue with a token from another severity


# The NextToken came from a request for HIGH findings, and this request asks for CRITICAL findings.

resp = client.list_inventory_findings({
  certificate_identifier: "38fdac0e1a578bcf38ca654a0d2722da2dfe9bc6b77d803ee20218f9025d0883", 
  next_token: "AAEXAMPLENextTokenFindings1111", 
  severity: "CRITICAL", 
})

Request syntax with placeholder values


resp = client.list_inventory_findings({
  certificate_identifier: "ContentHashIdentifier", # required
  severity: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL
  max_results: 1,
  next_token: "ListInventoryFindingsInputNextTokenString",
})

Response structure


resp.findings #=> Array
resp.findings[0].finding_id #=> String
resp.findings[0].certificate_identifier #=> String
resp.findings[0].rule_id #=> String, one of "NO_VALID_CERTIFICATE", "ACM_RENEWAL_OVERDUE", "EXPIRING_SOON", "NO_USAGE_EVIDENCE", "EXPIRED_CERTIFICATE_IN_USE"
resp.findings[0].severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL"
resp.findings[0].scope.series.certificate_arn #=> String
resp.findings[0].scope.series. #=> String
resp.findings[0].scope.series.region #=> String
resp.findings[0].reason #=> String, one of "USAGE_NOT_OBSERVABLE", "EXPIRED_NOT_IN_USE", "NOT_IN_USE"
resp.findings[0].expected #=> String
resp.findings[0].actual #=> String
resp.findings[0].remediation #=> String
resp.findings[0].evaluated_at #=> Time
resp.highest_finding_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "HEALTHY", "NOT_APPLICABLE", "NOT_EVALUATED"
resp.next_token #=> String
resp.total_count #=> Integer
resp.total_count_relation #=> String, one of "EXACT", "AT_LEAST"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_identifier (required, String) —

    The identifier of the certificate whose findings to list, as SearchInventory returns it.

  • :severity (String) —

    Return only findings of this severity. Omit it to return findings of every severity.

  • :max_results (Integer) —

    The maximum number of findings to return, 1 to 100. Defaults to 25.

  • :next_token (String) —

    The NextToken from the previous response, to read the next page.

Returns:

See Also:



2827
2828
2829
2830
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2827

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

Lists the resources that one certificate maps to: AWS Certificate Manager certificates, AWS Private Certificate Authority (AWS Private CA) certificates, and AWS Private CA certificate authorities. Returns one page of related resources and the total number of related resources.

Related resources are sorted by ResourceArn, in ascending order. To read the next page, repeat the request with the NextToken from the previous response and the same CertificateIdentifier. A NextToken from a request for a different certificate returns ValidationException.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition.

The operation returns ResourceNotFoundException before the first PutInventoryConfiguration call. Until then, only the management account can call it; a delegated administrator receives AccessDeniedException. It also returns ResourceNotFoundException when the inventory has no certificate with the identifier.

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

Examples:

Example: List the resources a certificate maps to


# The certificate is the one an ACM certificate holds now. The inventory last read the ACM certificate on November 2,
# 2026.

resp = client.list_inventory_related_resources({
  certificate_identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
})

resp.to_h outputs the following:
{
  related_resources: [
    {
      association_status: "CURRENT", 
      issuance_type: "AMAZON_ISSUED", 
      metadata: {
        acm_certificate: {
          certificate_key_pair_origin: "AWS_MANAGED", 
          created_at: Time.parse(1763576400), 
          domain_name: "www.example.com", 
          in_use_by_count: 1, 
          issued_at: Time.parse(1763597100), 
          not_after: Time.parse(1795132799), 
          options: {
            export: "DISABLED", 
            validation_method: "DNS", 
          }, 
          renewal_eligibility: "ELIGIBLE", 
          serial: "0a:1b:2c:3d:4e:5f:60:71:82:93:a4:b5:c6:d7:e8:f9", 
          status: "ISSUED", 
          type: "AMAZON_ISSUED", 
          updated_at: Time.parse(1793628000), 
        }, 
      }, 
      resource_arn: "arn:aws:acm:us-west-2:111122223333:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE11111", 
      resource_type: "ACM_CERTIFICATE", 
    }, 
  ], 
  total_count: 1, 
  total_count_relation: "EXACT", 
}

Example: Continue with a token from another certificate


# The NextToken came from a request for a different certificate.

resp = client.list_inventory_related_resources({
  certificate_identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
  next_token: "AAEXAMPLENextTokenRelated11111", 
})

Request syntax with placeholder values


resp = client.list_inventory_related_resources({
  certificate_identifier: "ContentHashIdentifier", # required
  max_results: 1,
  next_token: "ListInventoryRelatedResourcesInputNextTokenString",
})

Response structure


resp.related_resources #=> Array
resp.related_resources[0].resource_type #=> String, one of "ACM_CERTIFICATE", "PCA_CERTIFICATE", "PCA_CERTIFICATE_AUTHORITY"
resp.related_resources[0].resource_arn #=> String
resp.related_resources[0].issuance_type #=> String, one of "AMAZON_ISSUED", "PRIVATE_CA_ISSUED", "IMPORTED", "EXTERNAL", "PRIVATE_CA_DIRECT"
resp.related_resources[0].association_status #=> String, one of "CURRENT", "REPLACED"
resp.related_resources[0]..acm_certificate.updated_at #=> Time
resp.related_resources[0]..acm_certificate.domain_name #=> String
resp.related_resources[0]..acm_certificate.serial #=> String
resp.related_resources[0]..acm_certificate.not_after #=> Time
resp.related_resources[0]..acm_certificate.status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.related_resources[0]..acm_certificate.type #=> String, one of "IMPORTED", "AMAZON_ISSUED", "PRIVATE"
resp.related_resources[0]..acm_certificate.in_use_by_count #=> Integer
resp.related_resources[0]..acm_certificate.renewal_eligibility #=> String, one of "ELIGIBLE", "INELIGIBLE"
resp.related_resources[0]..acm_certificate.renewal_summary.renewal_status #=> String, one of "PENDING_AUTO_RENEWAL", "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.related_resources[0]..acm_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.related_resources[0]..acm_certificate.renewal_summary.updated_at #=> Time
resp.related_resources[0]..acm_certificate.options.export #=> String, one of "ENABLED", "DISABLED"
resp.related_resources[0]..acm_certificate.options.validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
resp.related_resources[0]..acm_certificate.update_summary.status #=> String, one of "PENDING_DOMAIN_VALIDATION", "SUCCESS", "FAILED"
resp.related_resources[0]..acm_certificate.update_summary.type #=> String, one of "DOMAIN_VALIDATION_METHOD"
resp.related_resources[0]..acm_certificate.update_summary.requested_at #=> Time
resp.related_resources[0]..acm_certificate.update_summary.updated_at #=> Time
resp.related_resources[0]..acm_certificate.certificate_key_pair_origin #=> String, one of "AWS_MANAGED", "ACME", "CUSTOMER_PROVIDED"
resp.related_resources[0]..acm_certificate.managed_by #=> String, one of "CLOUDFRONT"
resp.related_resources[0]..acm_certificate.created_at #=> Time
resp.related_resources[0]..acm_certificate.issued_at #=> Time
resp.related_resources[0]..acm_certificate.imported_at #=> Time
resp.related_resources[0]..acm_certificate.revoked_at #=> Time
resp.related_resources[0]..acm_certificate.revocation_reason #=> String, one of "UNSPECIFIED", "KEY_COMPROMISE", "CA_COMPROMISE", "AFFILIATION_CHANGED", "SUPERCEDED", "SUPERSEDED", "CESSATION_OF_OPERATION", "CERTIFICATE_HOLD", "REMOVE_FROM_CRL", "PRIVILEGE_WITHDRAWN", "A_A_COMPROMISE"
resp.related_resources[0]..acm_certificate.certificate_authority_arn #=> String
resp.related_resources[0]..acm_certificate.acme_endpoint_arn #=> String
resp.related_resources[0]..acm_certificate. #=> String
resp.related_resources[0]..pca_certificate_authority.updated_at #=> Time
resp.related_resources[0]..pca_certificate_authority.status #=> String, one of "CREATING", "PENDING_CERTIFICATE", "ACTIVE", "DELETED", "DISABLED", "EXPIRED", "FAILED"
resp.related_resources[0]..pca_certificate_authority.type #=> String, one of "ROOT", "SUBORDINATE"
resp.related_resources[0]..pca_certificate_authority.usage_mode #=> String, one of "GENERAL_PURPOSE", "SHORT_LIVED_CERTIFICATE"
resp.related_resources[0]..pca_certificate_authority.key_storage_security_standard #=> String, one of "FIPS_140_2_LEVEL_2_OR_HIGHER", "FIPS_140_2_LEVEL_3_OR_HIGHER", "CCPC_LEVEL_1_OR_HIGHER"
resp.related_resources[0]..pca_certificate_authority.serial #=> String
resp.related_resources[0]..pca_certificate_authority.not_before #=> Time
resp.related_resources[0]..pca_certificate_authority.not_after #=> Time
resp.related_resources[0]..pca_certificate_authority.created_at #=> Time
resp.related_resources[0]..pca_certificate_authority.last_state_change_at #=> Time
resp.related_resources[0]..pca_certificate_authority.restorable_until #=> Time
resp.next_token #=> String
resp.total_count #=> Integer
resp.total_count_relation #=> String, one of "EXACT", "AT_LEAST"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_identifier (required, String) —

    The identifier of the certificate whose related resources to list, as SearchInventory returns it.

  • :max_results (Integer) —

    The maximum number of related resources to return, 1 to 100. Defaults to 25.

  • :next_token (String) —

    The NextToken from the previous response, to read the next page.

Returns:

See Also:



2988
2989
2990
2991
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 2988

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

#list_inventory_usages(params = {}) ⇒ Types::ListInventoryUsagesOutput

Lists the places where one certificate was observed in use, such as load balancers and Amazon CloudFront distributions. Returns one page of usages and the total number of usages.

Usages are sorted by target, in ascending order. To read the next page, repeat the request with the NextToken from the previous response and the same CertificateIdentifier. A NextToken from a request for a different certificate returns ValidationException.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition.

The operation returns ResourceNotFoundException before the first PutInventoryConfiguration call. Until then, only the management account can call it; a delegated administrator receives AccessDeniedException. It also returns ResourceNotFoundException when the inventory has no certificate with the identifier.

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

Examples:

Example: List where a certificate is used


# The certificate is attached to an Application Load Balancer and an Amazon CloudFront distribution.

resp = client.list_inventory_usages({
  certificate_identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
  max_results: 25, 
})

resp.to_h outputs the following:
{
  total_count: 2, 
  total_count_relation: "EXACT", 
  usages: [
    {
      account_id: "111122223333", 
      certificate_identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
      last_observed_at: Time.parse(1793628000), 
      target: {
        arn: "arn:aws:cloudfront::111122223333:distribution/E2QWRUHAPOMQZL", 
      }, 
    }, 
    {
      account_id: "111122223333", 
      certificate_identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
      last_observed_at: Time.parse(1793628300), 
      region: "us-west-2", 
      target: {
        arn: "arn:aws:elasticloadbalancing:us-west-2:111122223333:loadbalancer/app/web-frontend/50dc6c495c0c9188", 
      }, 
    }, 
  ], 
}

Example: List the usages of a certificate the inventory has not observed


# No certificate in the organization's inventory has this identifier.

resp = client.list_inventory_usages({
  certificate_identifier: "9c1e4b7a2d5f8036e9b2c5f8a1d4e7b0c3f6a9d2e5b8c1f4a7d0e3b6c9f2a5d8", 
})

Request syntax with placeholder values


resp = client.list_inventory_usages({
  certificate_identifier: "ContentHashIdentifier", # required
  max_results: 1,
  next_token: "ListInventoryUsagesInputNextTokenString",
})

Response structure


resp.usages #=> Array
resp.usages[0].certificate_identifier #=> String
resp.usages[0].target.arn #=> String
resp.usages[0].target.resource_identifier.resource_type #=> String, one of "HOST", "EKS_POD"
resp.usages[0].target.resource_identifier.value #=> String
resp.usages[0].last_observed_at #=> Time
resp.usages[0]. #=> String
resp.usages[0].region #=> String
resp.usages[0].agent_reported.discovery.port #=> Integer
resp.usages[0].agent_reported.discovery.server_name #=> String
resp.usages[0].agent_reported.automation.certificate_arn #=> String
resp.next_token #=> String
resp.total_count #=> Integer
resp.total_count_relation #=> String, one of "EXACT", "AT_LEAST"

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_identifier (required, String) —

    The identifier of the certificate whose usages to list, as SearchInventory returns it.

  • :max_results (Integer) —

    The maximum number of usages to return, 1 to 100. Defaults to 25.

  • :next_token (String) —

    The NextToken from the previous response, to read the next page.

Returns:

See Also:



3105
3106
3107
3108
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3105

def list_inventory_usages(params = {}, options = {})
  req = build_request(:list_inventory_usages, 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.

This action applies only to the certificate resource type. For all other ACM resource types, use ListTagsForResource instead.

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).

Returns:

See Also:



3153
3154
3155
3156
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3153

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

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse

Lists the tags associated with an ACM resource.

Use this action for all ACM resource types except the certificate resource type. For certificate resources, use ListTagsForCertificate instead.

To add one or more tags, use the TagResource action. To remove one or more tags, use the UntagResource action.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_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):

  • :resource_arn (required, String) —

    The ARN of the ACM resource for which to list tags.

Returns:

See Also:



3192
3193
3194
3195
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3192

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, 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:



3231
3232
3233
3234
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3231

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

#put_inventory_configuration(params = {}) ⇒ Types::PutInventoryConfigurationOutput

Sets the organization's configuration for Certificate inventory for organizations, and returns it. The certificate inventory is the set of certificates observed in the organization's accounts.

The first call with Status ENABLED creates the configuration. The Region of that call becomes the home Region, and later calls must be made there. Setup in the organization's accounts continues after the call returns. To follow it, read ProvisioningStatus with GetInventoryConfiguration.

The caller must be the organization's management account or its delegated administrator in AWS Organizations. Otherwise, the operation returns AccessDeniedException. The first call starts the organization's AWS Certificate Manager (ACM) plan (Essentials or Pro), so only the management account can make it. A delegated administrator can make later calls as soon as it is registered.

The call does not require that AWS Organizations trusted access is on, that all features are enabled in the organization, or that a delegated administrator is registered. Setup requires them. If a requirement is not met, GetInventoryConfiguration shows ProvisioningStatus FAILED, with a reason code and a message.

The operation returns ConflictException for these calls:

  • A first call with Status DISABLED.
  • A call from a Region other than the home Region.
  • A call while a previous change is still being set up, unless it repeats the stored configuration.

DataRetentionDays is not kept when you omit it. A call without it sets retention to 90 days, even if a different value is stored.

LifecycleManagement turns Certificate actions for organizations on or off. Certificate actions are the operations that act on certificates and certificate authorities in the organization's member accounts. Omit LifecycleManagement to keep the stored value. The first call can turn certificate actions on, and no registered delegated administrator is needed. Status DISABLED also turns certificate actions off. Turning them on while Status is DISABLED returns ValidationException. To follow setup in the member accounts, read LifecycleManagement.ProvisioningStatus with GetInventoryConfiguration.

ExpiryNotification sets certificate expiry notifications. Omit it to keep the stored setting, or set Enabled to false to turn notifications off. With Enabled true, Channel and TopicArn are required. The topic must be a standard (non-FIFO) Amazon SNS topic in the management account and the home Region. It must also be in the partition of the endpoint you call. Otherwise, the operation returns ValidationException. Each save with Enabled true verifies the topic again after the call returns. To follow it, read LastDeliveryStatus with GetInventoryConfiguration.

A call that repeats the stored configuration returns it, even while a previous change is still being set up. To retry a failed setup, repeat the call with Status ENABLED after ProvisioningStatus is FAILED. With ExpiryNotification Enabled true, a repeated call also verifies the topic again.

InventoryTier names the organization's ACM plan: Essentials or Pro. It is optional. Omit it to keep the current plan. While the organization has no plan, such as on the first call, a call with Status ENABLED must name one. Otherwise, it returns ValidationException. With Status ENABLED, the named plan is the plan to subscribe to. The first plan and a higher plan take effect immediately. A lower plan takes effect at the end of the billing period.

With Status DISABLED, InventoryTier is ignored. Certificate actions turn off immediately. The plan ends at the end of the billing period, and collection stays on until then. Repeating the DISABLED call before then does not change the plan again. If the organization has no plan, a DISABLED call turns collection off immediately.

Until the plan ends, a Status ENABLED call that omits InventoryTier leaves the end in place. To read the scheduled end, use InventoryTierConfiguration.ScheduledChange in GetInventoryConfiguration. A call that names the ending plan returns ConflictException. A call that names the other plan replaces the scheduled end with that plan. A scheduled downgrade cannot be taken back either. While one is scheduled, a call that names the plan in effect returns ConflictException.

Only the management account can start, change, or end the plan. A delegated administrator call that would do so returns AccessDeniedException. A delegated administrator call succeeds when it omits InventoryTier or names the plan last requested. While the plan is scheduled to end, there is no requested plan, so a delegated administrator call that names any plan returns AccessDeniedException. The response does not include the plan. Read InventoryTierConfiguration with GetInventoryConfiguration, which can take a few seconds to show a change.

Examples:

Example: Collect from two Regions and every account


# DataRetentionDays is omitted, so data is kept for 90 days. Setup is still running when the call returns.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  inventory_tier: "ESSENTIALS", 
  regional_scope: {
    mode: "INCLUDE", 
    regions: [
      "us-east-1", 
      "eu-west-1", 
    ], 
  }, 
  status: "ENABLED", 
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLING", 
    regional_scope: {
      mode: "INCLUDE", 
      regions: [
        "us-east-1", 
        "eu-west-1", 
      ], 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Turn on collection and certificate actions


# The organization's first call. Setup in the member accounts is still running when the call returns.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  inventory_tier: "PRO", 
  lifecycle_management: {
    status: "ENABLED", 
  }, 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    lifecycle_management: {
      provisioning_status: "ENABLING", 
      status: "ENABLED", 
    }, 
    provisioning_status: "ENABLING", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Turn on expiry notifications


# Notifications go daily to an Amazon SNS topic in the management account and home Region. They start 30 days before a
# certificate expires. The topic is verified after the call returns.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  expiry_notification: {
    channel: "SNS", 
    enabled: true, 
    frequency: "DAILY", 
    lead_time_days: 30, 
    topic_arn: "arn:aws:sns:us-east-1:111122223333:cert-expiry", 
  }, 
  inventory_tier: "ESSENTIALS", 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      channel: "SNS", 
      enabled: true, 
      frequency: "DAILY", 
      lead_time_days: 30, 
      topic_arn: "arn:aws:sns:us-east-1:111122223333:cert-expiry", 
    }, 
    home_region: "us-east-1", 
    last_delivery_status: {
      status: "PENDING_VERIFICATION", 
    }, 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLING", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Put the configuration from another Region


# The configuration's home Region is us-east-1, and this call was made in eu-west-1.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

Example: Turn off collection and end the ACM plan


# The organization is on the Pro plan. The plan ends at the end of the billing period, and collection stays on until then.
# GetInventoryConfiguration reports the scheduled end.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "DISABLED", 
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLED", 
    regional_scope: {
      mode: "ALL_REGIONS", 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Change the Regions from the delegated administrator


# The delegated administrator narrows collection to two Regions. InventoryTier is omitted, so the organization's ACM plan
# is unchanged.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  regional_scope: {
    mode: "INCLUDE", 
    regions: [
      "us-east-1", 
      "eu-west-1", 
    ], 
  }, 
  status: "ENABLED", 
})

resp.to_h outputs the following:
{
  configuration: {
    account_scope: {
      mode: "ALL_ACCOUNTS", 
    }, 
    data_retention_days: 90, 
    expiry_notification: {
      enabled: false, 
      frequency: "ONCE", 
      lead_time_days: 7, 
    }, 
    home_region: "us-east-1", 
    lifecycle_management: {
      provisioning_status: "DISABLED", 
      status: "DISABLED", 
    }, 
    provisioning_status: "ENABLING", 
    regional_scope: {
      mode: "INCLUDE", 
      regions: [
        "us-east-1", 
        "eu-west-1", 
      ], 
    }, 
    status: "ENABLED", 
  }, 
}

Example: Turn on collection without an ACM plan


# The organization's first call omits InventoryTier. The message calls the ACM plan a tier.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

Example: Change the ACM plan from the delegated administrator


# The organization is on the Essentials plan, and the delegated administrator asks for Pro. Only the management account
# can change the plan. The message calls the ACM plan a tier.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  inventory_tier: "PRO", 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

Example: Turn collection back on before the ACM plan ends


# The Pro plan is scheduled to end on December 1, 2026, and the call asks for Pro again before then. The message calls the
# ACM plan a tier.

resp = client.put_inventory_configuration({
  account_scope: {
    mode: "ALL_ACCOUNTS", 
  }, 
  inventory_tier: "PRO", 
  regional_scope: {
    mode: "ALL_REGIONS", 
  }, 
  status: "ENABLED", 
})

Request syntax with placeholder values


resp = client.put_inventory_configuration({
  regional_scope: { # required
    mode: "ALL_REGIONS", # required, accepts ALL_REGIONS, INCLUDE, EXCLUDE
    regions: ["Region"],
  },
  account_scope: { # required
    mode: "ALL_ACCOUNTS", # required, accepts ALL_ACCOUNTS, INCLUDE, EXCLUDE
    organizational_unit_ids: ["OrganizationalUnitId"],
    account_ids: ["AccountId"],
  },
  data_retention_days: 1,
  status: "ENABLED", # required, accepts ENABLED, DISABLED
  lifecycle_management: {
    status: "ENABLED", # required, accepts ENABLED, DISABLED
  },
  expiry_notification: {
    enabled: false,
    channel: "SNS", # accepts SNS
    topic_arn: "InventoryNotificationTopicArn",
    lead_time_days: 1,
    frequency: "ONCE", # accepts ONCE, DAILY, WEEKLY
  },
  inventory_tier: "ESSENTIALS", # accepts ESSENTIALS, PRO
})

Response structure


resp.configuration.regional_scope.mode #=> String, one of "ALL_REGIONS", "INCLUDE", "EXCLUDE"
resp.configuration.regional_scope.regions #=> Array
resp.configuration.regional_scope.regions[0] #=> String
resp.configuration..mode #=> String, one of "ALL_ACCOUNTS", "INCLUDE", "EXCLUDE"
resp.configuration..organizational_unit_ids #=> Array
resp.configuration..organizational_unit_ids[0] #=> String
resp.configuration.. #=> Array
resp.configuration..[0] #=> String
resp.configuration.data_retention_days #=> Integer
resp.configuration.status #=> String, one of "ENABLED", "DISABLED"
resp.configuration.provisioning_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "FAILED"
resp.configuration.provisioning_status_reason.code #=> String, one of "TRUSTED_ACCESS_DISABLED", "INTERNAL_FAILURE"
resp.configuration.provisioning_status_reason.message #=> String
resp.configuration.home_region #=> String
resp.configuration.lifecycle_management.status #=> String, one of "ENABLED", "DISABLED"
resp.configuration.lifecycle_management.provisioning_status #=> String, one of "ENABLING", "ENABLED", "DISABLING", "DISABLED", "FAILED"
resp.configuration.lifecycle_management.provisioning_status_reason.code #=> String, one of "TRUSTED_ACCESS_DISABLED", "INTERNAL_FAILURE"
resp.configuration.lifecycle_management.provisioning_status_reason.message #=> String
resp.configuration.expiry_notification.enabled #=> Boolean
resp.configuration.expiry_notification.channel #=> String, one of "SNS"
resp.configuration.expiry_notification.topic_arn #=> String
resp.configuration.expiry_notification.lead_time_days #=> Integer
resp.configuration.expiry_notification.frequency #=> String, one of "ONCE", "DAILY", "WEEKLY"
resp.configuration.last_delivery_status.status #=> String, one of "PENDING_VERIFICATION", "VERIFIED", "VERIFICATION_FAILED", "DELIVERED", "DELIVERY_FAILED"
resp.configuration.last_delivery_status.updated_at #=> Time
resp.configuration.last_delivery_status.message #=> String
resp.configuration.inventory_tier_configuration.tier #=> String, one of "ESSENTIALS", "PRO"
resp.configuration.inventory_tier_configuration.status #=> String, one of "PENDING", "ACTIVE"
resp.configuration.inventory_tier_configuration.scheduled_change.tier #=> String, one of "ESSENTIALS", "PRO"
resp.configuration.inventory_tier_configuration.scheduled_change.effective_at #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :regional_scope (required, Types::RegionalScope) —

    The Regions to collect from.

  • :account_scope (required, Types::AccountScope) —

    The accounts to collect from.

  • :data_retention_days (Integer) —

    How many days inventory data is kept, 90 to 365. When omitted, retention is set to 90 days, even if a different value is stored.

  • :status (required, String) —

    ENABLED turns collection on. DISABLED turns collection off and keeps an existing configuration.

    If the organization has an ACM plan, DISABLED instead ends the plan at the end of the billing period. Collection stays on until then, and the configuration's Status stays ENABLED. To see when the plan ends, read InventoryTierConfiguration.ScheduledChange with GetInventoryConfiguration. Certificate actions for organizations still turn off immediately. Without a plan, DISABLED turns collection off immediately.

    DISABLED cannot create the organization's first configuration.

  • :lifecycle_management (Types::LifecycleManagement) —

    Turns Certificate actions for organizations on or off. Certificate actions are the operations that act on certificates and certificate authorities in the organization's member accounts, such as RenewMemberCertificate. Omit it to keep the stored value.

  • :expiry_notification (Types::InventoryExpiryNotification) —

    Certificate expiry notifications. Omit it to keep the stored setting. Set Enabled to false to turn notifications off. Members you leave out of ExpiryNotification take their defaults.

  • :inventory_tier (String) —

    The organization's ACM plan: Essentials or Pro. This API calls the ACM plan the inventory tier. Omit it to keep the current plan. With Status ENABLED, this is the plan to subscribe to. While the organization has no plan, such as on the first call, a call with Status ENABLED must name one. Otherwise, it returns ValidationException. With Status DISABLED, it is ignored, and the plan ends at the end of the billing period.

    Only the organization's management account can start, change, or end the plan. A delegated administrator call that would do so returns AccessDeniedException, even when its IAM policy allows the action. PutInventoryConfiguration never returns the plan.

    A template or script that always sends the same plan undoes a plan set another way. For example, it changes an upgrade made in the console back to the plan it sends. To leave the plan as it is, omit InventoryTier.

Returns:

See Also:



3744
3745
3746
3747
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3744

def put_inventory_configuration(params = {}, options = {})
  req = build_request(:put_inventory_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.

This action applies only to the certificate resource type. For all other ACM resource types, use UntagResource instead.

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).

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

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

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3798
3799
3800
3801
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3798

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. 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.

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).

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3838
3839
3840
3841
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3838

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

#renew_member_certificate(params = {}) ⇒ Struct

Renews an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization. ACM applies the rules of its RenewCertificate operation, including which certificates it can renew. For details, see RenewCertificate in the AWS Certificate Manager API Reference.

The caller must be the organization's management account or its delegated administrator. The operation acts in the member account and Region that the certificate ARN names. It returns AccessDeniedException in these cases, and, except where noted, the message names the unmet condition:

  • The caller's account is not in an organization, or the organization is not active in AWS Certificate Manager.
  • The caller is neither the management account nor the delegated administrator.
  • The certificate is in the caller's own account. Call the ACM operation in that account instead.
  • The organization has no certificate inventory configuration.
  • Certificate actions for organizations are turned off. Certificate actions are the operations that act on certificates and certificate authorities in member accounts. Turn them on with LifecycleManagement in PutInventoryConfiguration.
  • The certificate's Region is outside the RegionalScope of the configuration.
  • The certificate's account is not an active member of the organization, or is outside the AccountScope of the configuration.
  • The Regions enabled for the certificate's account are not recorded yet.
  • AWS Certificate Manager is not authorized to act in the certificate's account, because the account is not in the organization or access setup there has not finished.

If member operations are not available in the Region you call, the operation returns AccessDeniedException with the message Unauthorized, before any of the checks above. An ARN that is malformed, does not name an ACM certificate, is in another partition, or names an unknown Region also returns AccessDeniedException with the message Unauthorized. A call outside the organization's home Region returns ResourceNotFoundException, and the message names the home Region. A certificate ARN whose Region is not enabled for its account, or where ACM is not available, returns ValidationException. A certificate ARN that is too long for the operation to act on, even within the length limit of CertificateArn, also returns ValidationException.

Errors that ACM returns in the member account are returned as these errors:

  • ResourceNotFoundException: ACM did not find the certificate.
  • ConflictException: ACM reports a conflict, such as a certificate state that does not allow the change.
  • ValidationException: ACM rejects the request, or reports that a quota is reached.
  • ThrottlingException: ACM throttles the call.

Any other error returns InternalServerException.

Examples:

Example: Renew a certificate in a member account


# The delegated administrator renews a certificate that account 444455556666 holds in us-west-2.

resp = client.renew_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
})

resp.to_h outputs the following:
{
}

Example: Renew a certificate that does not exist


# ACM in the member account has no certificate with this ARN.

resp = client.renew_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
})

Request syntax with placeholder values


resp = client.renew_member_certificate({
  certificate_arn: "MemberCertificateArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The ARN of the certificate to renew.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



3936
3937
3938
3939
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 3936

def renew_member_certificate(params = {}, options = {})
  req = build_request(:renew_member_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 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).

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

Examples:

Request syntax with placeholder values


resp = client.request_certificate({
  domain_name: "DomainNameString", # required
  validation_method: "EMAIL", # accepts EMAIL, DNS, HTTP
  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
    export: "ENABLED", # accepts ENABLED, DISABLED
    validation_method: "EMAIL", # accepts EMAIL, DNS, HTTP
  },
  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
  managed_by: "CLOUDFRONT", # accepts CLOUDFRONT
  certificate_usage: "CLIENT_AND_SERVER_AUTH", # accepts CLIENT_AND_SERVER_AUTH, CLIENT_AUTH_ONLY
  root_hierarchy_type: "N2_AMAZON_MANAGED", # accepts N2_AMAZON_MANAGED, N2_SFG2_AMAZON_MANAGED
})

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.

  • :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.

  • :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.

  • :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) —

    You can use this parameter to specify whether to export your certificate.

    Certificate transparency logging opt-out is no longer available. ACM records all public certificates other than Amazon N2 certificates in a certificate transparency log. For more information, see Certificate Transparency Logging.

    You can export public ACM certificates to use with Amazon Web Services services as well as outside the Amazon Web Services Cloud. For more information, see Certificate Manager exportable public certificate.

  • :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

  • :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.

    Algorithms supported for an ACM certificate request include:

    • RSA_2048

    • EC_prime256v1

    • EC_secp384r1

    Other listed algorithms are for imported certificates only.

    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.

    Default: RSA_2048

  • :managed_by (String) —

    Identifies the Amazon Web Services service that manages the certificate issued by ACM.

  • :certificate_usage (String) —

    The Extended Key Usage profile of the certificate. You can specify this parameter only when RootHierarchyType is N2_AMAZON_MANAGED or N2_SFG2_AMAZON_MANAGED. If you specify CertificateUsage with any other root hierarchy type, or without RootHierarchyType, the request fails with a ValidationException.

    • CLIENT_AND_SERVER_AUTH authenticates both the client and the server. Valid for both N2 root hierarchy types.

    • CLIENT_AUTH_ONLY authenticates only the client. Valid only for N2_AMAZON_MANAGED.

    Default: CLIENT_AND_SERVER_AUTH

  • :root_hierarchy_type (String) —

    The root hierarchy from which ACM issues the certificate. Specify one of the following values to request an Amazon N2 certificate:

    • N2_AMAZON_MANAGED – An Amazon N2 certificate that chains to an Amazon N2 root. The maximum validity period, which is also the default, is 395 days.

    • N2_SFG2_AMAZON_MANAGED – An Amazon N2 certificate that chains to an Amazon N2 root cross-signed by Starfield G2. The maximum validity period, which is also the default, is 98 days.

    You cannot specify RootHierarchyType together with CertificateAuthorityArn.

    If you omit this parameter, ACM issues a standard public certificate. A request that specifies any value other than N2_AMAZON_MANAGED or N2_SFG2_AMAZON_MANAGED fails with a ValidationException.

    An Amazon N2 certificate request must specify a ValidationMethod of DNS. Amazon N2 certificates are not recorded in a certificate transparency log.

    A request for a validity period longer than the maximum fails with a ValidationException.

    Algorithms supported for an N2 certificate request include:

    • RSA_2048

    • EC_prime256v1

    • EC_secp384r1

Returns:

See Also:



4211
4212
4213
4214
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4211

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.

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 the following five addresses:

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



4279
4280
4281
4282
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4279

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

#restore_member_certificate_authority(params = {}) ⇒ Struct

Restores a deleted private certificate authority (CA) in a member account of the caller's organization. AWS Private Certificate Authority (AWS Private CA) applies the rules of its RestoreCertificateAuthority operation, including which CAs can be restored and until when. For details, see RestoreCertificateAuthority in the AWS Private CA API Reference.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see UpdateMemberCertificateAuthority.

Examples:

Example: Restore a deleted certificate authority in a member account


# The certificate authority in account 444455556666 was deleted and is still in its permanent deletion period.

resp = client.restore_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
})

resp.to_h outputs the following:
{
}

Example: Restore a certificate authority that is not deleted


# AWS Private CA rejects the request because the certificate authority is not deleted.

resp = client.restore_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
})

Request syntax with placeholder values


resp = client.restore_member_certificate_authority({
  certificate_authority_arn: "MemberCertificateAuthorityArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_authority_arn (required, String) —

    The ARN of the certificate authority to restore.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



4332
4333
4334
4335
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4332

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

#revoke_acme_account(params = {}) ⇒ Struct

Revokes an ACME account, preventing it from requesting or revoking certificates. This operation is irreversible.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_endpoint_arn: "AcmeEndpointArn", # required
  account_url: "String", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint.

  • :account_url (required, String) —

    The URL of the ACME account to revoke.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



4359
4360
4361
4362
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4359

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

#revoke_acme_external_account_binding(params = {}) ⇒ Struct

Revokes an external account binding, preventing new ACME accounts from being registered using this binding. Existing ACME accounts that were previously registered using the binding are not affected and must be revoked separately.

Examples:

Request syntax with placeholder values


resp = client.({
  acme_external_account_binding_arn: "AcmeExternalAccountBindingArn", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_external_account_binding_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME external account binding to revoke.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



4385
4386
4387
4388
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4385

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

#revoke_certificate(params = {}) ⇒ Types::RevokeCertificateResponse

Revokes a public ACM certificate. You can only revoke certificates that have been previously exported.

Once a certificate is revoked, you cannot reuse the certificate. Revoking a certificate is permanent.

Examples:

Request syntax with placeholder values


resp = client.revoke_certificate({
  certificate_arn: "Arn", # required
  revocation_reason: "UNSPECIFIED", # required, accepts UNSPECIFIED, KEY_COMPROMISE, CA_COMPROMISE, AFFILIATION_CHANGED, SUPERCEDED, SUPERSEDED, CESSATION_OF_OPERATION, CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGE_WITHDRAWN, A_A_COMPROMISE
})

Response structure


resp.certificate_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The Amazon Resource Name (ARN) of the public or private certificate that will be revoked. The ARN must have the following form:

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

  • :revocation_reason (required, String) —

    Specifies why you revoked the certificate.

Returns:

See Also:



4424
4425
4426
4427
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4424

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

#revoke_member_certificate(params = {}) ⇒ Types::RevokeMemberCertificateOutput

Revokes an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization, and returns the ARN of the revoked certificate. ACM applies the rules of its RevokeCertificate operation, including which certificates it can revoke. For details, see RevokeCertificate in the AWS Certificate Manager API Reference.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see RenewMemberCertificate.

Examples:

Example: Revoke a certificate in a member account


# The certificate's private key was exposed.

resp = client.revoke_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
  revocation_reason: "KEY_COMPROMISE", 
})

resp.to_h outputs the following:
{
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
}

Example: Revoke a certificate that is already revoked


# ACM in the member account has already revoked the certificate.

resp = client.revoke_member_certificate({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
  revocation_reason: "SUPERSEDED", 
})

Request syntax with placeholder values


resp = client.revoke_member_certificate({
  certificate_arn: "MemberCertificateArn", # required
  revocation_reason: "UNSPECIFIED", # required, accepts UNSPECIFIED, KEY_COMPROMISE, CA_COMPROMISE, AFFILIATION_CHANGED, SUPERCEDED, SUPERSEDED, CESSATION_OF_OPERATION, CERTIFICATE_HOLD, REMOVE_FROM_CRL, PRIVILEGE_WITHDRAWN, A_A_COMPROMISE
})

Response structure


resp.certificate_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The ARN of the certificate to revoke.

  • :revocation_reason (required, String) —

    Why the certificate is revoked.

Returns:

See Also:



4489
4490
4491
4492
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4489

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

#revoke_member_issued_certificate(params = {}) ⇒ Struct

Revokes a certificate that a private certificate authority (CA) in a member account of the caller's organization issued. AWS Private Certificate Authority (AWS Private CA) applies the rules of its RevokeCertificate operation, including which certificates it can revoke. For details, see RevokeCertificate in the AWS Private CA API Reference.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see UpdateMemberCertificateAuthority.

Examples:

Example: Revoke a certificate a member account's certificate authority issued


# The certificate authority in account 444455556666 issued a certificate whose private key was exposed.

resp = client.revoke_member_issued_certificate({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
  certificate_serial: "79:3f:0d:5b:6a:04:12:5e:2c:9c:fb:52:37:35:98:fe", 
  revocation_reason: "KEY_COMPROMISE", 
})

resp.to_h outputs the following:
{
}

Example: Revoke a certificate that is already revoked


# AWS Private CA in the member account has already revoked the certificate.

resp = client.revoke_member_issued_certificate({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
  certificate_serial: "79:3f:0d:5b:6a:04:12:5e:2c:9c:fb:52:37:35:98:fe", 
  revocation_reason: "SUPERSEDED", 
})

Request syntax with placeholder values


resp = client.revoke_member_issued_certificate({
  certificate_authority_arn: "MemberCertificateAuthorityArn", # required
  certificate_serial: "CertificateSerialNumber", # required
  revocation_reason: "UNSPECIFIED", # required, accepts UNSPECIFIED, KEY_COMPROMISE, CERTIFICATE_AUTHORITY_COMPROMISE, AFFILIATION_CHANGED, SUPERSEDED, CESSATION_OF_OPERATION, PRIVILEGE_WITHDRAWN, A_A_COMPROMISE
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_authority_arn (required, String) —

    The ARN of the certificate authority that issued the certificate.

  • :certificate_serial (required, String) —

    The serial number of the certificate to revoke.

  • :revocation_reason (required, String) —

    Why the certificate is revoked.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



4554
4555
4556
4557
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4554

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

#search_certificates(params = {}) ⇒ Types::SearchCertificatesResponse

Retrieves a list of certificates matching search criteria. You can filter certificates by X.509 attributes and ACM specific properties like certificate status, type and renewal eligibility. This operation provides more flexible filtering than ListCertificates by supporting complex filter statements.

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

Examples:

Request syntax with placeholder values


resp = client.search_certificates({
  filter_statement: {
    and: [
      {
        # recursive CertificateFilterStatement
      },
    ],
    or: [
      {
        # recursive CertificateFilterStatement
      },
    ],
    not: {
      # recursive CertificateFilterStatement
    },
    filter: {
      certificate_arn: "Arn",
      x509_attribute_filter: {
        subject: {
          common_name: {
            value: "FilterString", # required
            comparison_operator: "CONTAINS", # required, accepts CONTAINS, EQUALS
          },
        },
        subject_alternative_name: {
          dns_name: {
            value: "FilterString", # required
            comparison_operator: "CONTAINS", # required, accepts CONTAINS, EQUALS
          },
        },
        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_algorithm: "RSA_1024", # accepts RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1
        serial_number: "SerialNumber",
        not_after: {
          start: Time.now,
          end: Time.now,
        },
        not_before: {
          start: Time.now,
          end: Time.now,
        },
      },
      acm_certificate_metadata_filter: {
        status: "PENDING_VALIDATION", # accepts PENDING_VALIDATION, ISSUED, INACTIVE, EXPIRED, VALIDATION_TIMED_OUT, REVOKED, FAILED
        renewal_status: "PENDING_AUTO_RENEWAL", # accepts PENDING_AUTO_RENEWAL, PENDING_VALIDATION, SUCCESS, FAILED
        type: "IMPORTED", # accepts IMPORTED, AMAZON_ISSUED, PRIVATE
        in_use: false,
        exported: false,
        export_option: "ENABLED", # accepts ENABLED, DISABLED
        managed_by: "CLOUDFRONT", # accepts CLOUDFRONT
        validation_method: "EMAIL", # accepts EMAIL, DNS, HTTP
        certificate_key_pair_origin: "AWS_MANAGED", # accepts AWS_MANAGED, ACME, CUSTOMER_PROVIDED
        acme_endpoint_arn: "Arn",
        acme_account_id: "AcmeAccountId",
        root_hierarchy_type: "N2_AMAZON_MANAGED", # accepts N2_AMAZON_MANAGED, N2_SFG2_AMAZON_MANAGED
      },
    },
  },
  max_results: 1,
  next_token: "NextToken",
  sort_by: "CREATED_AT", # accepts CREATED_AT, NOT_AFTER, STATUS, RENEWAL_STATUS, EXPORTED, IN_USE, NOT_BEFORE, KEY_ALGORITHM, TYPE, CERTIFICATE_ARN, COMMON_NAME, REVOKED_AT, RENEWAL_ELIGIBILITY, ISSUED_AT, MANAGED_BY, EXPORT_OPTION, VALIDATION_METHOD, IMPORTED_AT, ACME_ENDPOINT_ARN, ACME_ACCOUNT_ID, CERTIFICATE_KEY_PAIR_ORIGIN
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
})

Response structure


resp.results #=> Array
resp.results[0].certificate_arn #=> String
resp.results[0].x509_attributes.issuer.common_name #=> String
resp.results[0].x509_attributes.issuer.domain_components #=> Array
resp.results[0].x509_attributes.issuer.domain_components[0] #=> String
resp.results[0].x509_attributes.issuer.country #=> String
resp.results[0].x509_attributes.issuer.custom_attributes #=> Array
resp.results[0].x509_attributes.issuer.custom_attributes[0].object_identifier #=> String
resp.results[0].x509_attributes.issuer.custom_attributes[0].value #=> String
resp.results[0].x509_attributes.issuer.distinguished_name_qualifier #=> String
resp.results[0].x509_attributes.issuer.generation_qualifier #=> String
resp.results[0].x509_attributes.issuer.given_name #=> String
resp.results[0].x509_attributes.issuer.initials #=> String
resp.results[0].x509_attributes.issuer.locality #=> String
resp.results[0].x509_attributes.issuer.organization #=> String
resp.results[0].x509_attributes.issuer.organizational_unit #=> String
resp.results[0].x509_attributes.issuer.pseudonym #=> String
resp.results[0].x509_attributes.issuer.serial_number #=> String
resp.results[0].x509_attributes.issuer.state #=> String
resp.results[0].x509_attributes.issuer.surname #=> String
resp.results[0].x509_attributes.issuer.title #=> String
resp.results[0].x509_attributes.subject.common_name #=> String
resp.results[0].x509_attributes.subject.domain_components #=> Array
resp.results[0].x509_attributes.subject.domain_components[0] #=> String
resp.results[0].x509_attributes.subject.country #=> String
resp.results[0].x509_attributes.subject.custom_attributes #=> Array
resp.results[0].x509_attributes.subject.custom_attributes[0].object_identifier #=> String
resp.results[0].x509_attributes.subject.custom_attributes[0].value #=> String
resp.results[0].x509_attributes.subject.distinguished_name_qualifier #=> String
resp.results[0].x509_attributes.subject.generation_qualifier #=> String
resp.results[0].x509_attributes.subject.given_name #=> String
resp.results[0].x509_attributes.subject.initials #=> String
resp.results[0].x509_attributes.subject.locality #=> String
resp.results[0].x509_attributes.subject.organization #=> String
resp.results[0].x509_attributes.subject.organizational_unit #=> String
resp.results[0].x509_attributes.subject.pseudonym #=> String
resp.results[0].x509_attributes.subject.serial_number #=> String
resp.results[0].x509_attributes.subject.state #=> String
resp.results[0].x509_attributes.subject.surname #=> String
resp.results[0].x509_attributes.subject.title #=> String
resp.results[0].x509_attributes.subject_alternative_names #=> Array
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.common_name #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.domain_components #=> Array
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.domain_components[0] #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.country #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.custom_attributes #=> Array
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.custom_attributes[0].object_identifier #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.custom_attributes[0].value #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.distinguished_name_qualifier #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.generation_qualifier #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.given_name #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.initials #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.locality #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.organization #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.organizational_unit #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.pseudonym #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.serial_number #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.state #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.surname #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].directory_name.title #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].dns_name #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].ip_address #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].other_name.object_identifier #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].other_name.value #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].registered_id #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].rfc_822_name #=> String
resp.results[0].x509_attributes.subject_alternative_names[0].uniform_resource_identifier #=> String
resp.results[0].x509_attributes.extended_key_usages #=> Array
resp.results[0].x509_attributes.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.results[0].x509_attributes.key_algorithm #=> String, one of "RSA_1024", "RSA_2048", "RSA_3072", "RSA_4096", "EC_prime256v1", "EC_secp384r1", "EC_secp521r1"
resp.results[0].x509_attributes.key_usages #=> Array
resp.results[0].x509_attributes.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.results[0].x509_attributes.serial_number #=> String
resp.results[0].x509_attributes.not_after #=> Time
resp.results[0].x509_attributes.not_before #=> Time
resp.results[0]...created_at #=> Time
resp.results[0]...exported #=> Boolean
resp.results[0]...imported_at #=> Time
resp.results[0]...in_use #=> Boolean
resp.results[0]...issued_at #=> Time
resp.results[0]...renewal_eligibility #=> String, one of "ELIGIBLE", "INELIGIBLE"
resp.results[0]...revoked_at #=> Time
resp.results[0]...status #=> String, one of "PENDING_VALIDATION", "ISSUED", "INACTIVE", "EXPIRED", "VALIDATION_TIMED_OUT", "REVOKED", "FAILED"
resp.results[0]...renewal_status #=> String, one of "PENDING_AUTO_RENEWAL", "PENDING_VALIDATION", "SUCCESS", "FAILED"
resp.results[0]...type #=> String, one of "IMPORTED", "AMAZON_ISSUED", "PRIVATE"
resp.results[0]...export_option #=> String, one of "ENABLED", "DISABLED"
resp.results[0]...managed_by #=> String, one of "CLOUDFRONT"
resp.results[0]...validation_method #=> String, one of "EMAIL", "DNS", "HTTP"
resp.results[0]...certificate_key_pair_origin #=> String, one of "AWS_MANAGED", "ACME", "CUSTOMER_PROVIDED"
resp.results[0]...acme_endpoint_arn #=> String
resp.results[0]... #=> String
resp.results[0]...certificate_usage #=> String, one of "CLIENT_AND_SERVER_AUTH", "CLIENT_AUTH_ONLY"
resp.results[0]...root_hierarchy_type #=> String, one of "N2_AMAZON_MANAGED", "N2_SFG2_AMAZON_MANAGED"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :filter_statement (Types::CertificateFilterStatement) —

    A filter statement that defines the search criteria. You can combine multiple filters using AND, OR, and NOT logical operators to create complex queries.

  • :max_results (Integer) —

    The maximum number of results to return in the response. Default is 100.

  • :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.

  • :sort_by (String) —

    Specifies the field to sort results by. Valid values are CREATED_AT, NOT_AFTER, STATUS, RENEWAL_STATUS, EXPORTED, IN_USE, NOT_BEFORE, KEY_ALGORITHM, TYPE, CERTIFICATE_ARN, COMMON_NAME, REVOKED_AT, RENEWAL_ELIGIBILITY, ISSUED_AT, MANAGED_BY, EXPORT_OPTION, VALIDATION_METHOD, and IMPORTED_AT.

  • :sort_order (String) —

    Specifies the order of sorted results. Valid values are ASCENDING or DESCENDING.

Returns:

See Also:



4766
4767
4768
4769
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 4766

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

#search_inventory(params = {}) ⇒ Types::SearchInventoryOutput

Searches Certificate inventory for organizations and returns one page of certificates, with the number that match. The certificate inventory is the set of certificates observed in the organization's accounts.

Filter combines typed predicates with And, Or, and Not. Omit it to search every certificate. These limits apply:

  • An And or Or list holds 1 to 15 statements.
  • Statements nest at most 3 levels deep. Filter itself is level 1, and each statement inside an And, Or, or Not is one level deeper. For example, an And of Not statements that each hold a predicate is 3 levels deep.
  • A filter holds at most 20 predicates in total.

Results are sorted by NotAfter, latest first, unless SortBy and SortOrder say otherwise. To read the next page, repeat the request with the NextToken from the previous response. Keep the same Filter, SortBy, and SortOrder. A NextToken from a search with a different Filter, SortBy, or SortOrder returns ValidationException.

The caller must be the organization's management account or its delegated administrator. If the caller's account is not in an organization, or the caller is neither of these accounts, the operation returns AccessDeniedException. The message names the unmet condition. Before the first PutInventoryConfiguration call, the operation returns ResourceNotFoundException. Until then, only the management account can call it; a delegated administrator receives AccessDeniedException.

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

Examples:

Example: Find certificates for a domain that expire soon


# Certificates for example.com and its subdomains that expire before December 1, 2026. Results are soonest first, one per
# page.

resp = client.search_inventory({
  filter: {
    and: [
      {
        filter: {
          domain: {
            match: "IN_DOMAIN", 
            value: "example.com", 
          }, 
        }, 
      }, 
      {
        filter: {
          not_after: {
            before: Time.parse(1796083200), 
          }, 
        }, 
      }, 
    ], 
  }, 
  max_results: 1, 
  sort_by: "NOT_AFTER", 
  sort_order: "ASCENDING", 
})

resp.to_h outputs the following:
{
  certificates: [
    {
      finding_counts: {
        critical: 0, 
        high: 1, 
        informational: 0, 
        low: 0, 
        medium: 0, 
      }, 
      highest_finding_severity: "HIGH", 
      identifier: "3f8a2c1d9b7e6f504a3c2b1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e91", 
      identity: {
        has_additional_identifiers: false, 
        identifiers: [
          "www.example.com", 
          "example.com", 
        ], 
        subject: "CN=www.example.com", 
      }, 
      material_type: "X509_CERTIFICATE", 
      related_resource_count: 1, 
      usage_count: 2, 
      validity: {
        not_after: Time.parse(1795132799), 
        not_before: Time.parse(1763596800), 
      }, 
      x509_details: {
        issuance_type: "AMAZON_ISSUED", 
        issuer: "CN=Amazon RSA 2048 M03,O=Amazon,C=US", 
        key_algorithm: "RSA_2048", 
        key_size_bits: 2048, 
        not_after: Time.parse(1795132799), 
        not_before: Time.parse(1763596800), 
        serial_number: "0a1b2c3d4e5f60718293a4b5c6d7e8f9", 
        signature_algorithm: "SHA256WITHRSA", 
        subject_alternative_names: [
          "www.example.com", 
          "example.com", 
        ], 
      }, 
    }, 
  ], 
  next_token: "AAEXAMPLENextTokenSearch111111", 
  total_count: 14, 
  total_count_relation: "EXACT", 
}

Example: Search before inventory is set up


# The organization has never called PutInventoryConfiguration.

resp = client.search_inventory({
})

Request syntax with placeholder values


resp = client.search_inventory({
  filter: {
    and: [
      {
        # recursive InventoryFilterStatement
      },
    ],
    or: [
      {
        # recursive InventoryFilterStatement
      },
    ],
    not: {
      # recursive InventoryFilterStatement
    },
    filter: {
      identifier: "ContentHashIdentifier",
      material_type: "X509_CERTIFICATE", # accepts X509_CERTIFICATE
      account_id: "InventoryAccountId",
      region: "InventoryRegion",
      issuance_type: "AMAZON_ISSUED", # accepts AMAZON_ISSUED, PRIVATE_CA_ISSUED, IMPORTED, EXTERNAL, PRIVATE_CA_DIRECT
      key_algorithm: "RSA_1024", # accepts RSA_1024, RSA_2048, RSA_3072, RSA_4096, EC_prime256v1, EC_secp384r1, EC_secp521r1, ED25519, ED448, OTHER
      usage_status: "IN_USE", # accepts IN_USE, NOT_IN_USE
      issuer: "InventoryIssuerDn",
      domain: {
        value: "InventoryDomainName", # required
        match: "EQUALS", # required, accepts EQUALS, IN_DOMAIN, CONTAINS
      },
      not_after: {
        after: Time.now,
        before: Time.now,
      },
      related_resource_type: "ACM_CERTIFICATE", # accepts ACM_CERTIFICATE, PCA_CERTIFICATE, PCA_CERTIFICATE_AUTHORITY
      highest_finding_severity: "CRITICAL", # accepts CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, HEALTHY, NOT_APPLICABLE, NOT_EVALUATED
      acm_certificate_arn: {
        value: "MemberCertificateArn", # required
        match: "CURRENT", # required, accepts CURRENT, ANY
      },
      pca_certificate_arn: "PrivateCaCertificateArn",
      pca_certificate_authority_arn: {
        value: "InventoryCertificateAuthorityArn", # required
        relationship: "ISSUED_BY", # required, accepts ISSUED_BY, CA_CERTIFICATE
      },
      issuer_words: "InventoryIssuerDn",
      signature_algorithm: "InventorySignatureAlgorithm",
    },
  },
  sort_by: "NOT_AFTER", # accepts NOT_AFTER, NOT_BEFORE, USAGE_COUNT, SUBJECT, HIGHEST_FINDING_SEVERITY
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  max_results: 1,
  next_token: "SearchInventoryInputNextTokenString",
})

Response structure


resp.certificates #=> Array
resp.certificates[0].identifier #=> String
resp.certificates[0].material_type #=> String, one of "X509_CERTIFICATE"
resp.certificates[0].validity.not_before #=> Time
resp.certificates[0].validity.not_after #=> Time
resp.certificates[0].identity.subject #=> String
resp.certificates[0].identity.identifiers #=> Array
resp.certificates[0].identity.identifiers[0] #=> String
resp.certificates[0].identity.has_additional_identifiers #=> Boolean
resp.certificates[0].usage_count #=> Integer
resp.certificates[0].finding_counts.critical #=> Integer
resp.certificates[0].finding_counts.high #=> Integer
resp.certificates[0].finding_counts.medium #=> Integer
resp.certificates[0].finding_counts.low #=> Integer
resp.certificates[0].finding_counts.informational #=> Integer
resp.certificates[0].x509_details.issuer #=> String
resp.certificates[0].x509_details.serial_number #=> String
resp.certificates[0].x509_details.not_before #=> Time
resp.certificates[0].x509_details.not_after #=> Time
resp.certificates[0].x509_details.subject_alternative_names #=> Array
resp.certificates[0].x509_details.subject_alternative_names[0] #=> String
resp.certificates[0].x509_details.key_algorithm #=> String, one of "RSA_1024", "RSA_2048", "RSA_3072", "RSA_4096", "EC_prime256v1", "EC_secp384r1", "EC_secp521r1", "ED25519", "ED448", "OTHER"
resp.certificates[0].x509_details.issuance_type #=> String, one of "AMAZON_ISSUED", "PRIVATE_CA_ISSUED", "IMPORTED", "EXTERNAL", "PRIVATE_CA_DIRECT"
resp.certificates[0].x509_details.signature_algorithm #=> String
resp.certificates[0].x509_details.key_size_bits #=> Integer
resp.certificates[0].highest_finding_severity #=> String, one of "CRITICAL", "HIGH", "MEDIUM", "LOW", "INFORMATIONAL", "HEALTHY", "NOT_APPLICABLE", "NOT_EVALUATED"
resp.certificates[0].related_resource_count #=> Integer
resp.next_token #=> String
resp.total_count #=> Integer
resp.total_count_relation #=> String, one of "EXACT", "AT_LEAST"

Parameters:

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

    ({})

Options Hash (params):

  • :filter (Types::InventoryFilterStatement) —

    Which certificates to return. Omit it to return every certificate.

  • :sort_by (String) —

    The field to sort by. Defaults to NOT_AFTER.

  • :sort_order (String) —

    The sort direction. Defaults to DESCENDING.

  • :max_results (Integer) —

    The maximum number of certificates to return, 1 to 100. Defaults to 25.

  • :next_token (String) —

    The NextToken from the previous response, to read the next page.

Returns:

See Also:



5004
5005
5006
5007
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5004

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

#tag_resource(params = {}) ⇒ Struct

Adds one or more tags to an ACM resource. 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.

Use this action for all ACM resource types except the certificate resource type. For certificate resources, use AddTagsToCertificate instead.

To remove one or more tags, use the UntagResource action. To view all of the tags that have been applied to a resource, use the ListTagsForResource action.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The ARN of the ACM resource to which the tag is to be applied.

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

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

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5047
5048
5049
5050
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5047

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

#untag_resource(params = {}) ⇒ Struct

Removes one or more tags from an ACM resource.

Use this action for all ACM resource types except the certificate resource type. For certificate resources, use RemoveTagsFromCertificate instead.

To add one or more tags, use the TagResource action. To view all of the tags that have been applied to a resource, use the ListTagsForResource action.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String) —

    The ARN of the ACM resource from which the tag is to be removed.

  • :tag_keys (required, Array<String>) —

    The key of each tag to remove.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5083
5084
5085
5086
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5083

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

#update_acme_domain_validation(params = {}) ⇒ Struct

Updates the prevalidation configuration of an existing domain validation.

Examples:

Request syntax with placeholder values


resp = client.update_acme_domain_validation({
  acme_domain_validation_arn: "AcmeDomainValidationArn", # required
  prevalidation_options: {
    dns_prevalidation: {
      domain_scope: {
        exact_domain: "ENABLED", # accepts ENABLED, DISABLED
        subdomains: "ENABLED", # accepts ENABLED, DISABLED
        wildcards: "ENABLED", # accepts ENABLED, DISABLED
      },
      hosted_zone_id: "HostedZoneId",
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_domain_validation_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME domain validation to update.

  • :prevalidation_options (Types::PrevalidationOptions) —

    The updated prevalidation options.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5120
5121
5122
5123
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5120

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

#update_acme_endpoint(params = {}) ⇒ Struct

Updates the configuration of an existing ACME endpoint. You can change the authorization behavior, contact requirement, or certificate authority settings.

Examples:

Request syntax with placeholder values


resp = client.update_acme_endpoint({
  acme_endpoint_arn: "AcmeEndpointArn", # required
  authorization_behavior: "PRE_APPROVED", # accepts PRE_APPROVED
  contact: "REQUIRED", # accepts REQUIRED, NOT_REQUIRED
  certificate_authority: {
    public_certificate_authority: {
      allowed_key_algorithms: ["RSA_2048"], # accepts RSA_2048, EC_prime256v1, EC_secp384r1
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :acme_endpoint_arn (required, String) —

    The Amazon Resource Name (ARN) of the ACME endpoint to update.

  • :authorization_behavior (String) —

    The updated authorization behavior.

  • :contact (String) —

    The updated contact requirement.

  • :certificate_authority (Types::CertificateAuthority) —

    The updated certificate authority configuration.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5160
5161
5162
5163
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5160

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

#update_certificate_options(params = {}) ⇒ Struct

Updates certificate options. You can use this operation to change the domain validation method or specify whether to export your certificate. For more information, see Migrate from email to DNS validation and Certificate Manager Exportable Managed Certificates.

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
    export: "ENABLED", # accepts ENABLED, DISABLED
    validation_method: "EMAIL", # accepts EMAIL, DNS, HTTP
  },
})

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 change the domain validation method or specify whether to export your certificate. For more information about migrating from email to DNS validation, see Migrate from email to DNS validation.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5209
5210
5211
5212
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5209

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

#update_member_certificate_authority(params = {}) ⇒ Struct

Updates the status or the revocation configuration of a private certificate authority (CA) in a member account of the caller's organization. AWS Private Certificate Authority (AWS Private CA) applies the rules of its UpdateCertificateAuthority operation, including which status changes and revocation settings it accepts. For details, see UpdateCertificateAuthority in the AWS Private CA API Reference.

A parameter you omit is not sent to AWS Private CA, so that setting is unchanged. AWS Private CA writes CRLs to the Amazon S3 bucket named by S3BucketName in its own CrlConfiguration, which you set with AWS Private CA in the member account.

The caller must be the organization's management account or its delegated administrator. The operation acts in the member account and Region that the certificate authority ARN names. It returns AccessDeniedException in these cases, and, except where noted, the message names the unmet condition:

  • The caller's account is not in an organization, or the organization is not active in AWS Certificate Manager.
  • The caller is neither the management account nor the delegated administrator.
  • The certificate authority is in the caller's own account. Call the AWS Private CA operation in that account instead.
  • The organization has no certificate inventory configuration.
  • Certificate actions for organizations are turned off. Certificate actions are the operations that act on certificates and certificate authorities in member accounts. Turn them on with LifecycleManagement in PutInventoryConfiguration.
  • The certificate authority's Region is outside the RegionalScope of the configuration.
  • The certificate authority's account is not an active member of the organization, or is outside the AccountScope of the configuration.
  • The Regions enabled for the certificate authority's account are not recorded yet.
  • AWS Certificate Manager is not authorized to act in the certificate authority's account, because the account is not in the organization or access setup there has not finished.

If member operations are not available in the Region you call, the operation returns AccessDeniedException with the message Unauthorized, before any of the checks above. An ARN that is malformed, does not name an AWS Private CA certificate authority, is in another partition, or names an unknown Region also returns AccessDeniedException with the message Unauthorized. A call outside the organization's home Region returns ResourceNotFoundException, and the message names the home Region. A certificate authority ARN whose Region is not enabled for its account, or where AWS Private CA is not available, returns ValidationException. A certificate authority ARN that is too long for the operation to act on, even within the length limit of CertificateAuthorityArn, also returns ValidationException.

Errors that AWS Private CA returns in the member account are returned as these errors:

  • ResourceNotFoundException: AWS Private CA did not find the certificate authority.
  • ConflictException: AWS Private CA reports a conflict, such as a certificate authority state that does not allow the change.
  • ValidationException: AWS Private CA rejects the request, or reports that a quota is reached.
  • ThrottlingException: AWS Private CA throttles the call.

Any other error returns InternalServerException.

Examples:

Example: Disable a certificate authority in a member account


# The delegated administrator stops the certificate authority in account 444455556666 from issuing certificates.

resp = client.update_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
  status: "DISABLED", 
})

resp.to_h outputs the following:
{
}

Example: Update a certificate authority that does not exist


# AWS Private CA in the member account has no certificate authority with this ARN.

resp = client.update_member_certificate_authority({
  certificate_authority_arn: "arn:aws:acm-pca:us-west-2:444455556666:certificate-authority/12345678-1234-1234-1234-123456789012", 
  revocation_configuration: {
    ocsp_configuration: {
      enabled: true, 
    }, 
  }, 
})

Request syntax with placeholder values


resp = client.update_member_certificate_authority({
  certificate_authority_arn: "MemberCertificateAuthorityArn", # required
  status: "CREATING", # accepts CREATING, PENDING_CERTIFICATE, ACTIVE, DELETED, DISABLED, EXPIRED, FAILED
  revocation_configuration: {
    crl_configuration: {
      enabled: false, # required
      expiration_in_days: 1,
      custom_cname: "PrivateCaCrlConfigurationCustomCnameString",
      s3_object_acl: "PUBLIC_READ", # accepts PUBLIC_READ, BUCKET_OWNER_FULL_CONTROL
      crl_distribution_point_extension_configuration: {
        omit_extension: false, # required
      },
      crl_type: "COMPLETE", # accepts COMPLETE, PARTITIONED
      custom_path: "PrivateCaCrlConfigurationCustomPathString",
    },
    ocsp_configuration: {
      enabled: false, # required
      ocsp_custom_cname: "PrivateCaOcspConfigurationOcspCustomCnameString",
    },
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_authority_arn (required, String) —

    The ARN of the certificate authority to update.

  • :status (String) —

    The status to set. If you omit it, the status is unchanged. AWS Private Certificate Authority (AWS Private CA) decides which values it accepts; see UpdateCertificateAuthority in the AWS Private CA API Reference.

  • :revocation_configuration (Types::PrivateCaRevocationConfiguration) —

    The revocation configuration to set. If you omit it, the configuration is unchanged.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5350
5351
5352
5353
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5350

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

#update_member_certificate_options(params = {}) ⇒ Struct

Updates the options of an AWS Certificate Manager (ACM) certificate in a member account of the caller's organization. ACM applies the rules of its UpdateCertificateOptions operation, including which options can change after a certificate is created. For details, see UpdateCertificateOptions in the AWS Certificate Manager API Reference.

An option you omit is not sent to ACM, so it is unchanged. A request that sets neither Export nor ValidationMethod returns ValidationException.

The caller must be the organization's management account or its delegated administrator, Certificate actions for organizations must be on, and the call must be made in the organization's home Region. For every check and error, see RenewMemberCertificate.

Examples:

Example: Move a certificate in a member account to DNS validation


# The certificate in account 444455556666 uses email validation, and the delegated administrator moves it to DNS
# validation.

resp = client.update_member_certificate_options({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
  options: {
    validation_method: "DNS", 
  }, 
})

resp.to_h outputs the following:
{
}

Example: Update the options of a certificate that does not exist


# ACM in the member account has no certificate with this ARN.

resp = client.update_member_certificate_options({
  certificate_arn: "arn:aws:acm:us-west-2:444455556666:certificate/1a2b3c4d-5678-90ab-cdef-EXAMPLE22222", 
  options: {
    validation_method: "DNS", 
  }, 
})

Request syntax with placeholder values


resp = client.update_member_certificate_options({
  certificate_arn: "MemberCertificateArn", # required
  options: { # required
    export: "ENABLED", # accepts ENABLED, DISABLED
    validation_method: "EMAIL", # accepts EMAIL, DNS, HTTP
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :certificate_arn (required, String) —

    The ARN of the certificate to update.

  • :options (required, Types::AcmCertificateOptions) —

    The options to set. Set at least one. An option you omit is not sent to ACM, so it is unchanged.

Returns:

  • (Struct) —

    Returns an empty response.

See Also:



5421
5422
5423
5424
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5421

def update_member_certificate_options(params = {}, options = {})
  req = build_request(:update_member_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
acme_domain_validation_deleted #describe_acme_domain_validation 5 60
acme_domain_validation_validated #describe_acme_domain_validation 5 60
acme_endpoint_active #describe_acme_endpoint 5 60
acme_endpoint_deleted #describe_acme_endpoint 5 60
certificate_validated #describe_certificate 60 5

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.



5540
5541
5542
5543
5544
# File 'gems/aws-sdk-acm/lib/aws-sdk-acm/client.rb', line 5540

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