1. Registry
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. SmAdminToken
Viewing docs for ibm 2.6.2
published on Wednesday, Sep 16, 2026 by ibm-cloud
Viewing docs for ibm 2.6.2
published on Wednesday, Sep 16, 2026 by ibm-cloud

    A resource for creating a Vault admin token for authenticating to your Vault Dedicated cluster. The token is valid for 1 hour and grants administrative privileges. The token is automatically refreshed if it expired or it is about to expire.

    Create SmAdminToken Resource

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

    Constructor syntax

    new SmAdminToken(name: string, args: SmAdminTokenArgs, opts?: CustomResourceOptions);
    @overload
    def SmAdminToken(resource_name: str,
                     args: SmAdminTokenArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def SmAdminToken(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     instance_id: Optional[str] = None,
                     sm_admin_token_id: Optional[str] = None)
    func NewSmAdminToken(ctx *Context, name string, args SmAdminTokenArgs, opts ...ResourceOption) (*SmAdminToken, error)
    public SmAdminToken(string name, SmAdminTokenArgs args, CustomResourceOptions? opts = null)
    public SmAdminToken(String name, SmAdminTokenArgs args)
    public SmAdminToken(String name, SmAdminTokenArgs args, CustomResourceOptions options)
    
    type: ibm:SmAdminToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "ibm_sm_admin_token" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SmAdminTokenArgs
    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 SmAdminTokenArgs
    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 SmAdminTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SmAdminTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SmAdminTokenArgs
    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 smAdminTokenResource = new Ibm.SmAdminToken("smAdminTokenResource", new()
    {
        InstanceId = "string",
        SmAdminTokenId = "string",
    });
    
    example, err := ibm.NewSmAdminToken(ctx, "smAdminTokenResource", &ibm.SmAdminTokenArgs{
    	InstanceId:     pulumi.String("string"),
    	SmAdminTokenId: pulumi.String("string"),
    })
    
    resource "ibm_sm_admin_token" "smAdminTokenResource" {
      lifecycle {
        create_before_destroy = true
      }
      instance_id       = "string"
      sm_admin_token_id = "string"
    }
    
    var smAdminTokenResource = new SmAdminToken("smAdminTokenResource", SmAdminTokenArgs.builder()
        .instanceId("string")
        .smAdminTokenId("string")
        .build());
    
    sm_admin_token_resource = ibm.SmAdminToken("smAdminTokenResource",
        instance_id="string",
        sm_admin_token_id="string")
    
    const smAdminTokenResource = new ibm.SmAdminToken("smAdminTokenResource", {
        instanceId: "string",
        smAdminTokenId: "string",
    });
    
    type: ibm:SmAdminToken
    properties:
        instanceId: string
        smAdminTokenId: string
    

    SmAdminToken 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 SmAdminToken resource accepts the following input properties:

    InstanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    SmAdminTokenId string
    The unique identifier of the sm_admin_token.
    InstanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    SmAdminTokenId string
    The unique identifier of the sm_admin_token.
    instance_id string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    sm_admin_token_id string
    The unique identifier of the sm_admin_token.
    instanceId String
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId String
    The unique identifier of the sm_admin_token.
    instanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId string
    The unique identifier of the sm_admin_token.
    instance_id str
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    sm_admin_token_id str
    The unique identifier of the sm_admin_token.
    instanceId String
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId String
    The unique identifier of the sm_admin_token.

    Outputs

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

    CreatedAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The admin token.
    CreatedAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    Id string
    The provider-assigned unique ID for this managed resource.
    Token string
    The admin token.
    created_at string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    The admin token.
    createdAt String
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The admin token.
    createdAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    id string
    The provider-assigned unique ID for this managed resource.
    token string
    The admin token.
    created_at str
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    id str
    The provider-assigned unique ID for this managed resource.
    token str
    The admin token.
    createdAt String
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    id String
    The provider-assigned unique ID for this managed resource.
    token String
    The admin token.

    Look up Existing SmAdminToken Resource

    Get an existing SmAdminToken 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?: SmAdminTokenState, opts?: CustomResourceOptions): SmAdminToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            instance_id: Optional[str] = None,
            sm_admin_token_id: Optional[str] = None,
            token: Optional[str] = None) -> SmAdminToken
    func GetSmAdminToken(ctx *Context, name string, id IDInput, state *SmAdminTokenState, opts ...ResourceOption) (*SmAdminToken, error)
    public static SmAdminToken Get(string name, Input<string> id, SmAdminTokenState? state, CustomResourceOptions? opts = null)
    public static SmAdminToken get(String name, Output<String> id, SmAdminTokenState state, CustomResourceOptions options)
    resources:  _:    type: ibm:SmAdminToken    get:      id: ${id}
    import {
      to = ibm_sm_admin_token.example
      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:
    CreatedAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    InstanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    SmAdminTokenId string
    The unique identifier of the sm_admin_token.
    Token string
    The admin token.
    CreatedAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    InstanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    SmAdminTokenId string
    The unique identifier of the sm_admin_token.
    Token string
    The admin token.
    created_at string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    instance_id string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    sm_admin_token_id string
    The unique identifier of the sm_admin_token.
    token string
    The admin token.
    createdAt String
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    instanceId String
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId String
    The unique identifier of the sm_admin_token.
    token String
    The admin token.
    createdAt string
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    instanceId string
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId string
    The unique identifier of the sm_admin_token.
    token string
    The admin token.
    created_at str
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    instance_id str
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    sm_admin_token_id str
    The unique identifier of the sm_admin_token.
    token str
    The admin token.
    createdAt String
    (String) The date that the admin token was created. The date format follows RFC 3339.

    • token - (String) The token value.

    • Constraints: The maximum length is 4096 characters. The minimum length is 16 characters. The value must match regular expression /^hvs.[\\s\\S]+$/.
    instanceId String
    The service instance ID.

    • Constraints: Length must be 36 characters. The value must match regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/.
    smAdminTokenId String
    The unique identifier of the sm_admin_token.
    token String
    The admin token.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.6.2
    published on Wednesday, Sep 16, 2026 by ibm-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial