Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items.
Do not store sensitive information (like personal data) in tags.
Parameters:
-
configuration_ids
(ConfigurationIdList)
–
A list of configuration items that you want to tag.
-
tags
(TagSet)
–
Tags that you want to associate with one or more configuration items. Specify the tags that you want to create in a key-value format. For example:
{"key": "serverType", "value": "webServer"}
Raises:
Source code in docs_src/capo_application_discovery_service/_services/application_discovery_service.py
| def create_tags(
self,
configuration_ids: "capo_application_discovery_service.types.configuration_id_list.ConfigurationIdList",
tags: "capo_application_discovery_service.types.tag_set.TagSet",
*,
config_overrides: Optional[ApplicationDiscoveryServiceClientConfig] = None,
) -> "capo_application_discovery_service.types.create_tags_response.CreateTagsResponse":
"""<p>Creates one or more tags for configuration items. Tags are metadata that help you categorize IT assets. This API accepts a list of multiple configuration items.</p> <important> <p>Do not store sensitive information (like personal data) in tags.</p> </important>
Args:
configuration_ids: <p>A list of configuration items that you want to tag.</p>
tags: <p>Tags that you want to associate with one or more configuration items. Specify the tags that you want to create in a <i>key</i>-<i>value</i> format. For example:</p> <p> <code>{"key": "serverType", "value": "webServer"}</code> </p>
Raises:
capo_application_discovery_service.errors.authorization_error_exception.AuthorizationErrorException: <p>The user does not have permission to perform the action. Check the IAM policy associated with this user.</p>
capo_application_discovery_service.errors.home_region_not_set_exception.HomeRegionNotSetException: <p>The home Region is not set. Set the home Region to continue.</p>
capo_application_discovery_service.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters are not valid. Verify the parameters and try again.</p>
capo_application_discovery_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value of one or more parameters are either invalid or out of range. Verify the parameter values and try again.</p>
capo_application_discovery_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified configuration ID was not located. Verify the configuration ID and try again.</p>
capo_application_discovery_service.errors.server_internal_error_exception.ServerInternalErrorException: <p>The server experienced an internal error. Try again.</p>
capo_application_discovery_service.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_application_discovery_service.types.create_tags_request.CreateTagsRequest]",
) -> OperationResponse[
"capo_application_discovery_service.types.create_tags_response.CreateTagsResponse"
]:
import capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.create_tags
output, http_response = (
capo_application_discovery_service._operations.aws_poseidon_service_v2015_11_01.create_tags.create_tags(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateTags")
)
input_: capo_application_discovery_service.types.create_tags_request.CreateTagsRequest = {
"configuration_ids": configuration_ids,
"tags": tags,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|