View a markdown version of this page

Tagging software supply chain resources - AWS Continuum

Tagging software supply chain resources

Note

AWS Continuum for software supply chain is in preview release and is subject to change.

You can tag the customer managed policy and the policy exceptions that you create in AWS Continuum for software supply chain. A tag is a key-value pair that you attach to an AWS resource. You can add tags when you create one of these resources, and you can add or remove tags afterward. Only policies and policy exceptions are taggable. You can't tag the service-managed malicious-package baseline.

Tags help you organize your resources and control access to them. To restrict access to policies and exceptions by tag with attribute-based access control (ABAC), see Restrict supply chain access by tag. To create the resources that you tag, see Managing supply chain policies and Managing policy exceptions.

Tagging at create time

You can add tags when you create a policy or a policy exception with the AWS Command Line Interface (AWS CLI). Pass the --tags option to the create-supply-chain-policy or create-supply-chain-policy-exception command. These commands call the CreateSupplyChainPolicy and CreateSupplyChainPolicyException operations. Continuum for software supply chain attaches the tags to the resource as it creates it. In each AWS CLI command, replace region with an AWS Region where Continuum for software supply chain is available, such as us-east-1.

To tag a policy as you create it, run the following command. The output includes the tags:

PROMPT> aws continuum create-supply-chain-policy \ --region region \ --policy file://policy.json \ --tags key1=value1,key2=value2 { "id": "policy-id", "arn": "policy-arn", "policy": { ... }, "createdAt": "timestamp", "updatedAt": "timestamp", "tags": { "key1": "value1", "key2": "value2" } }
Note

If you receive errors when you run AWS CLI commands, see Troubleshooting errors for the AWS CLI in the AWS CLI User Guide. Also, make sure that you're using the most recent AWS CLI version.

To tag a policy exception as you create it, run the following command. The output includes the tags:

PROMPT> aws continuum create-supply-chain-policy-exception \ --region region \ --exception file://exception.json \ --tags key1=value1,key2=value2 { "id": "exception-id", "arn": "exception-arn", "exception": { ... }, "status": "ACTIVE", "createdAt": "timestamp", "updatedAt": "timestamp", "tags": { "key1": "value1", "key2": "value2" } }

Tagging at create time needs no separate continuum:TagResource permission. The create action authorizes the tags through the aws:RequestTag/tag-key and aws:TagKeys condition keys. For the permissions that control access to Continuum for software supply chain, see Identity and access management for AWS Continuum.

For the contents of policy.json and exception.json, see Creating a policy and Creating an exception.

Adding and removing tags

After you create a policy or an exception, you can change its tags with the following AWS CLI commands. Each command takes the resource's ARN.

To add or replace tags on a policy or exception, use the tag-resource command, which calls the TagResource operation. The command produces no output.

PROMPT> aws continuum tag-resource \ --region region \ --resource-arn resource-arn \ --tags key1=value1,key2=value2

To remove tags from a policy or exception, use the untag-resource command, which calls the UntagResource operation. The command produces no output.

PROMPT> aws continuum untag-resource \ --region region \ --resource-arn resource-arn \ --tag-keys key1 key2

To list the tags on a policy or exception, use the list-tags-for-resource command, which calls the ListTagsForResource operation:

PROMPT> aws continuum list-tags-for-resource \ --region region \ --resource-arn resource-arn { "tags": { "key1": "value1", "key2": "value2" } }

The Resource Groups Tagging API doesn't support tagging Continuum for software supply chain policies and exceptions during the preview.

Continuum for software supply chain records the TagResource, UntagResource, and ListTagsForResource operations as CloudTrail management events, with the event source continuum.amazonaws.com. For more information, see Logging AWS Continuum API calls using AWS CloudTrail.

Tag quotas

Tags on Continuum for software supply chain policies and exceptions have the following quotas:

  • Up to 50 tags for each resource.

  • A tag key from 1 to 128 characters.

  • A tag value from 0 to 256 characters.

For more information about quotas, see AWS Continuum quotas.