cloudflare.ZeroTrustAccessServiceToken
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZeroTrustAccessServiceToken = new cloudflare.ZeroTrustAccessServiceToken("example_zero_trust_access_service_token", {
name: "CI/CD token",
zoneId: "zone_id",
duration: "60m",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zero_trust_access_service_token = cloudflare.ZeroTrustAccessServiceToken("example_zero_trust_access_service_token",
name="CI/CD token",
zone_id="zone_id",
duration="60m")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewZeroTrustAccessServiceToken(ctx, "example_zero_trust_access_service_token", &cloudflare.ZeroTrustAccessServiceTokenArgs{
Name: pulumi.String("CI/CD token"),
ZoneId: pulumi.String("zone_id"),
Duration: pulumi.String("60m"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleZeroTrustAccessServiceToken = new Cloudflare.ZeroTrustAccessServiceToken("example_zero_trust_access_service_token", new()
{
Name = "CI/CD token",
ZoneId = "zone_id",
Duration = "60m",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustAccessServiceToken;
import com.pulumi.cloudflare.ZeroTrustAccessServiceTokenArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleZeroTrustAccessServiceToken = new ZeroTrustAccessServiceToken("exampleZeroTrustAccessServiceToken", ZeroTrustAccessServiceTokenArgs.builder()
.name("CI/CD token")
.zoneId("zone_id")
.duration("60m")
.build());
}
}
resources:
exampleZeroTrustAccessServiceToken:
type: cloudflare:ZeroTrustAccessServiceToken
name: example_zero_trust_access_service_token
properties:
name: CI/CD token
zoneId: zone_id
duration: 60m
Create ZeroTrustAccessServiceToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustAccessServiceToken(name: string, args: ZeroTrustAccessServiceTokenArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustAccessServiceToken(resource_name: str,
args: ZeroTrustAccessServiceTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustAccessServiceToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
account_id: Optional[str] = None,
duration: Optional[str] = None,
zone_id: Optional[str] = None)
func NewZeroTrustAccessServiceToken(ctx *Context, name string, args ZeroTrustAccessServiceTokenArgs, opts ...ResourceOption) (*ZeroTrustAccessServiceToken, error)
public ZeroTrustAccessServiceToken(string name, ZeroTrustAccessServiceTokenArgs args, CustomResourceOptions? opts = null)
public ZeroTrustAccessServiceToken(String name, ZeroTrustAccessServiceTokenArgs args)
public ZeroTrustAccessServiceToken(String name, ZeroTrustAccessServiceTokenArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustAccessServiceToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ZeroTrustAccessServiceTokenArgs
- 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 ZeroTrustAccessServiceTokenArgs
- 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 ZeroTrustAccessServiceTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustAccessServiceTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustAccessServiceTokenArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var zeroTrustAccessServiceTokenResource = new Cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", new()
{
Name = "string",
AccountId = "string",
Duration = "string",
ZoneId = "string",
});
example, err := cloudflare.NewZeroTrustAccessServiceToken(ctx, "zeroTrustAccessServiceTokenResource", &cloudflare.ZeroTrustAccessServiceTokenArgs{
Name: pulumi.String("string"),
AccountId: pulumi.String("string"),
Duration: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var zeroTrustAccessServiceTokenResource = new ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", ZeroTrustAccessServiceTokenArgs.builder()
.name("string")
.accountId("string")
.duration("string")
.zoneId("string")
.build());
zero_trust_access_service_token_resource = cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource",
name="string",
account_id="string",
duration="string",
zone_id="string")
const zeroTrustAccessServiceTokenResource = new cloudflare.ZeroTrustAccessServiceToken("zeroTrustAccessServiceTokenResource", {
name: "string",
accountId: "string",
duration: "string",
zoneId: "string",
});
type: cloudflare:ZeroTrustAccessServiceToken
properties:
accountId: string
duration: string
name: string
zoneId: string
ZeroTrustAccessServiceToken Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ZeroTrustAccessServiceToken resource accepts the following input properties:
- Name string
- The name of the service token.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- Name string
- The name of the service token.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- name String
- The name of the service token.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- duration String
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- name string
- The name of the service token.
- account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- name str
- The name of the service token.
- account_
id str - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- duration str
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - zone_
id str - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- name String
- The name of the service token.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- duration String
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZeroTrustAccessServiceToken resource produces the following output properties:
- Client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - Client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - Created
At string - Expires
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Seen stringAt - Updated
At string
- Client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - Client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - Created
At string - Expires
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Last
Seen stringAt - Updated
At string
- client
Id String - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret String - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At String - expires
At String - id String
- The provider-assigned unique ID for this managed resource.
- last
Seen StringAt - updated
At String
- client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At string - expires
At string - id string
- The provider-assigned unique ID for this managed resource.
- last
Seen stringAt - updated
At string
- client_
id str - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client_
secret str - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created_
at str - expires_
at str - id str
- The provider-assigned unique ID for this managed resource.
- last_
seen_ strat - updated_
at str
- client
Id String - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret String - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At String - expires
At String - id String
- The provider-assigned unique ID for this managed resource.
- last
Seen StringAt - updated
At String
Look up Existing ZeroTrustAccessServiceToken Resource
Get an existing ZeroTrustAccessServiceToken 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?: ZeroTrustAccessServiceTokenState, opts?: CustomResourceOptions): ZeroTrustAccessServiceToken
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
created_at: Optional[str] = None,
duration: Optional[str] = None,
expires_at: Optional[str] = None,
last_seen_at: Optional[str] = None,
name: Optional[str] = None,
updated_at: Optional[str] = None,
zone_id: Optional[str] = None) -> ZeroTrustAccessServiceToken
func GetZeroTrustAccessServiceToken(ctx *Context, name string, id IDInput, state *ZeroTrustAccessServiceTokenState, opts ...ResourceOption) (*ZeroTrustAccessServiceToken, error)
public static ZeroTrustAccessServiceToken Get(string name, Input<string> id, ZeroTrustAccessServiceTokenState? state, CustomResourceOptions? opts = null)
public static ZeroTrustAccessServiceToken get(String name, Output<String> id, ZeroTrustAccessServiceTokenState state, CustomResourceOptions options)
resources: _: type: cloudflare:ZeroTrustAccessServiceToken get: id: ${id}
- 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.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - Client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - Created
At string - Duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - Expires
At string - Last
Seen stringAt - Name string
- The name of the service token.
- Updated
At string - Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- Account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- Client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - Client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - Created
At string - Duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - Expires
At string - Last
Seen stringAt - Name string
- The name of the service token.
- Updated
At string - Zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- client
Id String - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret String - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At String - duration String
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - expires
At String - last
Seen StringAt - name String
- The name of the service token.
- updated
At String - zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id string - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- client
Id string - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret string - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At string - duration string
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - expires
At string - last
Seen stringAt - name string
- The name of the service token.
- updated
At string - zone
Id string - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account_
id str - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- client_
id str - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client_
secret str - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created_
at str - duration str
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - expires_
at str - last_
seen_ strat - name str
- The name of the service token.
- updated_
at str - zone_
id str - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
- account
Id String - The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.
- client
Id String - The Client ID for the service token. Access will check for this value in the
CF-Access-Client-ID
request header. - client
Secret String - The Client Secret for the service token. Access will check for this value in the
CF-Access-Client-Secret
request header. - created
At String - duration String
- The duration for how long the service token will be valid. Must be in the format
300ms
or2h45m
. Valid time units are: ns, us (or µs), ms, s, m, h. The default is 1 year in hours (8760h). - expires
At String - last
Seen StringAt - name String
- The name of the service token.
- updated
At String - zone
Id String - The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.
Import
$ pulumi import cloudflare:index/zeroTrustAccessServiceToken:ZeroTrustAccessServiceToken example '<{accounts|zones}/{account_id|zone_id}>/<service_token_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.