Skip to content

Latest commit

 

History

History
969 lines (603 loc) · 39.1 KB

provider.typescript.md

File metadata and controls

969 lines (603 loc) · 39.1 KB

provider Submodule

Constructs

CloudflareProvider

Represents a {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs cloudflare}.

Initializers

import { provider } from '@cdktf/provider-cloudflare'

new provider.CloudflareProvider(scope: Construct, id: string, config?: CloudflareProviderConfig)
Name Type Description
scope constructs.Construct The scope in which to define this construct.
id string The scoped construct ID.
config CloudflareProviderConfig No description.

scopeRequired
  • Type: constructs.Construct

The scope in which to define this construct.


idRequired
  • Type: string

The scoped construct ID.

Must be unique amongst siblings in the same scope


configOptional

Methods

Name Description
toString Returns a string representation of this construct.
addOverride No description.
overrideLogicalId Overrides the auto-generated logical ID with a specific ID.
resetOverrideLogicalId Resets a previously passed logical Id to use the auto-generated logical id again.
toHclTerraform No description.
toMetadata No description.
toTerraform Adds this resource to the terraform JSON output.
resetAlias No description.
resetApiBasePath No description.
resetApiClientLogging No description.
resetApiHostname No description.
resetApiKey No description.
resetApiToken No description.
resetApiUserServiceKey No description.
resetEmail No description.
resetMaxBackoff No description.
resetMinBackoff No description.
resetRetries No description.
resetRps No description.
resetUserAgentOperatorSuffix No description.

toString
public toString(): string

Returns a string representation of this construct.

addOverride
public addOverride(path: string, value: any): void
pathRequired
  • Type: string

valueRequired
  • Type: any

overrideLogicalId
public overrideLogicalId(newLogicalId: string): void

Overrides the auto-generated logical ID with a specific ID.

newLogicalIdRequired
  • Type: string

The new logical ID to use for this stack element.


resetOverrideLogicalId
public resetOverrideLogicalId(): void

Resets a previously passed logical Id to use the auto-generated logical id again.

toHclTerraform
public toHclTerraform(): any
toMetadata
public toMetadata(): any
toTerraform
public toTerraform(): any

Adds this resource to the terraform JSON output.

resetAlias
public resetAlias(): void
resetApiBasePath
public resetApiBasePath(): void
resetApiClientLogging
public resetApiClientLogging(): void
resetApiHostname
public resetApiHostname(): void
resetApiKey
public resetApiKey(): void
resetApiToken
public resetApiToken(): void
resetApiUserServiceKey
public resetApiUserServiceKey(): void
resetEmail
public resetEmail(): void
resetMaxBackoff
public resetMaxBackoff(): void
resetMinBackoff
public resetMinBackoff(): void
resetRetries
public resetRetries(): void
resetRps
public resetRps(): void
resetUserAgentOperatorSuffix
public resetUserAgentOperatorSuffix(): void

Static Functions

Name Description
isConstruct Checks if x is a construct.
isTerraformElement No description.
isTerraformProvider No description.
generateConfigForImport Generates CDKTF code for importing a CloudflareProvider resource upon running "cdktf plan ".

isConstruct
import { provider } from '@cdktf/provider-cloudflare'

provider.CloudflareProvider.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


isTerraformElement
import { provider } from '@cdktf/provider-cloudflare'

provider.CloudflareProvider.isTerraformElement(x: any)
xRequired
  • Type: any

isTerraformProvider
import { provider } from '@cdktf/provider-cloudflare'

provider.CloudflareProvider.isTerraformProvider(x: any)
xRequired
  • Type: any

generateConfigForImport
import { provider } from '@cdktf/provider-cloudflare'

provider.CloudflareProvider.generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: TerraformProvider)

Generates CDKTF code for importing a CloudflareProvider resource upon running "cdktf plan ".

scopeRequired
  • Type: constructs.Construct

The scope in which to define this construct.


importToIdRequired
  • Type: string

The construct id used in the generated config for the CloudflareProvider to import.


importFromIdRequired
  • Type: string

The id of the existing CloudflareProvider that should be imported.

