1. Packages
  2. Yandex
  3. API Docs
  4. getIamServiceAccount
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

yandex.getIamServiceAccount

Explore with Pulumi AI

yandex logo
Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

    Get information about a Yandex IAM service account. For more information about accounts, see Yandex.Cloud IAM accounts.

    import * as pulumi from "@pulumi/pulumi";
    import * as yandex from "@pulumi/yandex";
    
    const builder = pulumi.output(yandex.getIamServiceAccount({
        serviceAccountId: "sa_id",
    }));
    const deployer = pulumi.output(yandex.getIamServiceAccount({
        name: "sa_name",
    }));
    
    import pulumi
    import pulumi_yandex as yandex
    
    builder = yandex.get_iam_service_account(service_account_id="sa_id")
    deployer = yandex.get_iam_service_account(name="sa_name")
    
    using Pulumi;
    using Yandex = Pulumi.Yandex;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var builder = Output.Create(Yandex.GetIamServiceAccount.InvokeAsync(new Yandex.GetIamServiceAccountArgs
            {
                ServiceAccountId = "sa_id",
            }));
            var deployer = Output.Create(Yandex.GetIamServiceAccount.InvokeAsync(new Yandex.GetIamServiceAccountArgs
            {
                Name = "sa_name",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		opt0 := "sa_id"
    		_, err := yandex.LookupIamServiceAccount(ctx, &GetIamServiceAccountArgs{
    			ServiceAccountId: &opt0,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		opt1 := "sa_name"
    		_, err = yandex.LookupIamServiceAccount(ctx, &GetIamServiceAccountArgs{
    			Name: &opt1,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Using getIamServiceAccount

    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 getIamServiceAccount(args: GetIamServiceAccountArgs, opts?: InvokeOptions): Promise<GetIamServiceAccountResult>
    function getIamServiceAccountOutput(args: GetIamServiceAccountOutputArgs, opts?: InvokeOptions): Output<GetIamServiceAccountResult>
    def get_iam_service_account(folder_id: Optional[str] = None,
                                name: Optional[str] = None,
                                service_account_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetIamServiceAccountResult
    def get_iam_service_account_output(folder_id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                service_account_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetIamServiceAccountResult]
    func LookupIamServiceAccount(ctx *Context, args *LookupIamServiceAccountArgs, opts ...InvokeOption) (*LookupIamServiceAccountResult, error)
    func LookupIamServiceAccountOutput(ctx *Context, args *LookupIamServiceAccountOutputArgs, opts ...InvokeOption) LookupIamServiceAccountResultOutput

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

    public static class GetIamServiceAccount 
    {
        public static Task<GetIamServiceAccountResult> InvokeAsync(GetIamServiceAccountArgs args, InvokeOptions? opts = null)
        public static Output<GetIamServiceAccountResult> Invoke(GetIamServiceAccountInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIamServiceAccountResult> getIamServiceAccount(GetIamServiceAccountArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: yandex:index/getIamServiceAccount:getIamServiceAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FolderId string
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    Name string
    Name of a specific service account.
    ServiceAccountId string
    ID of a specific service account.
    FolderId string
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    Name string
    Name of a specific service account.
    ServiceAccountId string
    ID of a specific service account.
    folderId String
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    name String
    Name of a specific service account.
    serviceAccountId String
    ID of a specific service account.
    folderId string
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    name string
    Name of a specific service account.
    serviceAccountId string
    ID of a specific service account.
    folder_id str
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    name str
    Name of a specific service account.
    service_account_id str
    ID of a specific service account.
    folderId String
    Folder that the resource belongs to. If value is omitted, the default provider folder is used.
    name String
    Name of a specific service account.
    serviceAccountId String
    ID of a specific service account.

    getIamServiceAccount Result

    The following output properties are available:

    CreatedAt string
    Description string
    Description of the service account.
    FolderId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ServiceAccountId string
    CreatedAt string
    Description string
    Description of the service account.
    FolderId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ServiceAccountId string
    createdAt String
    description String
    Description of the service account.
    folderId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    serviceAccountId String
    createdAt string
    description string
    Description of the service account.
    folderId string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    serviceAccountId string
    created_at str
    description str
    Description of the service account.
    folder_id str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    service_account_id str
    createdAt String
    description String
    Description of the service account.
    folderId String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    serviceAccountId String

    Package Details

    Repository
    Yandex pulumi/pulumi-yandex
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the yandex Terraform Provider.
    yandex logo
    Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi