Adds tags to the specified resource.
Parameters:
-
resource_arn
(Arn)
–
ARN of the resource for which tags need to be added.
-
tags
(TagMap)
–
The tags to be assigned to the Neptune Analytics resource.
The tags are metadata that are specified as a list of key-value pairs:
Key (string) – A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length. It can't be prefixed with aws: and can only contain the set of Unicode characters specified by this Java regular expression: "^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$").
Value (string) – A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length. It can't be prefixed with aws: and can only contain the set of Unicode characters specified by this Java regular expression: "^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$").
Raises:
Source code in docs_src/capo_neptune_graph/_services/neptune_graph.py
| def tag_resource(
self,
resource_arn: "capo_neptune_graph.types.arn.Arn",
tags: "capo_neptune_graph.types.tag_map.TagMap",
*,
config_overrides: Optional[NeptuneGraphClientConfig] = None,
) -> "capo_neptune_graph.types.tag_resource_output.TagResourceOutput":
r"""<p>Adds tags to the specified resource.</p>
Args:
resource_arn: <p>ARN of the resource for which tags need to be added.</p>
tags: <p>The tags to be assigned to the Neptune Analytics resource.</p> <p>The tags are metadata that are specified as a list of key-value pairs:</p> <p> <b>Key</b> (string) – A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length. It can't be prefixed with <code>aws:</code> and can only contain the set of Unicode characters specified by this Java regular expression: <code>"^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$")</code>.</p> <p> <b>Value</b> (string) – A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length. It can't be prefixed with <code>aws:</code> and can only contain the set of Unicode characters specified by this Java regular expression: <code>"^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$")</code>.</p>
Raises:
capo_neptune_graph.errors.internal_server_exception.InternalServerException: <p>A failure occurred on the server.</p>
capo_neptune_graph.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be located.</p>
capo_neptune_graph.errors.throttling_exception.ThrottlingException: <p>The exception was interrupted by throttling.</p>
capo_neptune_graph.errors.validation_exception.ValidationException: <p>A resource could not be validated.</p>
capo_neptune_graph.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_neptune_graph.types.tag_resource_input.TagResourceInput]",
) -> OperationResponse[
"capo_neptune_graph.types.tag_resource_output.TagResourceOutput"
]:
import capo_neptune_graph._operations.amazon_neptune_graph.tag_resource
output, http_response = (
capo_neptune_graph._operations.amazon_neptune_graph.tag_resource.tag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("TagResource")
)
input_: capo_neptune_graph.types.tag_resource_input.TagResourceInput = {
"resource_arn": resource_arn,
"tags": tags,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|