removeTagsFromCertificate method

Future<void> removeTagsFromCertificate({
  1. required String certificateArn,
  2. required List<Tag> tags,
})

Remove one or more tags from an ACM certificate. A tag consists of a key-value pair. If you do not specify the value portion of the tag when calling this function, the tag will be removed regardless of value. If you specify a value, the tag is removed only if it is associated with the specified value.

To add tags to a certificate, use the AddTagsToCertificate action. To view all of the tags that have been applied to a specific ACM certificate, use the ListTagsForCertificate action.

May throw ResourceNotFoundException. May throw InvalidArnException. May throw InvalidTagException. May throw TagPolicyException. May throw InvalidParameterException.

Parameter certificateArn : String that contains the ARN of the ACM Certificate with one or more tags that you want to remove. This must be of the form:

arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012

For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

Parameter tags : The key-value pair that defines the tag to remove.

Implementation

Future<void> removeTagsFromCertificate({
  required String certificateArn,
  required List<Tag> tags,
}) async {
  ArgumentError.checkNotNull(certificateArn, 'certificateArn');
  _s.validateStringLength(
    'certificateArn',
    certificateArn,
    20,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tags, 'tags');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CertificateManager.RemoveTagsFromCertificate'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'CertificateArn': certificateArn,
      'Tags': tags,
    },
  );
}