startSigningJob method
- required Destination destination,
- required String profileName,
- required Source source,
- String? clientRequestToken,
- String? profileOwner,
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.
StartSigningJob
.
For a Java example that shows how to use this action, see http://docs.aws.amazon.com/acm/latest/userguide/
May throw ValidationException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw ThrottlingException. May throw TooManyRequestsException. May throw InternalServiceErrorException.
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 {
ArgumentError.checkNotNull(destination, 'destination');
ArgumentError.checkNotNull(profileName, 'profileName');
_s.validateStringLength(
'profileName',
profileName,
2,
64,
isRequired: true,
);
ArgumentError.checkNotNull(source, 'source');
_s.validateStringLength(
'profileOwner',
profileOwner,
12,
12,
);
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);
}