Class: Aws::Signer::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::Signer::Client
- 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
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_profile_permission(params = {}) ⇒ Types::AddProfilePermissionResponse
Adds cross-account permissions to a signing profile.
-
#cancel_signing_profile(params = {}) ⇒ Struct
Changes the state of an ‘ACTIVE` signing profile to `CANCELED`.
-
#describe_signing_job(params = {}) ⇒ Types::DescribeSigningJobResponse
Returns information about a specific code signing job.
-
#get_revocation_status(params = {}) ⇒ Types::GetRevocationStatusResponse
Retrieves the revocation status of one or more of the signing profile, signing job, and signing certificate.
-
#get_signing_platform(params = {}) ⇒ Types::GetSigningPlatformResponse
Returns information on a specific signing platform.
-
#get_signing_profile(params = {}) ⇒ Types::GetSigningProfileResponse
Returns information on a specific signing profile.
-
#list_profile_permissions(params = {}) ⇒ Types::ListProfilePermissionsResponse
Lists the cross-account permissions associated with a signing profile.
-
#list_signing_jobs(params = {}) ⇒ Types::ListSigningJobsResponse
Lists all your signing jobs.
-
#list_signing_platforms(params = {}) ⇒ Types::ListSigningPlatformsResponse
Lists all signing platforms available in AWS Signer that match the request parameters.
-
#list_signing_profiles(params = {}) ⇒ Types::ListSigningProfilesResponse
Lists all available signing profiles in your AWS account.
-
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of the tags associated with a signing profile resource.
-
#put_signing_profile(params = {}) ⇒ Types::PutSigningProfileResponse
Creates a signing profile.
-
#remove_profile_permission(params = {}) ⇒ Types::RemoveProfilePermissionResponse
Removes cross-account permissions from a signing profile.
-
#revoke_signature(params = {}) ⇒ Struct
Changes the state of a signing job to REVOKED.
-
#revoke_signing_profile(params = {}) ⇒ Struct
Changes the state of a signing profile to REVOKED.
-
#sign_payload(params = {}) ⇒ Types::SignPayloadResponse
Signs a binary payload and returns a signature envelope.
-
#start_signing_job(params = {}) ⇒ Types::StartSigningJobResponse
Initiates a signing job to be performed on the code provided.
-
#tag_resource(params = {}) ⇒ Struct
Adds one or more tags to a signing profile.
-
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a signing profile.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
444 445 446 |
# File 'lib/aws-sdk-signer/client.rb', line 444 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (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.
1649 1650 1651 |
# File 'lib/aws-sdk-signer/client.rb', line 1649 def identifier @identifier end |
Class Method Details
.errors_module ⇒ 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.
1652 1653 1654 |
# File 'lib/aws-sdk-signer/client.rb', line 1652 def errors_module Errors end |
Instance Method Details
#add_profile_permission(params = {}) ⇒ Types::AddProfilePermissionResponse
Adds cross-account permissions to a signing profile.
514 515 516 517 |
# File 'lib/aws-sdk-signer/client.rb', line 514 def (params = {}, = {}) req = build_request(:add_profile_permission, params) req.send_request() 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.
1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 |
# File 'lib/aws-sdk-signer/client.rb', line 1509 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::Signer') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-signer' context[:gem_version] = '1.66.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.
539 540 541 542 |
# File 'lib/aws-sdk-signer/client.rb', line 539 def cancel_signing_profile(params = {}, = {}) req = build_request(:cancel_signing_profile, params) req.send_request() 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
618 619 620 621 |
# File 'lib/aws-sdk-signer/client.rb', line 618 def describe_signing_job(params = {}, = {}) req = build_request(:describe_signing_job, params) req.send_request() end |
#get_revocation_status(params = {}) ⇒ Types::GetRevocationStatusResponse
Retrieves the revocation status of one or more of the signing profile, signing job, and signing certificate.
683 684 685 686 |
# File 'lib/aws-sdk-signer/client.rb', line 683 def get_revocation_status(params = {}, = {}) req = build_request(:get_revocation_status, params) req.send_request() end |
#get_signing_platform(params = {}) ⇒ Types::GetSigningPlatformResponse
Returns information on a specific signing platform.
734 735 736 737 |
# File 'lib/aws-sdk-signer/client.rb', line 734 def get_signing_platform(params = {}, = {}) req = build_request(:get_signing_platform, params) req.send_request() end |
#get_signing_profile(params = {}) ⇒ Types::GetSigningProfileResponse
Returns information on a specific signing profile.
799 800 801 802 |
# File 'lib/aws-sdk-signer/client.rb', line 799 def get_signing_profile(params = {}, = {}) req = build_request(:get_signing_profile, params) req.send_request() end |
#list_profile_permissions(params = {}) ⇒ Types::ListProfilePermissionsResponse
Lists the cross-account permissions associated with a signing profile.
841 842 843 844 |
# File 'lib/aws-sdk-signer/client.rb', line 841 def (params = {}, = {}) req = build_request(:list_profile_permissions, params) req.send_request() 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.
940 941 942 943 |
# File 'lib/aws-sdk-signer/client.rb', line 940 def list_signing_jobs(params = {}, = {}) req = build_request(:list_signing_jobs, params) req.send_request() 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.
1013 1014 1015 1016 |
# File 'lib/aws-sdk-signer/client.rb', line 1013 def list_signing_platforms(params = {}, = {}) req = build_request(:list_signing_platforms, params) req.send_request() 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.
1087 1088 1089 1090 |
# File 'lib/aws-sdk-signer/client.rb', line 1087 def list_signing_profiles(params = {}, = {}) req = build_request(:list_signing_profiles, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResponse
Returns a list of the tags associated with a signing profile resource.
1116 1117 1118 1119 |
# File 'lib/aws-sdk-signer/client.rb', line 1116 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() 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.
1193 1194 1195 1196 |
# File 'lib/aws-sdk-signer/client.rb', line 1193 def put_signing_profile(params = {}, = {}) req = build_request(:put_signing_profile, params) req.send_request() end |
#remove_profile_permission(params = {}) ⇒ Types::RemoveProfilePermissionResponse
Removes cross-account permissions from a signing profile.
1231 1232 1233 1234 |
# File 'lib/aws-sdk-signer/client.rb', line 1231 def (params = {}, = {}) req = build_request(:remove_profile_permission, params) req.send_request() end |
#revoke_signature(params = {}) ⇒ Struct
Changes the state of a signing job to REVOKED. This indicates that the signature is no longer valid.
1262 1263 1264 1265 |
# File 'lib/aws-sdk-signer/client.rb', line 1262 def revoke_signature(params = {}, = {}) req = build_request(:revoke_signature, params) req.send_request() 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.
1300 1301 1302 1303 |
# File 'lib/aws-sdk-signer/client.rb', line 1300 def revoke_signing_profile(params = {}, = {}) req = build_request(:revoke_signing_profile, params) req.send_request() end |
#sign_payload(params = {}) ⇒ Types::SignPayloadResponse
Signs a binary payload and returns a signature envelope.
1348 1349 1350 1351 |
# File 'lib/aws-sdk-signer/client.rb', line 1348 def sign_payload(params = {}, = {}) req = build_request(:sign_payload, params) req.send_request() 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
1441 1442 1443 1444 |
# File 'lib/aws-sdk-signer/client.rb', line 1441 def start_signing_job(params = {}, = {}) req = build_request(:start_signing_job, params) req.send_request() 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.
1473 1474 1475 1476 |
# File 'lib/aws-sdk-signer/client.rb', line 1473 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes one or more tags from a signing profile. To remove the tags, specify a list of tag keys.
1500 1501 1502 1503 |
# File 'lib/aws-sdk-signer/client.rb', line 1500 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() 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 |
1615 1616 1617 1618 1619 |
# File 'lib/aws-sdk-signer/client.rb', line 1615 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ 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.
1623 1624 1625 |
# File 'lib/aws-sdk-signer/client.rb', line 1623 def waiter_names waiters.keys end |