Refer to the {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#import import section} in the documentation of this resource for the id to use


providerOptional
  • Type: cdktf.TerraformProvider

? Optional instance of the provider where the CloudflareProvider to import is found.


Properties

Name Type Description
node constructs.Node The tree node.
cdktfStack cdktf.TerraformStack No description.
fqn string No description.
friendlyUniqueId string No description.
metaAttributes {[ key: string ]: any} No description.
terraformResourceType string No description.
terraformGeneratorMetadata cdktf.TerraformProviderGeneratorMetadata No description.
terraformProviderSource string No description.
alias string No description.
aliasInput string No description.
apiBasePathInput string No description.
apiClientLoggingInput boolean | cdktf.IResolvable No description.
apiHostnameInput string No description.
apiKeyInput string No description.
apiTokenInput string No description.
apiUserServiceKeyInput string No description.
emailInput string No description.
maxBackoffInput number No description.
minBackoffInput number No description.
retriesInput number No description.
rpsInput number No description.
userAgentOperatorSuffixInput string No description.
apiBasePath string No description.
apiClientLogging boolean | cdktf.IResolvable No description.
apiHostname string No description.
apiKey string No description.
apiToken string No description.
apiUserServiceKey string No description.
email string No description.
maxBackoff number No description.
minBackoff number No description.
retries number No description.
rps number No description.
userAgentOperatorSuffix string No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


cdktfStackRequired
public readonly cdktfStack: TerraformStack;
  • Type: cdktf.TerraformStack

fqnRequired
public readonly fqn: string;
  • Type: string

friendlyUniqueIdRequired
public readonly friendlyUniqueId: string;
  • Type: string

metaAttributesRequired
public readonly metaAttributes: {[ key: string ]: any};
  • Type: {[ key: string ]: any}

terraformResourceTypeRequired
public readonly terraformResourceType: string;
  • Type: string

terraformGeneratorMetadataOptional
public readonly terraformGeneratorMetadata: TerraformProviderGeneratorMetadata;
  • Type: cdktf.TerraformProviderGeneratorMetadata

terraformProviderSourceOptional
public readonly terraformProviderSource: string;
  • Type: string

aliasOptional
public readonly alias: string;
  • Type: string

aliasInputOptional
public readonly aliasInput: string;
  • Type: string

apiBasePathInputOptional
public readonly apiBasePathInput: string;
  • Type: string

apiClientLoggingInputOptional
public readonly apiClientLoggingInput: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

apiHostnameInputOptional
public readonly apiHostnameInput: string;
  • Type: string

apiKeyInputOptional
public readonly apiKeyInput: string;
  • Type: string

apiTokenInputOptional
public readonly apiTokenInput: string;
  • Type: string

apiUserServiceKeyInputOptional
public readonly apiUserServiceKeyInput: string;
  • Type: string

emailInputOptional
public readonly emailInput: string;
  • Type: string

maxBackoffInputOptional
public readonly maxBackoffInput: number;
  • Type: number

minBackoffInputOptional
public readonly minBackoffInput: number;
  • Type: number

retriesInputOptional
public readonly retriesInput: number;
  • Type: number

rpsInputOptional
public readonly rpsInput: number;
  • Type: number

userAgentOperatorSuffixInputOptional
public readonly userAgentOperatorSuffixInput: string;
  • Type: string

apiBasePathOptional
public readonly apiBasePath: string;
  • Type: string

apiClientLoggingOptional
public readonly apiClientLogging: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

apiHostnameOptional
public readonly apiHostname: string;
  • Type: string

apiKeyOptional
public readonly apiKey: string;
  • Type: string

apiTokenOptional
public readonly apiToken: string;
  • Type: string

apiUserServiceKeyOptional
public readonly apiUserServiceKey: string;
  • Type: string

emailOptional
public readonly email: string;
  • Type: string

maxBackoffOptional
public readonly maxBackoff: number;
  • Type: number

minBackoffOptional
public readonly minBackoff: number;
  • Type: number

retriesOptional
public readonly retries: number;
  • Type: number

rpsOptional
public readonly rps: number;
  • Type: number

userAgentOperatorSuffixOptional
public readonly userAgentOperatorSuffix: string;
  • Type: string

Constants

Name Type Description
tfResourceType string No description.

tfResourceTypeRequired
public readonly tfResourceType: string;
  • Type: string

Structs

CloudflareProviderConfig

Initializer

import { provider } from '@cdktf/provider-cloudflare'

const cloudflareProviderConfig: provider.CloudflareProviderConfig = { ... }

Properties

Name Type Description
alias string Alias name.
apiBasePath string Configure the base path used by the API client. Alternatively, can be configured using the CLOUDFLARE_API_BASE_PATH environment variable.
apiClientLogging boolean | cdktf.IResolvable Whether to print logs from the API client (using the default log library logger).
apiHostname string Configure the hostname used by the API client. Alternatively, can be configured using the CLOUDFLARE_API_HOSTNAME environment variable.
apiKey string The API key for operations.
apiToken string The API Token for operations.
apiUserServiceKey string A special Cloudflare API key good for a restricted set of endpoints.
email string A registered Cloudflare email address.
maxBackoff number Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using the CLOUDFLARE_MAX_BACKOFF environment variable.
minBackoff number Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using the CLOUDFLARE_MIN_BACKOFF environment variable.
retries number Maximum number of retries to perform when an API request fails.
rps number RPS limit to apply when making calls to the API. Alternatively, can be configured using the CLOUDFLARE_RPS environment variable.
userAgentOperatorSuffix string A value to append to the HTTP User Agent for all API calls.

aliasOptional
public readonly alias: string;
  • Type: string

Alias name.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#alias CloudflareProvider#alias}


apiBasePathOptional
public readonly apiBasePath: string;
  • Type: string

Configure the base path used by the API client. Alternatively, can be configured using the CLOUDFLARE_API_BASE_PATH environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_base_path CloudflareProvider#api_base_path}


apiClientLoggingOptional
public readonly apiClientLogging: boolean | IResolvable;
  • Type: boolean | cdktf.IResolvable

Whether to print logs from the API client (using the default log library logger).

Alternatively, can be configured using the CLOUDFLARE_API_CLIENT_LOGGING environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_client_logging CloudflareProvider#api_client_logging}


apiHostnameOptional
public readonly apiHostname: string;
  • Type: string

Configure the hostname used by the API client. Alternatively, can be configured using the CLOUDFLARE_API_HOSTNAME environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_hostname CloudflareProvider#api_hostname}


apiKeyOptional
public readonly apiKey: string;
  • Type: string

The API key for operations.

Alternatively, can be configured using the CLOUDFLARE_API_KEY environment variable. API keys are now considered legacy by Cloudflare, API tokens should be used instead. Must provide only one of api_key, api_token, api_user_service_key.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_key CloudflareProvider#api_key}


apiTokenOptional
public readonly apiToken: string;
  • Type: string

The API Token for operations.

Alternatively, can be configured using the CLOUDFLARE_API_TOKEN environment variable. Must provide only one of api_key, api_token, api_user_service_key.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_token CloudflareProvider#api_token}


apiUserServiceKeyOptional
public readonly apiUserServiceKey: string;
  • Type: string

A special Cloudflare API key good for a restricted set of endpoints.

Alternatively, can be configured using the CLOUDFLARE_API_USER_SERVICE_KEY environment variable. Must provide only one of api_key, api_token, api_user_service_key.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#api_user_service_key CloudflareProvider#api_user_service_key}


emailOptional
public readonly email: string;
  • Type: string

A registered Cloudflare email address.

Alternatively, can be configured using the CLOUDFLARE_EMAIL environment variable. Required when using api_key. Conflicts with api_token.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#email CloudflareProvider#email}


maxBackoffOptional
public readonly maxBackoff: number;
  • Type: number

Maximum backoff period in seconds after failed API calls. Alternatively, can be configured using the CLOUDFLARE_MAX_BACKOFF environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#max_backoff CloudflareProvider#max_backoff}


minBackoffOptional
public readonly minBackoff: number;
  • Type: number

Minimum backoff period in seconds after failed API calls. Alternatively, can be configured using the CLOUDFLARE_MIN_BACKOFF environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#min_backoff CloudflareProvider#min_backoff}


retriesOptional
public readonly retries: number;
  • Type: number

Maximum number of retries to perform when an API request fails.

Alternatively, can be configured using the CLOUDFLARE_RETRIES environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#retries CloudflareProvider#retries}


rpsOptional
public readonly rps: number;
  • Type: number

RPS limit to apply when making calls to the API. Alternatively, can be configured using the CLOUDFLARE_RPS environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#rps CloudflareProvider#rps}


userAgentOperatorSuffixOptional
public readonly userAgentOperatorSuffix: string;
  • Type: string

A value to append to the HTTP User Agent for all API calls.

This value is not something most users need to modify however, if you are using a non-standard provider or operator configuration, this is recommended to assist in uniquely identifying your traffic. Setting this value will remove the Terraform version from the HTTP User Agent string and may have unintended consequences. Alternatively, can be configured using the CLOUDFLARE_USER_AGENT_OPERATOR_SUFFIX environment variable.

Docs at Terraform Registry: {@link https://registry.terraform.io/providers/cloudflare/cloudflare/4.50.0/docs#user_agent_operator_suffix CloudflareProvider#user_agent_operator_suffix}