You can create tags during or after creating a resource such as instance, data flow, or dataset in AWS Supply chain. During the data ingestion process, you can add tags such as dev, test, or prod to data flows created during the data ingestion process in the AWS Supply Chain datasets. You can use these tags to identify a group of resources or a single resource used by the developer.
Parameters:
-
resource_arn
(AscResourceArn)
–
The Amazon Web Services Supply chain resource ARN that needs to be tagged.
-
tags
(TagMap)
–
The tags of the Amazon Web Services Supply chain resource to be created.
Raises:
Examples:
Successful TagResource
>>> client.tag_resource(resource_arn='arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1', tags={'tagKey1': 'tagValue1'})
Source code in docs_src/capo_supplychain/_services/supply_chain.py
| def tag_resource(
self,
resource_arn: "capo_supplychain.types.asc_resource_arn.AscResourceArn",
tags: "capo_supplychain.types.tag_map.TagMap",
*,
config_overrides: Optional[SupplyChainClientConfig] = None,
) -> "capo_supplychain.types.tag_resource_response.TagResourceResponse":
"""<p>You can create tags during or after creating a resource such as instance, data flow, or dataset in AWS Supply chain. During the data ingestion process, you can add tags such as dev, test, or prod to data flows created during the data ingestion process in the AWS Supply Chain datasets. You can use these tags to identify a group of resources or a single resource used by the developer.</p>
Args:
resource_arn: <p>The Amazon Web Services Supply chain resource ARN that needs to be tagged.</p>
tags: <p>The tags of the Amazon Web Services Supply chain resource to be created.</p>
Raises:
capo_supplychain.errors.access_denied_exception.AccessDeniedException: <p>You do not have the required privileges to perform this action.</p>
capo_supplychain.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
capo_supplychain.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_supplychain.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_supplychain.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
capo_supplychain.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_supplychain.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an AWS service.</p>
capo_supplychain.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Successful TagResource
>>> client.tag_resource(resource_arn='arn:aws:scn:us-east-1:123456789012:instance/8850c54e-e187-4fa7-89d4-6370f165174d/data-integration-flows/my_flow1', tags={'tagKey1': 'tagValue1'})
"""
def _handler(
req: "OperationRequest[capo_supplychain.types.tag_resource_request.TagResourceRequest]",
) -> OperationResponse[
"capo_supplychain.types.tag_resource_response.TagResourceResponse"
]:
import capo_supplychain._operations.galaxy_public_api_gateway.tag_resource
output, http_response = (
capo_supplychain._operations.galaxy_public_api_gateway.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_supplychain.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
|