tagResource method

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

Adds or updates tags for a resource in CodeArtifact.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource that you want to add or update tags for.

Parameter tags : The tags you want to modify or add to the resource.

Implementation

Future<void> tagResource({
  required String resourceArn,
  required List<Tag> tags,
}) async {
  final $query = <String, List<String>>{
    'resourceArn': [resourceArn],
  };
  final $payload = <String, dynamic>{
    'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/tag',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}