1. Packages
  2. Hsdp Provider
  3. API Docs
  4. getIamToken
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.getIamToken

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Retrieve IAM tokens for use in other resources. The provider configured IAM entity credentials are used to generate these tokens.

    This data source regenerates the tokens each time a new plan is created.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const iam = hsdp.getIamToken({});
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    iam = hsdp.get_iam_token()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hsdp.GetIamToken(ctx, &hsdp.GetIamTokenArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var iam = Hsdp.GetIamToken.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetIamTokenArgs;
    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) {
            final var iam = HsdpFunctions.getIamToken();
    
        }
    }
    
    variables:
      iam:
        fn::invoke:
          function: hsdp:getIamToken
          arguments: {}
    
    import * as pulumi from "@pulumi/pulumi";
    
    export const accessToken = data.hsdp_iam_token.iam.access_token;
    
    import pulumi
    
    pulumi.export("accessToken", data["hsdp_iam_token"]["iam"]["access_token"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ctx.Export("accessToken", data.Hsdp_iam_token.Iam.Access_token)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        return new Dictionary<string, object?>
        {
            ["accessToken"] = data.Hsdp_iam_token.Iam.Access_token,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
            ctx.export("accessToken", data.hsdp_iam_token().iam().access_token());
        }
    }
    
    outputs:
      accessToken: ${data.hsdp_iam_token.iam.access_token}
    

    Using getIamToken

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getIamToken(args: GetIamTokenArgs, opts?: InvokeOptions): Promise<GetIamTokenResult>
    function getIamTokenOutput(args: GetIamTokenOutputArgs, opts?: InvokeOptions): Output<GetIamTokenResult>
    def get_iam_token(id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetIamTokenResult
    def get_iam_token_output(id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetIamTokenResult]
    func GetIamToken(ctx *Context, args *GetIamTokenArgs, opts ...InvokeOption) (*GetIamTokenResult, error)
    func GetIamTokenOutput(ctx *Context, args *GetIamTokenOutputArgs, opts ...InvokeOption) GetIamTokenResultOutput

    > Note: This function is named GetIamToken in the Go SDK.

    public static class GetIamToken 
    {
        public static Task<GetIamTokenResult> InvokeAsync(GetIamTokenArgs args, InvokeOptions? opts = null)
        public static Output<GetIamTokenResult> Invoke(GetIamTokenInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamTokenResult> getIamToken(GetIamTokenArgs args, InvokeOptions options)
    public static Output<GetIamTokenResult> getIamToken(GetIamTokenArgs args, InvokeOptions options)
    
    fn::invoke:
      function: hsdp:index/getIamToken:getIamToken
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Id string
    id String
    id string
    id str
    id String

    getIamToken Result

    The following output properties are available:

    AccessToken string
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    ExpiresAt double
    (number) The Unix timestamp when the access token expires
    Id string
    IdToken string
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.
    AccessToken string
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    ExpiresAt float64
    (number) The Unix timestamp when the access token expires
    Id string
    IdToken string
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.
    accessToken String
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    expiresAt Double
    (number) The Unix timestamp when the access token expires
    id String
    idToken String
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.
    accessToken string
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    expiresAt number
    (number) The Unix timestamp when the access token expires
    id string
    idToken string
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.
    access_token str
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    expires_at float
    (number) The Unix timestamp when the access token expires
    id str
    id_token str
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.
    accessToken String
    (string) An IAM Access token. This has a limited TTL, usually 30 minutes.
    expiresAt Number
    (number) The Unix timestamp when the access token expires
    id String
    idToken String
    (string) An IAM ID token. This has a limited TTL, usually 30 minutes.

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software