/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace signer
{
/**
* AWS Signer is a fully managed code signing service to help you ensure the
* trust and integrity of your code.
AWS Signer supports the following
* applications:
With code signing for AWS Lambda, you can sign AWS Lambda deployment
* packages. Integrated support is provided for Amazon S3, Amazon
* CloudWatch, and AWS
* CloudTrail. In order to sign code, you create a signing profile and then use
* Signer to sign Lambda zip files in S3.
With code signing for IoT, you
* can sign code for any IoT device that is supported by AWS. IoT code signing is
* available for Amazon FreeRTOS
* and AWS IoT
* Device Management, and is integrated with AWS Certificate Manager
* (ACM). In order to sign code, you import a third-party code signing
* certificate using ACM, and use that to sign updates in Amazon FreeRTOS and AWS
* IoT Device Management.
With code signing for containers …(TBD)
* For more information about AWS Signer, see the AWS
* Signer Developer Guide.
*/
class AWS_SIGNER_API SignerClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef SignerClientConfiguration ClientConfigurationType;
typedef SignerEndpointProvider EndpointProviderType;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SignerClient(const Aws::signer::SignerClientConfiguration& clientConfiguration = Aws::signer::SignerClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SignerClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::signer::SignerClientConfiguration& clientConfiguration = Aws::signer::SignerClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SignerClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::signer::SignerClientConfiguration& clientConfiguration = Aws::signer::SignerClientConfiguration());
/* Legacy constructors due deprecation */
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SignerClient(const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SignerClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SignerClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~SignerClient();
/**
* Adds cross-account permissions to a signing profile.
See Also:
* AWS
* API Reference
*/
virtual Model::AddProfilePermissionOutcome AddProfilePermission(const Model::AddProfilePermissionRequest& request) const;
/**
* A Callable wrapper for AddProfilePermission that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::AddProfilePermissionOutcomeCallable AddProfilePermissionCallable(const AddProfilePermissionRequestT& request) const
{
return SubmitCallable(&SignerClient::AddProfilePermission, request);
}
/**
* An Async wrapper for AddProfilePermission that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void AddProfilePermissionAsync(const AddProfilePermissionRequestT& request, const AddProfilePermissionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::AddProfilePermission, request, handler, context);
}
/**
* 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.
See Also:
AWS
* API Reference
*/
virtual Model::CancelSigningProfileOutcome CancelSigningProfile(const Model::CancelSigningProfileRequest& request) const;
/**
* A Callable wrapper for CancelSigningProfile that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CancelSigningProfileOutcomeCallable CancelSigningProfileCallable(const CancelSigningProfileRequestT& request) const
{
return SubmitCallable(&SignerClient::CancelSigningProfile, request);
}
/**
* An Async wrapper for CancelSigningProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CancelSigningProfileAsync(const CancelSigningProfileRequestT& request, const CancelSigningProfileResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::CancelSigningProfile, request, handler, context);
}
/**
* Returns information about a specific code signing job. You specify the job by
* using the jobId
value that is returned by the
* StartSigningJob operation.
See Also:
AWS
* API Reference
*/
virtual Model::DescribeSigningJobOutcome DescribeSigningJob(const Model::DescribeSigningJobRequest& request) const;
/**
* A Callable wrapper for DescribeSigningJob that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeSigningJobOutcomeCallable DescribeSigningJobCallable(const DescribeSigningJobRequestT& request) const
{
return SubmitCallable(&SignerClient::DescribeSigningJob, request);
}
/**
* An Async wrapper for DescribeSigningJob that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeSigningJobAsync(const DescribeSigningJobRequestT& request, const DescribeSigningJobResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::DescribeSigningJob, request, handler, context);
}
/**
* Retrieves the revocation status of one or more of the signing profile,
* signing job, and signing certificate.
See Also:
AWS
* API Reference
*/
virtual Model::GetRevocationStatusOutcome GetRevocationStatus(const Model::GetRevocationStatusRequest& request) const;
/**
* A Callable wrapper for GetRevocationStatus that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetRevocationStatusOutcomeCallable GetRevocationStatusCallable(const GetRevocationStatusRequestT& request) const
{
return SubmitCallable(&SignerClient::GetRevocationStatus, request);
}
/**
* An Async wrapper for GetRevocationStatus that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetRevocationStatusAsync(const GetRevocationStatusRequestT& request, const GetRevocationStatusResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::GetRevocationStatus, request, handler, context);
}
/**
* Returns information on a specific signing platform.
See Also:
* AWS
* API Reference
*/
virtual Model::GetSigningPlatformOutcome GetSigningPlatform(const Model::GetSigningPlatformRequest& request) const;
/**
* A Callable wrapper for GetSigningPlatform that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetSigningPlatformOutcomeCallable GetSigningPlatformCallable(const GetSigningPlatformRequestT& request) const
{
return SubmitCallable(&SignerClient::GetSigningPlatform, request);
}
/**
* An Async wrapper for GetSigningPlatform that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetSigningPlatformAsync(const GetSigningPlatformRequestT& request, const GetSigningPlatformResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::GetSigningPlatform, request, handler, context);
}
/**
* Returns information on a specific signing profile.
See Also:
* AWS
* API Reference
*/
virtual Model::GetSigningProfileOutcome GetSigningProfile(const Model::GetSigningProfileRequest& request) const;
/**
* A Callable wrapper for GetSigningProfile that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetSigningProfileOutcomeCallable GetSigningProfileCallable(const GetSigningProfileRequestT& request) const
{
return SubmitCallable(&SignerClient::GetSigningProfile, request);
}
/**
* An Async wrapper for GetSigningProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetSigningProfileAsync(const GetSigningProfileRequestT& request, const GetSigningProfileResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::GetSigningProfile, request, handler, context);
}
/**
* Lists the cross-account permissions associated with a signing
* profile.
See Also:
AWS
* API Reference
*/
virtual Model::ListProfilePermissionsOutcome ListProfilePermissions(const Model::ListProfilePermissionsRequest& request) const;
/**
* A Callable wrapper for ListProfilePermissions that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListProfilePermissionsOutcomeCallable ListProfilePermissionsCallable(const ListProfilePermissionsRequestT& request) const
{
return SubmitCallable(&SignerClient::ListProfilePermissions, request);
}
/**
* An Async wrapper for ListProfilePermissions that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListProfilePermissionsAsync(const ListProfilePermissionsRequestT& request, const ListProfilePermissionsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::ListProfilePermissions, request, handler, context);
}
/**
* 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.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListSigningJobsOutcome ListSigningJobs(const Model::ListSigningJobsRequest& request) const;
/**
* A Callable wrapper for ListSigningJobs that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListSigningJobsOutcomeCallable ListSigningJobsCallable(const ListSigningJobsRequestT& request) const
{
return SubmitCallable(&SignerClient::ListSigningJobs, request);
}
/**
* An Async wrapper for ListSigningJobs that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListSigningJobsAsync(const ListSigningJobsRequestT& request, const ListSigningJobsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::ListSigningJobs, request, handler, context);
}
/**
* 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.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListSigningPlatformsOutcome ListSigningPlatforms(const Model::ListSigningPlatformsRequest& request) const;
/**
* A Callable wrapper for ListSigningPlatforms that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListSigningPlatformsOutcomeCallable ListSigningPlatformsCallable(const ListSigningPlatformsRequestT& request) const
{
return SubmitCallable(&SignerClient::ListSigningPlatforms, request);
}
/**
* An Async wrapper for ListSigningPlatforms that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListSigningPlatformsAsync(const ListSigningPlatformsRequestT& request, const ListSigningPlatformsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::ListSigningPlatforms, request, handler, context);
}
/**
* 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.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListSigningProfilesOutcome ListSigningProfiles(const Model::ListSigningProfilesRequest& request) const;
/**
* A Callable wrapper for ListSigningProfiles that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListSigningProfilesOutcomeCallable ListSigningProfilesCallable(const ListSigningProfilesRequestT& request) const
{
return SubmitCallable(&SignerClient::ListSigningProfiles, request);
}
/**
* An Async wrapper for ListSigningProfiles that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListSigningProfilesAsync(const ListSigningProfilesRequestT& request, const ListSigningProfilesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::ListSigningProfiles, request, handler, context);
}
/**
* Returns a list of the tags associated with a signing profile
* resource.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&SignerClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::ListTagsForResource, request, handler, context);
}
/**
* Creates a signing profile. A signing profile is a code signing template that
* can be used to carry out a pre-defined signing job.
See Also:
* AWS
* API Reference
*/
virtual Model::PutSigningProfileOutcome PutSigningProfile(const Model::PutSigningProfileRequest& request) const;
/**
* A Callable wrapper for PutSigningProfile that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PutSigningProfileOutcomeCallable PutSigningProfileCallable(const PutSigningProfileRequestT& request) const
{
return SubmitCallable(&SignerClient::PutSigningProfile, request);
}
/**
* An Async wrapper for PutSigningProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PutSigningProfileAsync(const PutSigningProfileRequestT& request, const PutSigningProfileResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::PutSigningProfile, request, handler, context);
}
/**
* Removes cross-account permissions from a signing profile.
See
* Also:
AWS
* API Reference
*/
virtual Model::RemoveProfilePermissionOutcome RemoveProfilePermission(const Model::RemoveProfilePermissionRequest& request) const;
/**
* A Callable wrapper for RemoveProfilePermission that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::RemoveProfilePermissionOutcomeCallable RemoveProfilePermissionCallable(const RemoveProfilePermissionRequestT& request) const
{
return SubmitCallable(&SignerClient::RemoveProfilePermission, request);
}
/**
* An Async wrapper for RemoveProfilePermission that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void RemoveProfilePermissionAsync(const RemoveProfilePermissionRequestT& request, const RemoveProfilePermissionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::RemoveProfilePermission, request, handler, context);
}
/**
* Changes the state of a signing job to REVOKED. This indicates that the
* signature is no longer valid.
See Also:
AWS
* API Reference
*/
virtual Model::RevokeSignatureOutcome RevokeSignature(const Model::RevokeSignatureRequest& request) const;
/**
* A Callable wrapper for RevokeSignature that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::RevokeSignatureOutcomeCallable RevokeSignatureCallable(const RevokeSignatureRequestT& request) const
{
return SubmitCallable(&SignerClient::RevokeSignature, request);
}
/**
* An Async wrapper for RevokeSignature that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void RevokeSignatureAsync(const RevokeSignatureRequestT& request, const RevokeSignatureResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::RevokeSignature, request, handler, context);
}
/**
* 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.
See Also:
AWS
* API Reference
*/
virtual Model::RevokeSigningProfileOutcome RevokeSigningProfile(const Model::RevokeSigningProfileRequest& request) const;
/**
* A Callable wrapper for RevokeSigningProfile that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::RevokeSigningProfileOutcomeCallable RevokeSigningProfileCallable(const RevokeSigningProfileRequestT& request) const
{
return SubmitCallable(&SignerClient::RevokeSigningProfile, request);
}
/**
* An Async wrapper for RevokeSigningProfile that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void RevokeSigningProfileAsync(const RevokeSigningProfileRequestT& request, const RevokeSigningProfileResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::RevokeSigningProfile, request, handler, context);
}
/**
* Signs a binary payload and returns a signature envelope.
See
* Also:
AWS
* API Reference
*/
virtual Model::SignPayloadOutcome SignPayload(const Model::SignPayloadRequest& request) const;
/**
* A Callable wrapper for SignPayload that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::SignPayloadOutcomeCallable SignPayloadCallable(const SignPayloadRequestT& request) const
{
return SubmitCallable(&SignerClient::SignPayload, request);
}
/**
* An Async wrapper for SignPayload that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void SignPayloadAsync(const SignPayloadRequestT& request, const SignPayloadResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::SignPayload, request, handler, context);
}
/**
* 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. 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 StartSigningJob.
See
* Also:
AWS
* API Reference
*/
virtual Model::StartSigningJobOutcome StartSigningJob(const Model::StartSigningJobRequest& request) const;
/**
* A Callable wrapper for StartSigningJob that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::StartSigningJobOutcomeCallable StartSigningJobCallable(const StartSigningJobRequestT& request) const
{
return SubmitCallable(&SignerClient::StartSigningJob, request);
}
/**
* An Async wrapper for StartSigningJob that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void StartSigningJobAsync(const StartSigningJobRequestT& request, const StartSigningJobResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::StartSigningJob, request, handler, context);
}
/**
* 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.
See Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&SignerClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::TagResource, request, handler, context);
}
/**
* Removes one or more tags from a signing profile. To remove the tags, specify
* a list of tag keys.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&SignerClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&SignerClient::UntagResource, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const SignerClientConfiguration& clientConfiguration);
SignerClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace signer
} // namespace Aws