Class: Aws::Signer::Client

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

Overview

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

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

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

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

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

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

  • :credentials (required, Aws::CredentialProvider)

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

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

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

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

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

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

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

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

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

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

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

    • Aws.config`

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

    • ENV, ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

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

  • :region (required, String)

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

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

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

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

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

  • :client_side_monitoring (Boolean) — default: false

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

  • :client_side_monitoring_client_id (String) — default: ""

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

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

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

  • :client_side_monitoring_port (Integer) — default: 31000

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

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

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

  • :convert_params (Boolean) — default: true

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

  • :correct_clock_skew (Boolean) — default: true

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

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

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

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :disable_request_compression (Boolean) — default: false

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

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

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

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

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

  • :endpoint_cache_max_threads (Integer) — default: 10

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

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

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

  • :ignore_configured_endpoint_urls (Boolean)

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

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

    The log formatter.

  • :log_level (Symbol) — default: :info

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

  • :logger (Logger)

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

  • :max_attempts (Integer) — default: 3

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

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

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

  • :request_min_compression_size_bytes (Integer) — default: 10240

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

  • :retry_backoff (Proc)

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

  • :retry_base_delay (Float) — default: 0.3

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

  • :retry_jitter (Symbol) — default: :none

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

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

  • :retry_limit (Integer) — default: 3

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

  • :retry_max_delay (Integer) — default: 0

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

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

    Specifies which retry algorithm to use. Values are:

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

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

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

  • :sdk_ua_app_id (String)

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

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

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

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

  • :token_provider (Aws::TokenProvider)

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

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

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

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

  • :use_dualstack_endpoint (Boolean)

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

  • :use_fips_endpoint (Boolean)

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

  • :validate_params (Boolean) — default: true

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

  • :endpoint_provider (Aws::Signer::EndpointProvider)

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

  • :http_continue_timeout (Float) — default: 1

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

  • :http_idle_timeout (Float) — default: 5

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

  • :http_open_timeout (Float) — default: 15

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

  • :http_proxy (URI::HTTP, String)

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

  • :http_read_timeout (Float) — default: 60

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

  • :http_wire_trace (Boolean) — default: false

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

  • :on_chunk_received (Proc)

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

  • :on_chunk_sent (Proc)

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

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

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

  • :ssl_ca_directory (String)

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

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

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



422
423
424
# File 'lib/aws-sdk-signer/client.rb', line 422

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

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



1622
1623
1624
# File 'lib/aws-sdk-signer/client.rb', line 1622

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

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



1625
1626
1627
# File 'lib/aws-sdk-signer/client.rb', line 1625

def errors_module
  Errors
end

Instance Method Details

#add_profile_permission(params = {}) ⇒ Types::AddProfilePermissionResponse

Adds cross-account permissions to a signing profile.

Examples:

Request syntax with placeholder values


resp = client.add_profile_permission({
  profile_name: "ProfileName", # required
  profile_version: "ProfileVersion",
  action: "String", # required
  principal: "String", # required
  revision_id: "String",
  statement_id: "String", # required
})

Response structure


resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The human-readable name of the signing profile.

  • :profile_version (String)

    The version of the signing profile.

  • :action (required, String)

    For cross-account signing. Grant a designated account permission to perform one or more of the following actions. Each action is associated with a specific API’s operations. For more information about cross-account signing, see [Using cross-account signing with signing profiles] in the *AWS Signer Developer Guide*.

    You can designate the following actions to an account.

    • ‘signer:StartSigningJob`. This action isn’t supported for container image workflows. For details, see StartSigningJob.

    • ‘signer:SignPayload`. This action isn’t supported for AWS Lambda workflows. For details, see SignPayload

    • ‘signer:GetSigningProfile`. For details, see GetSigningProfile.

    • ‘signer:RevokeSignature`. For details, see RevokeSignature.

    [1]: docs.aws.amazon.com/signer/latest/developerguide/signing-profile-cross-account.html

  • :principal (required, String)

    The AWS principal receiving cross-account permissions. This may be an IAM role or another AWS account ID.

  • :revision_id (String)

    A unique identifier for the current profile revision.

  • :statement_id (required, String)

    A unique identifier for the cross-account permission statement.

Returns:

See Also:



492
493
494
495
# File 'lib/aws-sdk-signer/client.rb', line 492

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

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

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

Parameters:

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


1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
# File 'lib/aws-sdk-signer/client.rb', line 1487

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config)
  context[:gem_name] = 'aws-sdk-signer'
  context[:gem_version] = '1.59.0'
  Seahorse::Client::Request.new(handlers, context)
end

#cancel_signing_profile(params = {}) ⇒ Struct

Changes the state of an ‘ACTIVE` signing profile to `CANCELED`. A canceled profile is still viewable with the `ListSigningProfiles` operation, but it cannot perform new signing jobs, and is deleted two years after cancelation.

