Class CfnLaunchTemplate.TagSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnLaunchTemplate.TagSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchTemplate.TagSpecificationProperty>
- Enclosing interface:
CfnLaunchTemplate.TagSpecificationProperty
@Stability(Stable)
public static final class CfnLaunchTemplate.TagSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLaunchTemplate.TagSpecificationProperty>
A builder for
CfnLaunchTemplate.TagSpecificationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.resourceType
(String resourceType) Sets the value ofCfnLaunchTemplate.TagSpecificationProperty.getResourceType()
Sets the value ofCfnLaunchTemplate.TagSpecificationProperty.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
resourceType
@Stability(Stable) public CfnLaunchTemplate.TagSpecificationProperty.Builder resourceType(String resourceType) Sets the value ofCfnLaunchTemplate.TagSpecificationProperty.getResourceType()
- Parameters:
resourceType
- The type of resource to tag. You can specify tags for the following resource types only:instance
|volume
|network-interface
|spot-instances-request
. If the instance does not include the resource type that you specify, the instance launch fails. For example, not all instance types include a volume.To tag a resource after it has been created, see CreateTags .
- Returns:
this
-
tags
@Stability(Stable) public CfnLaunchTemplate.TagSpecificationProperty.Builder tags(List<? extends CfnTag> tags) Sets the value ofCfnLaunchTemplate.TagSpecificationProperty.getTags()
- Parameters:
tags
- The tags to apply to the resource.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLaunchTemplate.TagSpecificationProperty>
- Returns:
- a new instance of
CfnLaunchTemplate.TagSpecificationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-