tag_resource
¶
tag_resource(
resource_arn: AmazonResourceName,
tags: TagList,
*,
config_overrides: Optional[b2biClientConfig] = None,
) -> None
Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are capability, partnership, profile, transformers and other entities.
There is no response returned from this call.
Parameters:
-
resource_arn(AmazonResourceName) –Specifies an Amazon Resource Name (ARN) for a specific Amazon Web Services resource, such as a capability, partnership, profile, or transformer.
-
tags(TagList) –Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
Raises:
-
InternalServerException–This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.
-
ResourceNotFoundException–Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.
-
ThrottlingException–The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.
-
ValidationException–Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Sample TagResource call
>>> client.tag_resource(resource_arn='arn:aws:b2bi:us-west-2:123456789012:profile/p-60fbc37c87f04fce9', tags=[{'Key': 'sampleKey', 'Value': 'SampleValue'}])