Examples:

Request syntax with placeholder values


resp = client.cancel_signing_profile({
  profile_name: "ProfileName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the signing profile to be canceled.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



517
518
519
520
# File 'lib/aws-sdk-signer/client.rb', line 517

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

#describe_signing_job(params = {}) ⇒ Types::DescribeSigningJobResponse

Returns information about a specific code signing job. You specify the job by using the ‘jobId` value that is returned by the StartSigningJob operation.

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

* successful_signing_job

Examples:

Request syntax with placeholder values


resp = client.describe_signing_job({
  job_id: "JobId", # required
})

Response structure


resp.job_id #=> String
resp.source.s3.bucket_name #=> String
resp.source.s3.key #=> String
resp.source.s3.version #=> String
resp.signing_material.certificate_arn #=> String
resp.platform_id #=> String
resp.platform_display_name #=> String
resp.profile_name #=> String
resp.profile_version #=> String
resp.overrides.signing_configuration.encryption_algorithm #=> String, one of "RSA", "ECDSA"
resp.overrides.signing_configuration.hash_algorithm #=> String, one of "SHA1", "SHA256"
resp.overrides.signing_image_format #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.signing_parameters #=> Hash
resp.signing_parameters["SigningParameterKey"] #=> String
resp.created_at #=> Time
resp.completed_at #=> Time
resp.signature_expires_at #=> Time
resp.requested_by #=> String
resp.status #=> String, one of "InProgress", "Failed", "Succeeded"
resp.status_reason #=> String
resp.revocation_record.reason #=> String
resp.revocation_record.revoked_at #=> Time
resp.revocation_record.revoked_by #=> String
resp.signed_object.s3.bucket_name #=> String
resp.signed_object.s3.key #=> String
resp.job_owner #=> String
resp.job_invoker #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the signing job on input.

Returns:

See Also:



596
597
598
599
# File 'lib/aws-sdk-signer/client.rb', line 596

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

#get_revocation_status(params = {}) ⇒ Types::GetRevocationStatusResponse

Retrieves the revocation status of one or more of the signing profile, signing job, and signing certificate.

Examples:

Request syntax with placeholder values


resp = client.get_revocation_status({
  signature_timestamp: Time.now, # required
  platform_id: "PlatformId", # required
  profile_version_arn: "Arn", # required
  job_arn: "Arn", # required
  certificate_hashes: ["String"], # required
})

Response structure


resp.revoked_entities #=> Array
resp.revoked_entities[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :signature_timestamp (required, Time, DateTime, Date, Integer, String)

    The timestamp of the signature that validates the profile or job.

  • :platform_id (required, String)

    The ID of a signing platform.

  • :profile_version_arn (required, String)

    The version of a signing profile.

  • :job_arn (required, String)

    The ARN of a signing job.

  • :certificate_hashes (required, Array<String>)

    A list of composite signed hashes that identify certificates.

    A certificate identifier consists of a subject certificate TBS hash (signed by the parent CA) combined with a parent CA TBS hash (signed by the parent CA’s CA). Root certificates are defined as their own CA.

    The following example shows how to calculate a hash for this parameter using OpenSSL commands:

    ‘openssl asn1parse -in childCert.pem -strparse 4 -out childCert.tbs`

    ‘openssl sha384 < childCert.tbs -binary > childCertTbsHash`

    ‘openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs`

    ‘openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> certificateHash.hex`

    ‘cat certificateHash.hex | tr -d ’n‘`

Returns:

See Also:



661
662
663
664
# File 'lib/aws-sdk-signer/client.rb', line 661

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

#get_signing_platform(params = {}) ⇒ Types::GetSigningPlatformResponse

Returns information on a specific signing platform.

Examples:

Request syntax with placeholder values


resp = client.get_signing_platform({
  platform_id: "PlatformId", # required
})

Response structure


resp.platform_id #=> String
resp.display_name #=> String
resp.partner #=> String
resp.target #=> String
resp.category #=> String, one of "AWSIoT"
resp.signing_configuration.encryption_algorithm_options.allowed_values #=> Array
resp.signing_configuration.encryption_algorithm_options.allowed_values[0] #=> String, one of "RSA", "ECDSA"
resp.signing_configuration.encryption_algorithm_options.default_value #=> String, one of "RSA", "ECDSA"
resp.signing_configuration.hash_algorithm_options.allowed_values #=> Array
resp.signing_configuration.hash_algorithm_options.allowed_values[0] #=> String, one of "SHA1", "SHA256"
resp.signing_configuration.hash_algorithm_options.default_value #=> String, one of "SHA1", "SHA256"
resp.signing_image_format.supported_formats #=> Array
resp.signing_image_format.supported_formats[0] #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.signing_image_format.default_format #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.max_size_in_mb #=> Integer
resp.revocation_supported #=> Boolean

Parameters:

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

    ({})

Options Hash (params):

  • :platform_id (required, String)

    The ID of the target signing platform.

Returns:

See Also:



712
713
714
715
# File 'lib/aws-sdk-signer/client.rb', line 712

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

#get_signing_profile(params = {}) ⇒ Types::GetSigningProfileResponse

Returns information on a specific signing profile.

Examples:

Request syntax with placeholder values


resp = client.get_signing_profile({
  profile_name: "ProfileName", # required
  profile_owner: "AccountId",
})

Response structure


resp.profile_name #=> String
resp.profile_version #=> String
resp.profile_version_arn #=> String
resp.revocation_record.revocation_effective_from #=> Time
resp.revocation_record.revoked_at #=> Time
resp.revocation_record.revoked_by #=> String
resp.signing_material.certificate_arn #=> String
resp.platform_id #=> String
resp.platform_display_name #=> String
resp.signature_validity_period.value #=> Integer
resp.signature_validity_period.type #=> String, one of "DAYS", "MONTHS", "YEARS"
resp.overrides.signing_configuration.encryption_algorithm #=> String, one of "RSA", "ECDSA"
resp.overrides.signing_configuration.hash_algorithm #=> String, one of "SHA1", "SHA256"
resp.overrides.signing_image_format #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.signing_parameters #=> Hash
resp.signing_parameters["SigningParameterKey"] #=> String
resp.status #=> String, one of "Active", "Canceled", "Revoked"
resp.status_reason #=> String
resp.arn #=> String
resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the target signing profile.

  • :profile_owner (String)

    The AWS account ID of the profile owner.

Returns:

See Also:



777
778
779
780
# File 'lib/aws-sdk-signer/client.rb', line 777

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

#list_profile_permissions(params = {}) ⇒ Types::ListProfilePermissionsResponse

Lists the cross-account permissions associated with a signing profile.

Examples:

Request syntax with placeholder values


resp = client.list_profile_permissions({
  profile_name: "ProfileName", # required
  next_token: "String",
})

Response structure


resp.revision_id #=> String
resp.policy_size_bytes #=> Integer
resp.permissions #=> Array
resp.permissions[0].action #=> String
resp.permissions[0].principal #=> String
resp.permissions[0].statement_id #=> String
resp.permissions[0].profile_version #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    Name of the signing profile containing the cross-account permissions.

  • :next_token (String)

    String for specifying the next set of paginated results.

Returns:

See Also:



819
820
821
822
# File 'lib/aws-sdk-signer/client.rb', line 819

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

#list_signing_jobs(params = {}) ⇒ Types::ListSigningJobsResponse

Lists all your signing jobs. You can use the ‘maxResults` parameter to limit the number of signing jobs that are returned in the response. If additional jobs remain to be listed, AWS Signer returns a `nextToken` value. Use this value in subsequent calls to `ListSigningJobs` to fetch the remaining values. You can continue calling `ListSigningJobs` with your `maxResults` parameter and with new values that Signer returns in the `nextToken` parameter until all of your signing jobs have been returned.

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_signing_jobs({
  status: "InProgress", # accepts InProgress, Failed, Succeeded
  platform_id: "PlatformId",
  requested_by: "RequestedBy",
  max_results: 1,
  next_token: "NextToken",
  is_revoked: false,
  signature_expires_before: Time.now,
  signature_expires_after: Time.now,
  job_invoker: "AccountId",
})

Response structure


resp.jobs #=> Array
resp.jobs[0].job_id #=> String
resp.jobs[0].source.s3.bucket_name #=> String
resp.jobs[0].source.s3.key #=> String
resp.jobs[0].source.s3.version #=> String
resp.jobs[0].signed_object.s3.bucket_name #=> String
resp.jobs[0].signed_object.s3.key #=> String
resp.jobs[0].signing_material.certificate_arn #=> String
resp.jobs[0].created_at #=> Time
resp.jobs[0].status #=> String, one of "InProgress", "Failed", "Succeeded"
resp.jobs[0].is_revoked #=> Boolean
resp.jobs[0].profile_name #=> String
resp.jobs[0].profile_version #=> String
resp.jobs[0].platform_id #=> String
resp.jobs[0].platform_display_name #=> String
resp.jobs[0].signature_expires_at #=> Time
resp.jobs[0].job_owner #=> String
resp.jobs[0].job_invoker #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :status (String)

    A status value with which to filter your results.

  • :platform_id (String)

    The ID of microcontroller platform that you specified for the distribution of your code image.

  • :requested_by (String)

    The IAM principal that requested the signing job.

  • :max_results (Integer)

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

  • :next_token (String)

    String for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of ‘nextToken` from the response that you just received.

  • :is_revoked (Boolean)

    Filters results to return only signing jobs with revoked signatures.

  • :signature_expires_before (Time, DateTime, Date, Integer, String)

    Filters results to return only signing jobs with signatures expiring before a specified timestamp.

  • :signature_expires_after (Time, DateTime, Date, Integer, String)

    Filters results to return only signing jobs with signatures expiring after a specified timestamp.

  • :job_invoker (String)

    Filters results to return only signing jobs initiated by a specified IAM entity.

Returns:

See Also:



918
919
920
921
# File 'lib/aws-sdk-signer/client.rb', line 918

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

#list_signing_platforms(params = {}) ⇒ Types::ListSigningPlatformsResponse

Lists all signing platforms available in AWS Signer that match the request parameters. If additional jobs remain to be listed, Signer returns a ‘nextToken` value. Use this value in subsequent calls to `ListSigningJobs` to fetch the remaining values. You can continue calling `ListSigningJobs` with your `maxResults` parameter and with new values that Signer returns in the `nextToken` parameter until all of your signing jobs have been returned.

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_signing_platforms({
  category: "String",
  partner: "String",
  target: "String",
  max_results: 1,
  next_token: "String",
})

Response structure


resp.platforms #=> Array
resp.platforms[0].platform_id #=> String
resp.platforms[0].display_name #=> String
resp.platforms[0].partner #=> String
resp.platforms[0].target #=> String
resp.platforms[0].category #=> String, one of "AWSIoT"
resp.platforms[0].signing_configuration.encryption_algorithm_options.allowed_values #=> Array
resp.platforms[0].signing_configuration.encryption_algorithm_options.allowed_values[0] #=> String, one of "RSA", "ECDSA"
resp.platforms[0].signing_configuration.encryption_algorithm_options.default_value #=> String, one of "RSA", "ECDSA"
resp.platforms[0].signing_configuration.hash_algorithm_options.allowed_values #=> Array
resp.platforms[0].signing_configuration.hash_algorithm_options.allowed_values[0] #=> String, one of "SHA1", "SHA256"
resp.platforms[0].signing_configuration.hash_algorithm_options.default_value #=> String, one of "SHA1", "SHA256"
resp.platforms[0].signing_image_format.supported_formats #=> Array
resp.platforms[0].signing_image_format.supported_formats[0] #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.platforms[0].signing_image_format.default_format #=> String, one of "JSON", "JSONEmbedded", "JSONDetached"
resp.platforms[0].max_size_in_mb #=> Integer
resp.platforms[0].revocation_supported #=> Boolean
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :category (String)

    The category type of a signing platform.

  • :partner (String)

    Any partner entities connected to a signing platform.

  • :target (String)

    The validation template that is used by the target signing platform.

  • :max_results (Integer)

    The maximum number of results to be returned by this operation.

  • :next_token (String)

    Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of ‘nextToken` from the response that you just received.

Returns:

See Also:



991
992
993
994
# File 'lib/aws-sdk-signer/client.rb', line 991

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

#list_signing_profiles(params = {}) ⇒ Types::ListSigningProfilesResponse

Lists all available signing profiles in your AWS account. Returns only profiles with an ‘ACTIVE` status unless the `includeCanceled` request field is set to `true`. If additional jobs remain to be listed, AWS Signer returns a `nextToken` value. Use this value in subsequent calls to `ListSigningJobs` to fetch the remaining values. You can continue calling `ListSigningJobs` with your `maxResults` parameter and with new values that Signer returns in the `nextToken` parameter until all of your signing jobs have been returned.

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_signing_profiles({
  include_canceled: false,
  max_results: 1,
  next_token: "NextToken",
  platform_id: "PlatformId",
  statuses: ["Active"], # accepts Active, Canceled, Revoked
})

Response structure


resp.profiles #=> Array
resp.profiles[0].profile_name #=> String
resp.profiles[0].profile_version #=> String
resp.profiles[0].profile_version_arn #=> String
resp.profiles[0].signing_material.certificate_arn #=> String
resp.profiles[0].signature_validity_period.value #=> Integer
resp.profiles[0].signature_validity_period.type #=> String, one of "DAYS", "MONTHS", "YEARS"
resp.profiles[0].platform_id #=> String
resp.profiles[0].platform_display_name #=> String
resp.profiles[0].signing_parameters #=> Hash
resp.profiles[0].signing_parameters["SigningParameterKey"] #=> String
resp.profiles[0].status #=> String, one of "Active", "Canceled", "Revoked"
resp.profiles[0].arn #=> String
resp.profiles[0].tags #=> Hash
resp.profiles[0].tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :include_canceled (Boolean)

    Designates whether to include profiles with the status of ‘CANCELED`.

  • :max_results (Integer)

    The maximum number of profiles to be returned.

  • :next_token (String)

    Value for specifying the next set of paginated results to return. After you receive a response with truncated results, use this parameter in a subsequent request. Set it to the value of ‘nextToken` from the response that you just received.

  • :platform_id (String)

    Filters results to return only signing jobs initiated for a specified signing platform.

  • :statuses (Array<String>)

    Filters results to return only signing jobs with statuses in the specified list.

Returns:

See Also:



1065
1066
1067
1068
# File 'lib/aws-sdk-signer/client.rb', line 1065

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

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

Returns a list of the tags associated with a signing profile resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "String", # required
})

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) for the signing profile.

Returns:

See Also:



1094
1095
1096
1097
# File 'lib/aws-sdk-signer/client.rb', line 1094

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

#put_signing_profile(params = {}) ⇒ Types::PutSigningProfileResponse

Creates a signing profile. A signing profile is a code-signing template that can be used to carry out a pre-defined signing job.

Examples:

Request syntax with placeholder values


resp = client.put_signing_profile({
  profile_name: "ProfileName", # required
  signing_material: {
    certificate_arn: "CertificateArn", # required
  },
  signature_validity_period: {
    value: 1,
    type: "DAYS", # accepts DAYS, MONTHS, YEARS
  },
  platform_id: "PlatformId", # required
  overrides: {
    signing_configuration: {
      encryption_algorithm: "RSA", # accepts RSA, ECDSA
      hash_algorithm: "SHA1", # accepts SHA1, SHA256
    },
    signing_image_format: "JSON", # accepts JSON, JSONEmbedded, JSONDetached
  },
  signing_parameters: {
    "SigningParameterKey" => "SigningParameterValue",
  },
  tags: {
    "TagKey" => "TagValue",
  },
})

Response structure


resp.arn #=> String
resp.profile_version #=> String
resp.profile_version_arn #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the signing profile to be created.

  • :signing_material (Types::SigningMaterial)

    The AWS Certificate Manager certificate that will be used to sign code with the new signing profile.

  • :signature_validity_period (Types::SignatureValidityPeriod)

    The default validity period override for any signature generated using this signing profile. If unspecified, the default is 135 months.

  • :platform_id (required, String)

    The ID of the signing platform to be created.

  • :overrides (Types::SigningPlatformOverrides)

    A subfield of ‘platform`. This specifies any different configuration options that you want to apply to the chosen platform (such as a different `hash-algorithm` or `signing-algorithm`).

  • :signing_parameters (Hash<String,String>)

    Map of key-value pairs for signing. These can include any information that you want to use during signing.

  • :tags (Hash<String,String>)

    Tags to be associated with the signing profile that is being created.

Returns:

See Also:



1171
1172
1173
1174
# File 'lib/aws-sdk-signer/client.rb', line 1171

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

#remove_profile_permission(params = {}) ⇒ Types::RemoveProfilePermissionResponse

Removes cross-account permissions from a signing profile.

Examples:

Request syntax with placeholder values


resp = client.remove_profile_permission({
  profile_name: "ProfileName", # required
  revision_id: "String", # required
  statement_id: "String", # required
})

Response structure


resp.revision_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    A human-readable name for the signing profile with permissions to be removed.

  • :revision_id (required, String)

    An identifier for the current revision of the signing profile permissions.

  • :statement_id (required, String)

    A unique identifier for the cross-account permissions statement.

Returns:

See Also:



1209
1210
1211
1212
# File 'lib/aws-sdk-signer/client.rb', line 1209

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

#revoke_signature(params = {}) ⇒ Struct

Changes the state of a signing job to REVOKED. This indicates that the signature is no longer valid.

Examples:

Request syntax with placeholder values


resp = client.revoke_signature({
  job_id: "JobId", # required
  job_owner: "AccountId",
  reason: "RevocationReasonString", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    ID of the signing job to be revoked.

  • :job_owner (String)

    AWS account ID of the job owner.

  • :reason (required, String)

    The reason for revoking the signing job.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1240
1241
1242
1243
# File 'lib/aws-sdk-signer/client.rb', line 1240

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

#revoke_signing_profile(params = {}) ⇒ Struct

Changes the state of a signing profile to REVOKED. This indicates that signatures generated using the signing profile after an effective start date are no longer valid.

Examples:

Request syntax with placeholder values


resp = client.revoke_signing_profile({
  profile_name: "ProfileName", # required
  profile_version: "ProfileVersion", # required
  reason: "RevocationReasonString", # required
  effective_time: Time.now, # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the signing profile to be revoked.

  • :profile_version (required, String)

    The version of the signing profile to be revoked.

  • :reason (required, String)

    The reason for revoking a signing profile.

  • :effective_time (required, Time, DateTime, Date, Integer, String)

    A timestamp for when revocation of a Signing Profile should become effective. Signatures generated using the signing profile after this timestamp are not trusted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1278
1279
1280
1281
# File 'lib/aws-sdk-signer/client.rb', line 1278

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

#sign_payload(params = {}) ⇒ Types::SignPayloadResponse

Signs a binary payload and returns a signature envelope.

Examples:

Request syntax with placeholder values


resp = client.sign_payload({
  profile_name: "ProfileName", # required
  profile_owner: "AccountId",
  payload: "data", # required
  payload_format: "String", # required
})

Response structure


resp.job_id #=> String
resp.job_owner #=> String
resp. #=> Hash
resp.["String"] #=> String
resp.signature #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the signing profile.

  • :profile_owner (String)

    The AWS account ID of the profile owner.

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

    Specifies the object digest (hash) to sign.

  • :payload_format (required, String)

    Payload content type. The single valid type is ‘application/vnd.cncf.notary.payload.v1+json`.

Returns:

See Also:



1326
1327
1328
1329
# File 'lib/aws-sdk-signer/client.rb', line 1326

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

#start_signing_job(params = {}) ⇒ Types::StartSigningJobResponse

Initiates a signing job to be performed on the code provided. Signing jobs are viewable by the ‘ListSigningJobs` operation for two years after they are performed. Note the following requirements:

  • You must create an Amazon S3 source bucket. For more information, see [Creating a Bucket] in the *Amazon S3 Getting Started Guide*.

  • Your S3 source bucket must be version enabled.

  • You must create an S3 destination bucket. AWS Signer uses your S3 destination bucket to write your signed code.

  • You specify the name of the source and destination buckets when calling the ‘StartSigningJob` operation.

  • You must ensure the S3 buckets are from the same Region as the signing profile. Cross-Region signing isn’t supported.

  • You must also specify a request token that identifies your request to Signer.

You can call the DescribeSigningJob and the ListSigningJobs actions after you call ‘StartSigningJob`.

For a Java example that shows how to use this action, see [StartSigningJob].

[1]: docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html [2]: docs.aws.amazon.com/signer/latest/developerguide/api-startsigningjob.html

Examples:

Request syntax with placeholder values


resp = client.start_signing_job({
  source: { # required
    s3: {
      bucket_name: "BucketName", # required
      key: "Key", # required
      version: "Version", # required
    },
  },
  destination: { # required
    s3: {
      bucket_name: "BucketName",
      prefix: "Prefix",
    },
  },
  profile_name: "ProfileName", # required
  client_request_token: "ClientRequestToken", # required
  profile_owner: "AccountId",
})

Response structure


resp.job_id #=> String
resp.job_owner #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :source (required, Types::Source)

    The S3 bucket that contains the object to sign or a BLOB that contains your raw code.

  • :destination (required, Types::Destination)

    The S3 bucket in which to save your signed object. The destination contains the name of your bucket and an optional prefix.

  • :profile_name (required, String)

    The name of the signing profile.

  • :client_request_token (required, String)

    String that identifies the signing request. All calls after the first that use this token return the same response as the first call.

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

  • :profile_owner (String)

    The AWS account ID of the signing profile owner.

Returns:

See Also:



1419
1420
1421
1422
# File 'lib/aws-sdk-signer/client.rb', line 1419

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

#tag_resource(params = {}) ⇒ Struct

Adds one or more tags to a signing profile. Tags are labels that you can use to identify and organize your AWS resources. Each tag consists of a key and an optional value. To specify the signing profile, use its Amazon Resource Name (ARN). To specify the tag, use a key-value pair.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "String", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) for the signing profile.

  • :tags (required, Hash<String,String>)

    One or more tags to be associated with the signing profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



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

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 a signing profile. To remove the tags, specify a list of tag keys.

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) for the signing profile.

  • :tag_keys (required, Array<String>)

    A list of tag keys to be removed from the signing profile.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1478
1479
1480
1481
# File 'lib/aws-sdk-signer/client.rb', line 1478

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, 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 | | ———————- | —————————– | ——– | ————- | | successful_signing_job | #describe_signing_job | 20 | 25 |

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.



1588
1589
1590
1591
1592
# File 'lib/aws-sdk-signer/client.rb', line 1588

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

#waiter_namesObject

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

Deprecated.


1596
1597
1598
# File 'lib/aws-sdk-signer/client.rb', line 1596

def waiter_names
  waiters.keys
end