startSigningJob method
Initiates a signing job to be performed on the code provided. Signing jobs
are viewable by the ListSigningJobs operation. 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
StartSigningJoboperation. - 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.
StartSigningJob.
For a Java example that shows how to use this action, see StartSigningJob.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter destination :
The S3 bucket in which to save your signed object. The destination
contains the name of your bucket and an optional prefix.
Parameter profileName :
The name of the signing profile.
Parameter source :
The S3 bucket that contains the object to sign or a BLOB that contains
your raw code.
Parameter clientRequestToken :
String that identifies the signing request. All calls after the first that
use this token return the same response as the first call.
Parameter profileOwner :
The AWS account ID of the signing profile owner.
Implementation
Future<StartSigningJobResponse> startSigningJob({
required Destination destination,
required String profileName,
required Source source,
String? clientRequestToken,
String? profileOwner,
}) async {
final $payload = <String, dynamic>{
'destination': destination,
'profileName': profileName,
'source': source,
'clientRequestToken': clientRequestToken ?? _s.generateIdempotencyToken(),
if (profileOwner != null) 'profileOwner': profileOwner,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/signing-jobs',
exceptionFnMap: _exceptionFns,
);
return StartSigningJobResponse.fromJson(response);
}