Class OssBackend.Builder

java.lang.Object
com.hashicorp.cdktf.OssBackend.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<OssBackend>
Enclosing class:
OssBackend

@Stability(Experimental) public static final class OssBackend.Builder extends Object implements software.amazon.jsii.Builder<OssBackend>
(experimental) A fluent builder for OssBackend.
  • Method Details

    • create

      @Stability(Experimental) public static OssBackend.Builder create(software.constructs.Construct scope)
      Parameters:
      scope - This parameter is required.
      Returns:
      a new instance of OssBackend.Builder.
    • bucket

      @Stability(Experimental) public OssBackend.Builder bucket(String bucket)
      (experimental) (Required) The name of the OSS bucket.

      Parameters:
      bucket - (Required) The name of the OSS bucket. This parameter is required.
      Returns:
      this
    • accessKey

      @Stability(Experimental) public OssBackend.Builder accessKey(String accessKey)
      (experimental) (Optional) Alibaba Cloud access key.

      It supports environment variables ALICLOUD_ACCESS_KEY and ALICLOUD_ACCESS_KEY_ID.

      Parameters:
      accessKey - (Optional) Alibaba Cloud access key. This parameter is required.
      Returns:
      this
    • acl

      @Stability(Experimental) public OssBackend.Builder acl(String acl)
      (experimental) (Optional) Object ACL to be applied to the state file.

      Parameters:
      acl - (Optional) Object ACL to be applied to the state file. This parameter is required.
      Returns:
      this
    • assumeRole

      @Stability(Deprecated) @Deprecated public OssBackend.Builder assumeRole(OssAssumeRole assumeRole)
      Deprecated.
      Use flattened assume role options
      Parameters:
      assumeRole - This parameter is required.
      Returns:
      this
    • assumeRolePolicy

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

      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. This parameter is required.
      Returns:
      this
    • assumeRoleRoleArn

      @Stability(Experimental) public OssBackend.Builder assumeRoleRoleArn(String assumeRoleRoleArn)
      (experimental) (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.

      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. This parameter is required.
      Returns:
      this
    • assumeRoleSessionExpiration

      @Stability(Experimental) public OssBackend.Builder assumeRoleSessionExpiration(Number assumeRoleSessionExpiration)
      (experimental) (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.

      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. This parameter is required.
      Returns:
      this
    • assumeRoleSessionName

      @Stability(Experimental) public OssBackend.Builder assumeRoleSessionName(String assumeRoleSessionName)
      (experimental) (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.

      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. This parameter is required.
      Returns:
      this
    • ecsRoleName

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

      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. This parameter is required.
      Returns:
      this
    • encrypt

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

      Parameters:
      encrypt - (Optional) Whether to enable server side encryption of the state file. This parameter is required.
      Returns:
      this
    • endpoint

      @Stability(Experimental) public OssBackend.Builder endpoint(String endpoint)
      (experimental) (Optional) A custom endpoint for the OSS API.

      It supports environment variables ALICLOUD_OSS_ENDPOINT and OSS_ENDPOINT.

      Parameters:
      endpoint - (Optional) A custom endpoint for the OSS API. This parameter is required.
      Returns:
      this
    • key

      @Stability(Experimental) public OssBackend.Builder key(String key)
      (experimental) (Optional) The name of the state file.

      Defaults to terraform.tfstate.

      Parameters:
      key - (Optional) The name of the state file. This parameter is required.
      Returns:
      this
    • prefix

      @Stability(Experimental) public OssBackend.Builder prefix(String prefix)
      (experimental) (Optional) The path directory of the state file will be stored.

      Default to "env:".

      Parameters:
      prefix - (Optional) The path directory of the state file will be stored. This parameter is required.
      Returns:
      this
    • profile

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

      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. This parameter is required.
      Returns:
      this
    • region

      @Stability(Experimental) public OssBackend.Builder region(String region)
      (experimental) (Optional) The region of the OSS bucket.

      It supports environment variables ALICLOUD_REGION and ALICLOUD_DEFAULT_REGION.

      Parameters:
      region - (Optional) The region of the OSS bucket. This parameter is required.
      Returns:
      this
    • secretKey

      @Stability(Experimental) public OssBackend.Builder secretKey(String secretKey)
      (experimental) (Optional) Alibaba Cloud secret access key.

      It supports environment variables ALICLOUD_SECRET_KEY and ALICLOUD_ACCESS_KEY_SECRET.

      Parameters:
      secretKey - (Optional) Alibaba Cloud secret access key. This parameter is required.
      Returns:
      this
    • securityToken

      @Stability(Experimental) public OssBackend.Builder securityToken(String securityToken)
      (experimental) (Optional) STS access token.

      It supports environment variable ALICLOUD_SECURITY_TOKEN.

      Parameters:
      securityToken - (Optional) STS access token. This parameter is required.
      Returns:
      this
    • sharedCredentialsFile

      @Stability(Experimental) public OssBackend.Builder sharedCredentialsFile(String sharedCredentialsFile)
      (experimental) (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.

      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. This parameter is required.
      Returns:
      this
    • stsEndpoint

      @Stability(Experimental) public OssBackend.Builder stsEndpoint(String stsEndpoint)
      (experimental) (Optional, Available in 1.0.11+) Custom endpoint for the AliCloud Security Token Service (STS) API. It supports environment variable ALICLOUD_STS_ENDPOINT.

      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. This parameter is required.
      Returns:
      this
    • tablestoreEndpoint

      @Stability(Experimental) public OssBackend.Builder tablestoreEndpoint(String tablestoreEndpoint)
      (experimental) (Optional) A custom endpoint for the TableStore API.

      Parameters:
      tablestoreEndpoint - (Optional) A custom endpoint for the TableStore API. This parameter is required.
      Returns:
      this
    • tablestoreTable

      @Stability(Experimental) public OssBackend.Builder tablestoreTable(String tablestoreTable)
      (experimental) (Optional) A TableStore table for state locking and consistency.

      The table must have a primary key named LockID of type String.

      Parameters:
      tablestoreTable - (Optional) A TableStore table for state locking and consistency. This parameter is required.
      Returns:
      this
    • build

      @Stability(Experimental) public OssBackend build()
      Specified by:
      build in interface software.amazon.jsii.Builder<OssBackend>
      Returns:
      a newly built instance of OssBackend.