Package software.amazon.awscdk
Class ResourceProps.Builder
java.lang.Object
software.amazon.awscdk.ResourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ResourceProps>
- Enclosing interface:
ResourceProps
@Stability(Stable)
public static final class ResourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<ResourceProps>
A builder for
ResourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofResourceProps.getAccount()
build()
Builds the configured instance.environmentFromArn
(String environmentFromArn) Sets the value ofResourceProps.getEnvironmentFromArn()
physicalName
(String physicalName) Sets the value ofResourceProps.getPhysicalName()
Sets the value ofResourceProps.getRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
account
Sets the value ofResourceProps.getAccount()
- Parameters:
account
- The AWS account ID this resource belongs to.- Returns:
this
-
environmentFromArn
Sets the value ofResourceProps.getEnvironmentFromArn()
- Parameters:
environmentFromArn
- ARN to deduce region and account from. The ARN is parsed and the account and region are taken from the ARN. This should be used for imported resources.Cannot be supplied together with either
account
orregion
.- Returns:
this
-
physicalName
Sets the value ofResourceProps.getPhysicalName()
- Parameters:
physicalName
- The value passed in by users to the physical name prop of the resource.undefined
implies that a physical name will be allocated by CloudFormation during deployment.- a concrete value implies a specific physical name
PhysicalName.GENERATE_IF_NEEDED
is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation.
- Returns:
this
-
region
Sets the value ofResourceProps.getRegion()
- Parameters:
region
- The AWS region this resource belongs to.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ResourceProps>
- Returns:
- a new instance of
ResourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-