Class: Aws::Signer::Client

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

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

  • :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[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.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.
  • :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)
  • :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.

  • :disable_host_prefix_injection (Boolean) — default: false

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

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

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

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

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

  • :secret_access_key (String)
  • :session_token (String)
  • :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.

  • :validate_params (Boolean) — default: true

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

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Integer) — default: 60

    The default number of seconds to wait for response data. 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_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_wire_trace (Boolean) — default: false

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

  • :ssl_verify_peer (Boolean) — default: true

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

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



324
325
326
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 324

def initialize(*args)
  super
end

Instance Method Details

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



350
351
352
353
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 350

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.profile_name #=> 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.requested_by #=> String
resp.status #=> String, one of "InProgress", "Failed", "Succeeded"
resp.status_reason #=> String
resp.signed_object.s3.bucket_name #=> String
resp.signed_object.s3.key #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :job_id (required, String)

    The ID of the signing job on input.

Returns:

See Also:



415
416
417
418
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 415

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

Parameters:

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

    ({})

Options Hash (params):

  • :platform_id (required, String)

    The ID of the target signing platform.

Returns:

See Also:



464
465
466
467
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 464

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

Response structure


resp.profile_name #=> String
resp.signing_material.certificate_arn #=> String
resp.platform_id #=> 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.status #=> String, one of "Active", "Canceled"
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.

Returns:

See Also:



510
511
512
513
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 510

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

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

Returns:

See Also:



582
583
584
585
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 582

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 code signing that match the request parameters. If additional jobs remain to be listed, code signing 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 code signing 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.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:



654
655
656
657
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 654

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, code signing 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 code signing 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",
})

Response structure


resp.profiles #=> Array
resp.profiles[0].profile_name #=> String
resp.profiles[0].signing_material.certificate_arn #=> String
resp.profiles[0].platform_id #=> String
resp.profiles[0].signing_parameters #=> Hash
resp.profiles[0].signing_parameters["SigningParameterKey"] #=> String
resp.profiles[0].status #=> String, one of "Active", "Canceled"
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.

Returns:

See Also:



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

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:



742
743
744
745
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 742

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. For more information, see http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html

Examples:

Request syntax with placeholder values


resp = client.put_signing_profile({
  profile_name: "ProfileName", # required
  signing_material: { # required
    certificate_arn: "CertificateArn", # required
  },
  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

Parameters:

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

    ({})

Options Hash (params):

  • :profile_name (required, String)

    The name of the signing profile to be created.

  • :signing_material (required, Types::SigningMaterial)

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

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



813
814
815
816
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 813

def put_signing_profile(params = {}, options = {})
  req = build_request(:put_signing_profile, 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 Create a Bucket in the Amazon S3 Getting Started Guide.

  • Your S3 source bucket must be version enabled.

  • You must create an S3 destination bucket. Code signing 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 also specify a request token that identifies your request to code signing.

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 http://docs.aws.amazon.com/acm/latest/userguide/

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",
  client_request_token: "ClientRequestToken", # required
})

Response structure


resp.job_id #=> 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 (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.**

Returns:

See Also:



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

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:



929
930
931
932
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 929

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:



956
957
958
959
# File 'gems/aws-sdk-signer/lib/aws-sdk-signer/client.rb', line 956

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.



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

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