Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

getIamServiceAccount

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
	})
}

Argument reference

  • service_account_id - (Optional) ID of a specific service account.

  • name - (Optional) Name of a specific service account.

NOTE: One of service_account_id or name should be specified.

  • folder_id - (Optional) Folder that the resource belongs to. If value is omitted, the default provider folder is used.

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)
}

The following arguments are supported:

FolderId string
Name string
ServiceAccountId string
FolderId string
Name string
ServiceAccountId string
folderId string
name string
serviceAccountId string

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
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

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.