Package com.hashicorp.cdktf
Class OssBackendConfig.Builder
java.lang.Object
com.hashicorp.cdktf.OssBackendConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<OssBackendConfig>
- Enclosing interface:
OssBackendConfig
@Stability(Experimental)
public static final class OssBackendConfig.Builder
extends Object
implements software.amazon.jsii.Builder<OssBackendConfig>
A builder for
OssBackendConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofOssBackendConfig.getAccessKey()
Sets the value ofOssBackendConfig.getAcl()
assumeRole
(OssAssumeRole assumeRole) Deprecated.Use flattened assume role optionsassumeRolePolicy
(String assumeRolePolicy) Sets the value ofOssBackendConfig.getAssumeRolePolicy()
assumeRoleRoleArn
(String assumeRoleRoleArn) Sets the value ofOssBackendConfig.getAssumeRoleRoleArn()
assumeRoleSessionExpiration
(Number assumeRoleSessionExpiration) Sets the value ofOssBackendConfig.getAssumeRoleSessionExpiration()
assumeRoleSessionName
(String assumeRoleSessionName) Sets the value ofOssBackendConfig.getAssumeRoleSessionName()
Sets the value ofOssBackendConfig.getBucket()
build()
Builds the configured instance.ecsRoleName
(String ecsRoleName) Sets the value ofOssBackendConfig.getEcsRoleName()
Sets the value ofOssBackendConfig.getEncrypt()
Sets the value ofOssBackendConfig.getEndpoint()
Sets the value ofOssBackendConfig.getKey()
Sets the value ofOssBackendConfig.getPrefix()
Sets the value ofOssBackendConfig.getProfile()
Sets the value ofOssBackendConfig.getRegion()
Sets the value ofOssBackendConfig.getSecretKey()
securityToken
(String securityToken) Sets the value ofOssBackendConfig.getSecurityToken()
sharedCredentialsFile
(String sharedCredentialsFile) Sets the value ofOssBackendConfig.getSharedCredentialsFile()
stsEndpoint
(String stsEndpoint) Sets the value ofOssBackendConfig.getStsEndpoint()
tablestoreEndpoint
(String tablestoreEndpoint) Sets the value ofOssBackendConfig.getTablestoreEndpoint()
tablestoreTable
(String tablestoreTable) Sets the value ofOssBackendConfig.getTablestoreTable()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
Sets the value ofOssBackendConfig.getBucket()
- Parameters:
bucket
- (Required) The name of the OSS bucket. This parameter is required.- Returns:
this
-
accessKey
Sets the value ofOssBackendConfig.getAccessKey()
- Parameters:
accessKey
- (Optional) Alibaba Cloud access key. It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.- Returns:
this
-
acl
Sets the value ofOssBackendConfig.getAcl()
- Parameters:
acl
- (Optional) Object ACL to be applied to the state file.- Returns:
this
-
assumeRole
@Stability(Deprecated) @Deprecated public OssBackendConfig.Builder assumeRole(OssAssumeRole assumeRole) Deprecated.Use flattened assume role optionsSets the value ofOssBackendConfig.getAssumeRole()
- Parameters:
assumeRole
- the value to be set.- Returns:
this
-
assumeRolePolicy
Sets the value ofOssBackendConfig.getAssumeRolePolicy()
- Parameters:
assumeRolePolicy
- (Optional, Available in 1.1.0+) A more restrictive policy to apply to the temporary credentials. This gives you a way to further restrict the permissions for the resulting temporary security credentials. You cannot use this policy to grant permissions that exceed those of the role that is being assumed.- Returns:
this
-
assumeRoleRoleArn
@Stability(Experimental) public OssBackendConfig.Builder assumeRoleRoleArn(String assumeRoleRoleArn) Sets the value ofOssBackendConfig.getAssumeRoleRoleArn()
- Parameters:
assumeRoleRoleArn
- (Optional, Available in 1.1.0+) The ARN of the role to assume. If ARN is set to an empty string, it does not perform role switching. It supports the environment variable ALICLOUD_ASSUME_ROLE_ARN. Terraform executes configuration on account with provided credentials.- Returns:
this
-
assumeRoleSessionExpiration
@Stability(Experimental) public OssBackendConfig.Builder assumeRoleSessionExpiration(Number assumeRoleSessionExpiration) Sets the value ofOssBackendConfig.getAssumeRoleSessionExpiration()
- Parameters:
assumeRoleSessionExpiration
- (Optional, Available in 1.1.0+) The time after which the established session for assuming role expires. Valid value range: [900-3600] seconds. Default to 3600 (in this case Alibaba Cloud uses its own default value). It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_EXPIRATION.- Returns:
this
-
assumeRoleSessionName
@Stability(Experimental) public OssBackendConfig.Builder assumeRoleSessionName(String assumeRoleSessionName) Sets the value ofOssBackendConfig.getAssumeRoleSessionName()
- Parameters:
assumeRoleSessionName
- (Optional, Available in 1.1.0+) The session name to use when assuming the role. If omitted, 'terraform' is passed to the AssumeRole call as session name. It supports environment variable ALICLOUD_ASSUME_ROLE_SESSION_NAME.- Returns:
this
-
ecsRoleName
Sets the value ofOssBackendConfig.getEcsRoleName()
- Parameters:
ecsRoleName
- (Optional, Available in 0.12.14+) The RAM Role Name attached on a ECS instance for API operations. You can retrieve this from the 'Access Control' section of the Alibaba Cloud console.- Returns:
this
-
encrypt
Sets the value ofOssBackendConfig.getEncrypt()
- Parameters:
encrypt
- (Optional) Whether to enable server side encryption of the state file. If it is true, OSS will use 'AES256' encryption algorithm to encrypt state file.- Returns:
this
-
endpoint
Sets the value ofOssBackendConfig.getEndpoint()
- Parameters:
endpoint
- (Optional) A custom endpoint for the OSS API. It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.- Returns:
this
-
key
Sets the value ofOssBackendConfig.getKey()
- Parameters:
key
- (Optional) The name of the state file. Defaults to terraform.tfstate.- Returns:
this
-
prefix
Sets the value ofOssBackendConfig.getPrefix()
- Parameters:
prefix
- (Optional) The path directory of the state file will be stored. Default to "env:".- Returns:
this
-
profile
Sets the value ofOssBackendConfig.getProfile()
- Parameters:
profile
- (Optional, Available in 0.12.8+) This is the Alibaba Cloud profile name as set in the shared credentials file. It can also be sourced from the ALICLOUD_PROFILE environment variable.- Returns:
this
-
region
Sets the value ofOssBackendConfig.getRegion()
- Parameters:
region
- (Optional) The region of the OSS bucket. It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.- Returns:
this
-
secretKey
Sets the value ofOssBackendConfig.getSecretKey()
- Parameters:
secretKey
- (Optional) Alibaba Cloud secret access key. It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.- Returns:
this
-
securityToken
Sets the value ofOssBackendConfig.getSecurityToken()
- Parameters:
securityToken
- (Optional) STS access token. It supports environment variable ALICLOUD_SECURITY_TOKEN.- Returns:
this
-
stsEndpoint
Sets the value ofOssBackendConfig.getStsEndpoint()
- Parameters:
stsEndpoint
- (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.- Returns:
this
-
tablestoreEndpoint
@Stability(Experimental) public OssBackendConfig.Builder tablestoreEndpoint(String tablestoreEndpoint) Sets the value ofOssBackendConfig.getTablestoreEndpoint()
- Parameters:
tablestoreEndpoint
- (Optional) A custom endpoint for the TableStore API.- Returns:
this
-
tablestoreTable
Sets the value ofOssBackendConfig.getTablestoreTable()
- Parameters:
tablestoreTable
- (Optional) A TableStore table for state locking and consistency. The table must have a primary key named LockID of type String.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<OssBackendConfig>
- Returns:
- a new instance of
OssBackendConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-