Add, delete, update, and list tags of an Elastic Beanstalk resource.
For details about resource tagging in Elastic Beanstalk, see Tagging AWS Elastic Beanstalk Application Resources.
You can combine the --add, --update, and --delete subcommand options in a single command. At least one of them is required. You can't combined any of these three subcommand options with --list.
Without any additional arguments, all of these commands list or modify tags of the default environment in the current directory's application. With an environment-name argument, the commands list or modify tags of that environment. With the --resource option, the commands list or modify tags of any Elastic Beanstalk resource – an application, an environment, an application version, a saved configuration, or a custom platform version. Specify the resource by its Amazon Resource Name (ARN).
None of these options are required. If you run eb create without any options, you are prompted to enter or select a value for each setting.
List all tags that are currently applied to the resource.
Apply new tags to the resource. Specify tags as a comma-separated list of key=value pairs. You can't specify keys of existing tags.
Valid values: See Tagging Resources.
Update the values of existing resource tags. Specify tags as a comma-separated list of key=value pairs. You must specify keys of existing tags.
Delete existing resource tags. Specify tags as a comma-separated list of keys. You must specify keys of existing tags.
The AWS Region in which your resource exists.
Default: the configured default region.
For the list of values you can specify for this option, see AWS Elastic Beanstalk in Regions and Endpoints in the Amazon Web Services General Reference.
The ARN of the resource that the command modifies or lists tags for. If not specified, the command refers to the (default or specified) environment in the current directory's application.
Valid values: See one of the sub-topic of Tagging Resources that is specific to the resource you're interested in. These topics show how the resource's ARN is constructed and explain how to get a list of this resource's ARNs that exist for your application or account.
The --list subcommand option displays a list of the resource's tags. The output shows both the tags that Elastic Beanstalk applies by default and your custom tags.
The --add, --update, and --delete subcommand options, when successful, don't have any output. You can add the --verbose option to see detailed output of the command's activity.
The following command successfully adds a tag with the key tag1 and the value value1 to the application's default environment, and at the same time deletes the tag tag2.
The following command successfully adds a tag to a saved configuration within an application.
The following command fails because it tries to update a nonexisting tag.
The following command fails because it tries to update and delete the same key.