Package software.amazon.awscdk
Class ArnComponents.Builder
java.lang.Object
software.amazon.awscdk.ArnComponents.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ArnComponents>
- Enclosing interface:
ArnComponents
@Stability(Stable)
public static final class ArnComponents.Builder
extends Object
implements software.amazon.jsii.Builder<ArnComponents>
A builder for
ArnComponents
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofArnComponents.getAccount()
Sets the value ofArnComponents.getArnFormat()
build()
Builds the configured instance.Sets the value ofArnComponents.getPartition()
Sets the value ofArnComponents.getRegion()
Sets the value ofArnComponents.getResource()
resourceName
(String resourceName) Sets the value ofArnComponents.getResourceName()
Sets the value ofArnComponents.getService()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
resource
Sets the value ofArnComponents.getResource()
- Parameters:
resource
- Resource type (e.g. "table", "autoScalingGroup", "certificate"). For some resource types, e.g. S3 buckets, this field defines the bucket name. This parameter is required.- Returns:
this
-
service
Sets the value ofArnComponents.getService()
- Parameters:
service
- The service namespace that identifies the AWS product (for example, 's3', 'iam', 'codepipeline'). This parameter is required.- Returns:
this
-
account
Sets the value ofArnComponents.getAccount()
- Parameters:
account
- The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. Note that the ARNs for some resources don't require an account number, so this component might be omitted.- Returns:
this
-
arnFormat
Sets the value ofArnComponents.getArnFormat()
- Parameters:
arnFormat
- The specific ARN format to use for this ARN value.- Returns:
this
-
partition
Sets the value ofArnComponents.getPartition()
- Parameters:
partition
- The partition that the resource is in. For standard AWS regions, the partition is aws. If you have resources in other partitions, the partition is aws-partitionname. For example, the partition for resources in the China (Beijing) region is aws-cn.- Returns:
this
-
region
Sets the value ofArnComponents.getRegion()
- Parameters:
region
- The region the resource resides in. Note that the ARNs for some resources do not require a region, so this component might be omitted.- Returns:
this
-
resourceName
Sets the value ofArnComponents.getResourceName()
- Parameters:
resourceName
- Resource name or path within the resource (i.e. S3 bucket object key) or a wildcard such as"*"
. This is service-dependent.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ArnComponents>
- Returns:
- a new instance of
ArnComponents
- Throws:
NullPointerException
- if any required attribute was not provided
-