Cloudflare

Pulumi Official
Package maintained by Pulumi
v4.9.0 published on Monday, Jul 18, 2022 by Pulumi

ApiToken

Provides a resource which manages Cloudflare API tokens.

Read more about permission groups and their applicable scopes in the developer documentation.

Create a ApiToken Resource

new ApiToken(name: string, args: ApiTokenArgs, opts?: CustomResourceOptions);
@overload
def ApiToken(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             condition: Optional[ApiTokenConditionArgs] = None,
             name: Optional[str] = None,
             policies: Optional[Sequence[ApiTokenPolicyArgs]] = None)
@overload
def ApiToken(resource_name: str,
             args: ApiTokenArgs,
             opts: Optional[ResourceOptions] = None)
func NewApiToken(ctx *Context, name string, args ApiTokenArgs, opts ...ResourceOption) (*ApiToken, error)
public ApiToken(string name, ApiTokenArgs args, CustomResourceOptions? opts = null)
public ApiToken(String name, ApiTokenArgs args)
public ApiToken(String name, ApiTokenArgs args, CustomResourceOptions options)
type: cloudflare:ApiToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ApiTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ApiTokenArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ApiTokenArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ApiTokenArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ApiTokenArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ApiToken Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ApiToken resource accepts the following input properties:

Name string

Name of the API Token.

Policies List<ApiTokenPolicyArgs>

Permissions policy. Multiple policy blocks can be defined.

Condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

Name string

Name of the API Token.

Policies []ApiTokenPolicyArgs

Permissions policy. Multiple policy blocks can be defined.

Condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

name String

Name of the API Token.

policies List<ApiTokenPolicyArgs>

Permissions policy. Multiple policy blocks can be defined.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

name string

Name of the API Token.

policies ApiTokenPolicyArgs[]

Permissions policy. Multiple policy blocks can be defined.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

name str

Name of the API Token.

policies Sequence[ApiTokenPolicyArgs]

Permissions policy. Multiple policy blocks can be defined.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

name String

Name of the API Token.

policies List<Property Map>

Permissions policy. Multiple policy blocks can be defined.

condition Property Map

Conditions under which the token should be considered valid.

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiToken resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

IssuedOn string

Timestamp of when the token was issued.

ModifiedOn string

Timestamp of when the token was last modified.

Status string
Value string

The value of the API Token.

Id string

The provider-assigned unique ID for this managed resource.

IssuedOn string

Timestamp of when the token was issued.

ModifiedOn string

Timestamp of when the token was last modified.

Status string
Value string

The value of the API Token.

id String

The provider-assigned unique ID for this managed resource.

issuedOn String

Timestamp of when the token was issued.

modifiedOn String

Timestamp of when the token was last modified.

status String
value String

The value of the API Token.

id string

The provider-assigned unique ID for this managed resource.

issuedOn string

Timestamp of when the token was issued.

modifiedOn string

Timestamp of when the token was last modified.

status string
value string

The value of the API Token.

id str

The provider-assigned unique ID for this managed resource.

issued_on str

Timestamp of when the token was issued.

modified_on str

Timestamp of when the token was last modified.

status str
value str

The value of the API Token.

id String

The provider-assigned unique ID for this managed resource.

issuedOn String

Timestamp of when the token was issued.

modifiedOn String

Timestamp of when the token was last modified.

status String
value String

The value of the API Token.

Look up an Existing ApiToken Resource

Get an existing ApiToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ApiTokenState, opts?: CustomResourceOptions): ApiToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        condition: Optional[ApiTokenConditionArgs] = None,
        issued_on: Optional[str] = None,
        modified_on: Optional[str] = None,
        name: Optional[str] = None,
        policies: Optional[Sequence[ApiTokenPolicyArgs]] = None,
        status: Optional[str] = None,
        value: Optional[str] = None) -> ApiToken
func GetApiToken(ctx *Context, name string, id IDInput, state *ApiTokenState, opts ...ResourceOption) (*ApiToken, error)
public static ApiToken Get(string name, Input<string> id, ApiTokenState? state, CustomResourceOptions? opts = null)
public static ApiToken get(String name, Output<String> id, ApiTokenState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

IssuedOn string

Timestamp of when the token was issued.

ModifiedOn string

Timestamp of when the token was last modified.

Name string

Name of the API Token.

Policies List<ApiTokenPolicyArgs>

Permissions policy. Multiple policy blocks can be defined.

Status string
Value string

The value of the API Token.

Condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

IssuedOn string

Timestamp of when the token was issued.

ModifiedOn string

Timestamp of when the token was last modified.

Name string

Name of the API Token.

Policies []ApiTokenPolicyArgs

Permissions policy. Multiple policy blocks can be defined.

Status string
Value string

The value of the API Token.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

issuedOn String

Timestamp of when the token was issued.

modifiedOn String

Timestamp of when the token was last modified.

name String

Name of the API Token.

policies List<ApiTokenPolicyArgs>

Permissions policy. Multiple policy blocks can be defined.

status String
value String

The value of the API Token.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

issuedOn string

Timestamp of when the token was issued.

modifiedOn string

Timestamp of when the token was last modified.

name string

Name of the API Token.

policies ApiTokenPolicyArgs[]

Permissions policy. Multiple policy blocks can be defined.

status string
value string

The value of the API Token.

condition ApiTokenConditionArgs

Conditions under which the token should be considered valid.

issued_on str

Timestamp of when the token was issued.

modified_on str

Timestamp of when the token was last modified.

name str

Name of the API Token.

policies Sequence[ApiTokenPolicyArgs]

Permissions policy. Multiple policy blocks can be defined.

status str
value str

The value of the API Token.

condition Property Map

Conditions under which the token should be considered valid.

issuedOn String

Timestamp of when the token was issued.

modifiedOn String

Timestamp of when the token was last modified.

name String

Name of the API Token.

policies List<Property Map>

Permissions policy. Multiple policy blocks can be defined.

status String
value String

The value of the API Token.

Supporting Types

ApiTokenCondition

ApiTokenConditionRequestIp

Ins List<string>
NotIns List<string>
Ins []string
NotIns []string
ins List<String>
notIns List<String>
ins string[]
notIns string[]
ins Sequence[str]
not_ins Sequence[str]
ins List<String>
notIns List<String>

ApiTokenPolicy

PermissionGroups List<string>
Resources Dictionary<string, string>
Effect string
PermissionGroups []string
Resources map[string]string
Effect string
permissionGroups List<String>
resources Map<String,String>
effect String
permissionGroups string[]
resources {[key: string]: string}
effect string
permission_groups Sequence[str]
resources Mapping[str, str]
effect str
permissionGroups List<String>
resources Map<String>
effect String

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes

This Pulumi package is based on the cloudflare Terraform Provider.