putSigningProfile method
Creates a signing profile. A signing profile is a code-signing template that can be used to carry out a pre-defined signing job.
May throw AccessDeniedException.
May throw InternalServiceErrorException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
May throw ValidationException.
Parameter platformId :
The ID of the signing platform to be created.
Parameter profileName :
The name of the signing profile to be created.
Parameter overrides :
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).
Parameter signatureValidityPeriod :
The default validity period override for any signature generated using
this signing profile. If unspecified, the default is 135 months.
Parameter signingMaterial :
The AWS Certificate Manager certificate that will be used to sign code
with the new signing profile.
Parameter signingParameters :
Map of key-value pairs for signing. These can include any information that
you want to use during signing.
Parameter tags :
Tags to be associated with the signing profile that is being created.
Implementation
Future<PutSigningProfileResponse> putSigningProfile({
required String platformId,
required String profileName,
SigningPlatformOverrides? overrides,
SignatureValidityPeriod? signatureValidityPeriod,
SigningMaterial? signingMaterial,
Map<String, String>? signingParameters,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'platformId': platformId,
if (overrides != null) 'overrides': overrides,
if (signatureValidityPeriod != null)
'signatureValidityPeriod': signatureValidityPeriod,
if (signingMaterial != null) 'signingMaterial': signingMaterial,
if (signingParameters != null) 'signingParameters': signingParameters,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/signing-profiles/${Uri.encodeComponent(profileName)}',
exceptionFnMap: _exceptionFns,
);
return PutSigningProfileResponse.fromJson(response);
}