Skip to main content

tag resource

Manage tags on cross-product resources

Run ecctl tag resource <action> -h for usage, or ecctl schema tag.resource.<action> --full for the complete, agent-readable spec of every parameter and behavior.

list​

ecctl tag resource list [flags]

List tags for resources or resources by tag

  • Kind: read · Risk: low
APIWhen calledPurpose
ListResourcesByTagWhen --resource-type is specified or --fuzzy-type is specified or --include-all-tags is specified.Read the resource view.
ListTagResourcesWhen --resource-type is not specified and --fuzzy-type is not specified and --include-all-tags is not specified.Read the resource view.
ParameterTypeRequiredDescription
--regionstring✓Alibaba Cloud region
--fieldsstringcomma-separated resource fields to include
--filterkey_valuefilter expression key=value
--fuzzy-typestringreverse lookup matching mode
--include-all-tagsbooleaninclude all resource tags in reverse lookup results
--limitintegermaximum resources to return (default: 100)
--next-tokenstringtoken for the next result page
--resource-typestringresource type for tag reverse lookup

apply​

ecctl tag resource apply [flags]

Apply tags to resources

  • Kind: mutation · Risk: medium
APIWhen calledPurpose
TagResourcesEvery time the command runs.Perform the resource operation.
ParameterTypeRequiredDescription
--arnstring✓resource ARN
--regionstring✓Alibaba Cloud region
--tagkey_value✓tag assignment or filter key=value

remove​

ecctl tag resource remove [flags]

Remove tags from resources

  • Kind: mutation · Risk: high
APIWhen calledPurpose
UntagResourcesEvery time the command runs.Perform the resource operation.
ParameterTypeRequiredDescription
--arnstring✓resource ARN
--regionstring✓Alibaba Cloud region
--tag-keystring✓tag key to remove