Package com.hashicorp.cdktf
Class CosBackendConfig.Builder
java.lang.Object
com.hashicorp.cdktf.CosBackendConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CosBackendConfig>
- Enclosing interface:
CosBackendConfig
@Stability(Experimental)
public static final class CosBackendConfig.Builder
extends Object
implements software.amazon.jsii.Builder<CosBackendConfig>
A builder for
CosBackendConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccelerate
(Boolean accelerate) Sets the value ofCosBackendConfig.getAccelerate()
Sets the value ofCosBackendConfig.getAcl()
assumeRole
(CosBackendAssumeRole assumeRole) Sets the value ofCosBackendConfig.getAssumeRole()
Sets the value ofCosBackendConfig.getBucket()
build()
Builds the configured instance.Sets the value ofCosBackendConfig.getDomain()
Sets the value ofCosBackendConfig.getEncrypt()
Sets the value ofCosBackendConfig.getEndpoint()
Sets the value ofCosBackendConfig.getKey()
Sets the value ofCosBackendConfig.getPrefix()
Sets the value ofCosBackendConfig.getRegion()
Sets the value ofCosBackendConfig.getSecretId()
Sets the value ofCosBackendConfig.getSecretKey()
securityToken
(String securityToken) Sets the value ofCosBackendConfig.getSecurityToken()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucket
Sets the value ofCosBackendConfig.getBucket()
- Parameters:
bucket
- (Required) The name of the COS bucket. This parameter is required. You shall manually create it first.- Returns:
this
-
accelerate
Sets the value ofCosBackendConfig.getAccelerate()
- Parameters:
accelerate
- (Optional) Whether to enable global Acceleration. Defaults to false.- Returns:
this
-
acl
Sets the value ofCosBackendConfig.getAcl()
- Parameters:
acl
- (Optional) Object ACL to be applied to the state file, allows private and public-read. Defaults to private.- Returns:
this
-
assumeRole
@Stability(Experimental) public CosBackendConfig.Builder assumeRole(CosBackendAssumeRole assumeRole) Sets the value ofCosBackendConfig.getAssumeRole()
- Parameters:
assumeRole
- (Optional) The assume_role block. If provided, terraform will attempt to assume this role using the supplied credentials.- Returns:
this
-
domain
Sets the value ofCosBackendConfig.getDomain()
- Parameters:
domain
- (Optional) The root domain of the API request. Defaults to tencentcloudapi.com. It supports the environment variable TENCENTCLOUD_DOMAIN.- Returns:
this
-
encrypt
Sets the value ofCosBackendConfig.getEncrypt()
- Parameters:
encrypt
- (Optional) Whether to enable server side encryption of the state file. If it is true, COS will use 'AES256' encryption algorithm to encrypt state file.- Returns:
this
-
endpoint
Sets the value ofCosBackendConfig.getEndpoint()
- Parameters:
endpoint
- (Optional) The Custom Endpoint for the COS backend. It supports the environment variable TENCENTCLOUD_ENDPOINT.- Returns:
this
-
key
Sets the value ofCosBackendConfig.getKey()
- Parameters:
key
- (Optional) The path for saving the state file in bucket. Defaults to terraform.tfstate.- Returns:
this
-
prefix
Sets the value ofCosBackendConfig.getPrefix()
- Parameters:
prefix
- (Optional) The directory for saving the state file in bucket. Default to "env:".- Returns:
this
-
region
Sets the value ofCosBackendConfig.getRegion()
- Parameters:
region
- (Optional) The region of the COS bucket. It supports environment variables TENCENTCLOUD_REGION.- Returns:
this
-
secretId
Sets the value ofCosBackendConfig.getSecretId()
- Parameters:
secretId
- (Optional) Secret id of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_ID.- Returns:
this
-
secretKey
Sets the value ofCosBackendConfig.getSecretKey()
- Parameters:
secretKey
- (Optional) Secret key of Tencent Cloud. It supports environment variables TENCENTCLOUD_SECRET_KEY.- Returns:
this
-
securityToken
Sets the value ofCosBackendConfig.getSecurityToken()
- Parameters:
securityToken
- (Optional) TencentCloud Security Token of temporary access credentials. It supports environment variables TENCENTCLOUD_SECURITY_TOKEN.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CosBackendConfig>
- Returns:
- a new instance of
CosBackendConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-