putSigningProfile method

Future<PutSigningProfileResponse> putSigningProfile({
  1. required String platformId,
  2. required String profileName,
  3. SigningPlatformOverrides? overrides,
  4. SignatureValidityPeriod? signatureValidityPeriod,
  5. SigningMaterial? signingMaterial,
  6. Map<String, String>? signingParameters,
  7. Map<String, String>? tags,
})

Creates a signing profile. A signing profile is a code signing template that can be used to carry out a pre-defined signing job. For more information, see http://docs.aws.amazon.com/signer/latest/developerguide/gs-profile.html

May throw ResourceNotFoundException. May throw AccessDeniedException. May throw ValidationException. May throw TooManyRequestsException. May throw InternalServiceErrorException.

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 {
  ArgumentError.checkNotNull(platformId, 'platformId');
  ArgumentError.checkNotNull(profileName, 'profileName');
  _s.validateStringLength(
    'profileName',
    profileName,
    2,
    64,
    isRequired: true,
  );
  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);
}