1. Packages
  2. Vcd Provider
  3. API Docs
  4. ApiToken
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.ApiToken

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    Create ApiToken Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiToken(name: string, args: ApiTokenArgs, opts?: CustomResourceOptions);
    @overload
    def ApiToken(resource_name: str,
                 args: ApiTokenArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiToken(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 allow_token_file: Optional[bool] = None,
                 file_name: Optional[str] = None,
                 api_token_id: Optional[str] = None,
                 name: Optional[str] = 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: vcd:ApiToken
    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 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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var apiTokenResource = new Vcd.ApiToken("apiTokenResource", new()
    {
        AllowTokenFile = false,
        FileName = "string",
        ApiTokenId = "string",
        Name = "string",
    });
    
    example, err := vcd.NewApiToken(ctx, "apiTokenResource", &vcd.ApiTokenArgs{
    	AllowTokenFile: pulumi.Bool(false),
    	FileName:       pulumi.String("string"),
    	ApiTokenId:     pulumi.String("string"),
    	Name:           pulumi.String("string"),
    })
    
    var apiTokenResource = new ApiToken("apiTokenResource", ApiTokenArgs.builder()
        .allowTokenFile(false)
        .fileName("string")
        .apiTokenId("string")
        .name("string")
        .build());
    
    api_token_resource = vcd.ApiToken("apiTokenResource",
        allow_token_file=False,
        file_name="string",
        api_token_id="string",
        name="string")
    
    const apiTokenResource = new vcd.ApiToken("apiTokenResource", {
        allowTokenFile: false,
        fileName: "string",
        apiTokenId: "string",
        name: "string",
    });
    
    type: vcd:ApiToken
    properties:
        allowTokenFile: false
        apiTokenId: string
        fileName: string
        name: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ApiToken resource accepts the following input properties:

    AllowTokenFile bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    FileName string
    The name of the file which will be created containing the API token
    ApiTokenId string
    Name string
    The unique name of the API token for a specific user.
    AllowTokenFile bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    FileName string
    The name of the file which will be created containing the API token
    ApiTokenId string
    Name string
    The unique name of the API token for a specific user.
    allowTokenFile Boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    fileName String
    The name of the file which will be created containing the API token
    apiTokenId String
    name String
    The unique name of the API token for a specific user.
    allowTokenFile boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    fileName string
    The name of the file which will be created containing the API token
    apiTokenId string
    name string
    The unique name of the API token for a specific user.
    allow_token_file bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    file_name str
    The name of the file which will be created containing the API token
    api_token_id str
    name str
    The unique name of the API token for a specific user.
    allowTokenFile Boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    fileName String
    The name of the file which will be created containing the API token
    apiTokenId String
    name String
    The unique name of the API token for a specific user.

    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.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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,
            allow_token_file: Optional[bool] = None,
            api_token_id: Optional[str] = None,
            file_name: Optional[str] = None,
            name: 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)
    resources:  _:    type: vcd:ApiToken    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.
    The following state arguments are supported:
    AllowTokenFile bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    ApiTokenId string
    FileName string
    The name of the file which will be created containing the API token
    Name string
    The unique name of the API token for a specific user.
    AllowTokenFile bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    ApiTokenId string
    FileName string
    The name of the file which will be created containing the API token
    Name string
    The unique name of the API token for a specific user.
    allowTokenFile Boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    apiTokenId String
    fileName String
    The name of the file which will be created containing the API token
    name String
    The unique name of the API token for a specific user.
    allowTokenFile boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    apiTokenId string
    fileName string
    The name of the file which will be created containing the API token
    name string
    The unique name of the API token for a specific user.
    allow_token_file bool
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    api_token_id str
    file_name str
    The name of the file which will be created containing the API token
    name str
    The unique name of the API token for a specific user.
    allowTokenFile Boolean
    An additional check that the user is aware that the file contains SENSITIVE information. Must be set to true or it will return a validation error.
    apiTokenId String
    fileName String
    The name of the file which will be created containing the API token
    name String
    The unique name of the API token for a specific user.

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware