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 Details

    • Builder

      public Builder()
  • Method Details

    • account

      @Stability(Stable) public ResourceProps.Builder account(String account)
      Sets the value of ResourceProps.getAccount()
      Parameters:
      account - The AWS account ID this resource belongs to.
      Returns:
      this
    • environmentFromArn

      @Stability(Stable) public ResourceProps.Builder environmentFromArn(String environmentFromArn)
      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 or region.

      Returns:
      this
    • physicalName

      @Stability(Stable) public ResourceProps.Builder physicalName(String physicalName)
      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

      @Stability(Stable) public ResourceProps.Builder region(String region)
      Sets the value of ResourceProps.getRegion()
      Parameters:
      region - The AWS region this resource belongs to.
      Returns:
      this
    • build

      @Stability(Stable) public ResourceProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<ResourceProps>
      Returns:
      a new instance of ResourceProps
      Throws:
      NullPointerException - if any required attribute was not provided