untagResource method

Future<void> untagResource({
  1. required String resourceArn,
  2. required List<String> tagKeys,
})

Disassociates a resource from a list of tags. The resource is identified by the ResourceArn input parameter. The tags are identified by the list of keys in the TagKeys input parameter.

May throw ResourceArnRequiredException. May throw ApplicationDoesNotExistException. May throw DeploymentGroupDoesNotExistException. May throw DeploymentConfigDoesNotExistException. May throw TagRequiredException. May throw InvalidTagsToAddException. May throw ArnNotSupportedException. May throw InvalidArnException.

Parameter resourceArn : The Amazon Resource Name (ARN) that specifies from which resource to disassociate the tags with the keys in the TagKeys input parameter.

Parameter tagKeys : A list of keys of Tag objects. The Tag objects identified by the keys are disassociated from the resource specified by the ResourceArn input parameter.

Implementation

Future<void> untagResource({
  required String resourceArn,
  required List<String> tagKeys,
}) async {
  ArgumentError.checkNotNull(resourceArn, 'resourceArn');
  _s.validateStringLength(
    'resourceArn',
    resourceArn,
    1,
    1011,
    isRequired: true,
  );
  ArgumentError.checkNotNull(tagKeys, 'tagKeys');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodeDeploy_20141006.UntagResource'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
      'TagKeys': tagKeys,
    },
  );
}