@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class TagSpecification extends Object implements Serializable, Cloneable
The tags to apply to a resource when the resource is being created.
| Constructor and Description |
|---|
TagSpecification() |
| Modifier and Type | Method and Description |
|---|---|
TagSpecification |
clone() |
boolean |
equals(Object obj) |
String |
getResourceType()
The type of resource to tag.
|
List<Tag> |
getTags()
The tags to apply to the resource.
|
int |
hashCode() |
void |
setResourceType(ResourceType resourceType)
The type of resource to tag.
|
void |
setResourceType(String resourceType)
The type of resource to tag.
|
void |
setTags(Collection<Tag> tags)
The tags to apply to the resource.
|
String |
toString()
Returns a string representation of this object.
|
TagSpecification |
withResourceType(ResourceType resourceType)
The type of resource to tag.
|
TagSpecification |
withResourceType(String resourceType)
The type of resource to tag.
|
TagSpecification |
withTags(Collection<Tag> tags)
The tags to apply to the resource.
|
TagSpecification |
withTags(Tag... tags)
The tags to apply to the resource.
|
public void setResourceType(String resourceType)
The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet | fpga-image
| host-reservation | image| import-image-task |
import-snapshot-task | instance | internet-gateway |
ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group | prefix-list
| natgateway | network-acl | network-interface |
reserved-instances |route-table | security-group| snapshot |
spot-fleet-request | spot-instances-request | snapshot |
subnet | traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway | transit-gateway-attachment |
transit-gateway-multicast-domain | transit-gateway-route-table | volume |
vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway
endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
resourceType - The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet |
fpga-image | host-reservation | image|
import-image-task | import-snapshot-task | instance |
internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 |
key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group |
prefix-list | natgateway | network-acl |
network-interface | reserved-instances |route-table |
security-group| snapshot | spot-fleet-request |
spot-instances-request | snapshot | subnet |
traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway |
transit-gateway-attachment | transit-gateway-multicast-domain |
transit-gateway-route-table | volume |vpc |
vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) |
vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
ResourceTypepublic String getResourceType()
The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet | fpga-image
| host-reservation | image| import-image-task |
import-snapshot-task | instance | internet-gateway |
ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group | prefix-list
| natgateway | network-acl | network-interface |
reserved-instances |route-table | security-group| snapshot |
spot-fleet-request | spot-instances-request | snapshot |
subnet | traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway | transit-gateway-attachment |
transit-gateway-multicast-domain | transit-gateway-route-table | volume |
vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway
endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet |
fpga-image | host-reservation | image|
import-image-task | import-snapshot-task | instance |
internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 |
key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group |
prefix-list | natgateway | network-acl |
network-interface | reserved-instances |route-table |
security-group| snapshot | spot-fleet-request |
spot-instances-request | snapshot | subnet |
traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway |
transit-gateway-attachment | transit-gateway-multicast-domain |
transit-gateway-route-table | volume |vpc |
vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) |
vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
ResourceTypepublic TagSpecification withResourceType(String resourceType)
The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet | fpga-image
| host-reservation | image| import-image-task |
import-snapshot-task | instance | internet-gateway |
ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group | prefix-list
| natgateway | network-acl | network-interface |
reserved-instances |route-table | security-group| snapshot |
spot-fleet-request | spot-instances-request | snapshot |
subnet | traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway | transit-gateway-attachment |
transit-gateway-multicast-domain | transit-gateway-route-table | volume |
vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway
endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
resourceType - The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet |
fpga-image | host-reservation | image|
import-image-task | import-snapshot-task | instance |
internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 |
key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group |
prefix-list | natgateway | network-acl |
network-interface | reserved-instances |route-table |
security-group| snapshot | spot-fleet-request |
spot-instances-request | snapshot | subnet |
traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway |
transit-gateway-attachment | transit-gateway-multicast-domain |
transit-gateway-route-table | volume |vpc |
vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) |
vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
ResourceTypepublic void setResourceType(ResourceType resourceType)
The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet | fpga-image
| host-reservation | image| import-image-task |
import-snapshot-task | instance | internet-gateway |
ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group | prefix-list
| natgateway | network-acl | network-interface |
reserved-instances |route-table | security-group| snapshot |
spot-fleet-request | spot-instances-request | snapshot |
subnet | traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway | transit-gateway-attachment |
transit-gateway-multicast-domain | transit-gateway-route-table | volume |
vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway
endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
resourceType - The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet |
fpga-image | host-reservation | image|
import-image-task | import-snapshot-task | instance |
internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 |
key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group |
prefix-list | natgateway | network-acl |
network-interface | reserved-instances |route-table |
security-group| snapshot | spot-fleet-request |
spot-instances-request | snapshot | subnet |
traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway |
transit-gateway-attachment | transit-gateway-multicast-domain |
transit-gateway-route-table | volume |vpc |
vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) |
vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
ResourceTypepublic TagSpecification withResourceType(ResourceType resourceType)
The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet | fpga-image
| host-reservation | image| import-image-task |
import-snapshot-task | instance | internet-gateway |
ipv4pool-ec2 | ipv6pool-ec2 | key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group | prefix-list
| natgateway | network-acl | network-interface |
reserved-instances |route-table | security-group| snapshot |
spot-fleet-request | spot-instances-request | snapshot |
subnet | traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway | transit-gateway-attachment |
transit-gateway-multicast-domain | transit-gateway-route-table | volume |
vpc | vpc-peering-connection | vpc-endpoint (for interface and gateway
endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
resourceType - The type of resource to tag. Currently, the resource types that support tagging on creation are:
capacity-reservation | carrier-gateway | client-vpn-endpoint |
customer-gateway | dedicated-host | dhcp-options |
egress-only-internet-gateway | elastic-ip | elastic-gpu |
export-image-task | export-instance-task | fleet |
fpga-image | host-reservation | image|
import-image-task | import-snapshot-task | instance |
internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 |
key-pair | launch-template |
local-gateway-route-table-vpc-association | placement-group |
prefix-list | natgateway | network-acl |
network-interface | reserved-instances |route-table |
security-group| snapshot | spot-fleet-request |
spot-instances-request | snapshot | subnet |
traffic-mirror-filter | traffic-mirror-session |
traffic-mirror-target | transit-gateway |
transit-gateway-attachment | transit-gateway-multicast-domain |
transit-gateway-route-table | volume |vpc |
vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) |
vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log |
vpn-connection | vpn-gateway.
To tag a resource after it has been created, see CreateTags.
ResourceTypepublic List<Tag> getTags()
The tags to apply to the resource.
public void setTags(Collection<Tag> tags)
The tags to apply to the resource.
tags - The tags to apply to the resource.public TagSpecification withTags(Tag... tags)
The tags to apply to the resource.
NOTE: This method appends the values to the existing list (if any). Use
setTags(java.util.Collection) or withTags(java.util.Collection) if you want to override the
existing values.
tags - The tags to apply to the resource.public TagSpecification withTags(Collection<Tag> tags)
The tags to apply to the resource.
tags - The tags to apply to the resource.public String toString()
toString in class ObjectObject.toString()public TagSpecification clone()