Assigns one or more tags to a Amazon GameLift Streams resource. Use tags to organize Amazon Web Services resources for a range of purposes. You can assign tags to the following Amazon GameLift Streams resource types:
Learn more
Tagging Amazon Web Services Resources in the Amazon Web Services General Reference
Amazon Web Services Tagging Strategies
Parameters:
-
resource_arn
(Arn)
–
-
tags
(Tags)
–
A list of tags, in the form of key-value pairs, to assign to the specified Amazon GameLift Streams resource.
Raises:
-
AccessDeniedException
–
You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.
-
InternalServerException
–
The service encountered an internal error and is unable to complete the request.
-
ThrottlingException
–
The request was denied due to request throttling. Retry the request after the suggested wait time.
-
ValidationException
–
One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_gameliftstreams/_services/game_lift_streams.py
| def tag_resource(
self,
resource_arn: "capo_gameliftstreams.types.arn.Arn",
tags: "capo_gameliftstreams.types.tags.Tags",
*,
config_overrides: Optional[GameLiftStreamsClientConfig] = None,
) -> "capo_gameliftstreams.types.tag_resource_response.TagResourceResponse":
"""<p>Assigns one or more tags to a Amazon GameLift Streams resource. Use tags to organize Amazon Web Services resources for a range of purposes. You can assign tags to the following Amazon GameLift Streams resource types:</p> <ul> <li> <p>Application</p> </li> <li> <p>StreamGroup</p> </li> </ul> <p> <b>Learn more</b> </p> <p> <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services Resources</a> in the <i>Amazon Web Services General Reference</i> </p> <p> <a href="http://aws.amazon.com/answers/account-management/aws-tagging-strategies/"> Amazon Web Services Tagging Strategies</a> </p>
Args:
resource_arn: <p>The <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> of the Amazon GameLift Streams resource that you want to apply tags to.</p>
tags: <p>A list of tags, in the form of key-value pairs, to assign to the specified Amazon GameLift Streams resource.</p>
Raises:
capo_gameliftstreams.errors.access_denied_exception.AccessDeniedException: <p>You don't have the required permissions to access this Amazon GameLift Streams resource. Correct the permissions before you try again.</p>
capo_gameliftstreams.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error and is unable to complete the request.</p>
capo_gameliftstreams.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. Retry the request after the suggested wait time.</p>
capo_gameliftstreams.errors.validation_exception.ValidationException: <p>One or more parameter values in the request fail to satisfy the specified constraints. Correct the invalid parameter values before retrying the request.</p>
capo_gameliftstreams.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_gameliftstreams.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_gameliftstreams.types.tag_resource_response.TagResourceResponse"
]:
import capo_gameliftstreams._operations.game_lift_streams.tag_resource
output, http_response = (
capo_gameliftstreams._operations.game_lift_streams.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_gameliftstreams.types.tag_resource_request.TagResourceRequest = {
"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
|