1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getStsCallerIdentity
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getStsCallerIdentity

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of sts callerIdentity

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const callerIdentity = tencentcloud.getStsCallerIdentity({});
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    caller_identity = tencentcloud.get_sts_caller_identity()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetStsCallerIdentity(ctx, &tencentcloud.GetStsCallerIdentityArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var callerIdentity = Tencentcloud.GetStsCallerIdentity.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetStsCallerIdentityArgs;
    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 callerIdentity = TencentcloudFunctions.getStsCallerIdentity();
    
        }
    }
    
    variables:
      callerIdentity:
        fn::invoke:
          function: tencentcloud:getStsCallerIdentity
          arguments: {}
    

    Using getStsCallerIdentity

    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 getStsCallerIdentity(args: GetStsCallerIdentityArgs, opts?: InvokeOptions): Promise<GetStsCallerIdentityResult>
    function getStsCallerIdentityOutput(args: GetStsCallerIdentityOutputArgs, opts?: InvokeOptions): Output<GetStsCallerIdentityResult>
    def get_sts_caller_identity(id: Optional[str] = None,
                                result_output_file: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetStsCallerIdentityResult
    def get_sts_caller_identity_output(id: Optional[pulumi.Input[str]] = None,
                                result_output_file: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetStsCallerIdentityResult]
    func GetStsCallerIdentity(ctx *Context, args *GetStsCallerIdentityArgs, opts ...InvokeOption) (*GetStsCallerIdentityResult, error)
    func GetStsCallerIdentityOutput(ctx *Context, args *GetStsCallerIdentityOutputArgs, opts ...InvokeOption) GetStsCallerIdentityResultOutput

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

    public static class GetStsCallerIdentity 
    {
        public static Task<GetStsCallerIdentityResult> InvokeAsync(GetStsCallerIdentityArgs args, InvokeOptions? opts = null)
        public static Output<GetStsCallerIdentityResult> Invoke(GetStsCallerIdentityInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStsCallerIdentityResult> getStsCallerIdentity(GetStsCallerIdentityArgs args, InvokeOptions options)
    public static Output<GetStsCallerIdentityResult> getStsCallerIdentity(GetStsCallerIdentityArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getStsCallerIdentity:getStsCallerIdentity
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ResultOutputFile string
    Used to save results.
    Id string
    ResultOutputFile string
    Used to save results.
    id String
    resultOutputFile String
    Used to save results.
    id string
    resultOutputFile string
    Used to save results.
    id str
    result_output_file str
    Used to save results.
    id String
    resultOutputFile String
    Used to save results.

    getStsCallerIdentity Result

    The following output properties are available:

    AccountId string
    The primary account Uin to which the current caller belongs.
    Arn string
    Current caller ARN.
    Id string
    PrincipalId string
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    Type string
    Identity type.
    UserId string
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    ResultOutputFile string
    AccountId string
    The primary account Uin to which the current caller belongs.
    Arn string
    Current caller ARN.
    Id string
    PrincipalId string
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    Type string
    Identity type.
    UserId string
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    ResultOutputFile string
    accountId String
    The primary account Uin to which the current caller belongs.
    arn String
    Current caller ARN.
    id String
    principalId String
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    type String
    Identity type.
    userId String
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    resultOutputFile String
    accountId string
    The primary account Uin to which the current caller belongs.
    arn string
    Current caller ARN.
    id string
    principalId string
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    type string
    Identity type.
    userId string
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    resultOutputFile string
    account_id str
    The primary account Uin to which the current caller belongs.
    arn str
    Current caller ARN.
    id str
    principal_id str
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    type str
    Identity type.
    user_id str
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    result_output_file str
    accountId String
    The primary account Uin to which the current caller belongs.
    arn String
    Current caller ARN.
    id String
    principalId String
    Account Uin to which the key belongs:- The caller is a cloud account, and the returned current account Uin- The caller is a role, and the returned account Uin that applies for the role key.
    type String
    Identity type.
    userId String
    Identity:- When the caller is a cloud account, the current account Uin is returned.- When the caller is a role, it returns roleId:roleSessionName- When the caller is a federated identity, it returns uin:federatedUserName.
    resultOutputFile String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack