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 Details

    • Builder

      public Builder()
  • Method Details

    • bucket

      @Stability(Experimental) public OssBackendConfig.Builder bucket(String bucket)
      Parameters:
      bucket - (Required) The name of the OSS bucket. This parameter is required.
      Returns:
      this
    • accessKey

      @Stability(Experimental) public OssBackendConfig.Builder accessKey(String accessKey)
      Parameters:
      accessKey - (Optional) Alibaba Cloud access key. It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.
      Returns:
      this
    • acl

      @Stability(Experimental) public OssBackendConfig.Builder acl(String acl)
      Sets the value of OssBackendConfig.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 options
      Parameters:
      assumeRole - the value to be set.
      Returns:
      this
    • assumeRolePolicy

      @Stability(Experimental) public OssBackendConfig.Builder assumeRolePolicy(String assumeRolePolicy)
      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)
      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)
      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)
      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

      @Stability(Experimental) public OssBackendConfig.Builder ecsRoleName(String ecsRoleName)
      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

      @Stability(Experimental) public OssBackendConfig.Builder encrypt(Boolean encrypt)
      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

      @Stability(Experimental) public OssBackendConfig.Builder endpoint(String endpoint)
      Parameters:
      endpoint - (Optional) A custom endpoint for the OSS API. It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.
      Returns:
      this
    • key

      @Stability(Experimental) public OssBackendConfig.Builder key(String key)
      Sets the value of OssBackendConfig.getKey()
      Parameters:
      key - (Optional) The name of the state file. Defaults to terraform.tfstate.
      Returns:
      this
    • prefix

      @Stability(Experimental) public OssBackendConfig.Builder prefix(String prefix)
      Parameters:
      prefix - (Optional) The path directory of the state file will be stored. Default to "env:".
      Returns:
      this
    • profile

      @Stability(Experimental) public OssBackendConfig.Builder profile(String profile)
      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

      @Stability(Experimental) public OssBackendConfig.Builder region(String region)
      Parameters:
      region - (Optional) The region of the OSS bucket. It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.
      Returns:
      this
    • secretKey

      @Stability(Experimental) public OssBackendConfig.Builder secretKey(String secretKey)
      Parameters:
      secretKey - (Optional) Alibaba Cloud secret access key. It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.
      Returns:
      this
    • securityToken

      @Stability(Experimental) public OssBackendConfig.Builder securityToken(String securityToken)
      Parameters:
      securityToken - (Optional) STS access token. It supports environment variable ALICLOUD_SECURITY_TOKEN.
      Returns:
      this
    • sharedCredentialsFile

      @Stability(Experimental) public OssBackendConfig.Builder sharedCredentialsFile(String sharedCredentialsFile)
      Parameters:
      sharedCredentialsFile - (Optional, Available in 0.12.8+) This is the path to the shared credentials file. It can also be sourced from the ALICLOUD_SHARED_CREDENTIALS_FILE environment variable. If this is not set and a profile is specified, ~/.aliyun/config.json will be used.
      Returns:
      this
    • stsEndpoint

      @Stability(Experimental) public OssBackendConfig.Builder stsEndpoint(String stsEndpoint)
      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)
      Parameters:
      tablestoreEndpoint - (Optional) A custom endpoint for the TableStore API.
      Returns:
      this
    • tablestoreTable

      @Stability(Experimental) public OssBackendConfig.Builder tablestoreTable(String tablestoreTable)
      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

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