Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi
gcp.serviceaccount.getS
Explore with Pulumi AI
Gets a list of all service accounts from a project. See the official documentation and API.
Example Usage
Example service accounts.
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const example = gcp.serviceaccount.getS({
project: "example-project",
});
import pulumi
import pulumi_gcp as gcp
example = gcp.serviceaccount.get_s(project="example-project")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/serviceaccount"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := serviceaccount.GetS(ctx, &serviceaccount.GetSArgs{
Project: pulumi.StringRef("example-project"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var example = Gcp.ServiceAccount.GetS.Invoke(new()
{
Project = "example-project",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.serviceaccount.ServiceaccountFunctions;
import com.pulumi.gcp.serviceaccount.inputs.GetSArgs;
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 example = ServiceaccountFunctions.getS(GetSArgs.builder()
.project("example-project")
.build());
}
}
variables:
example:
fn::invoke:
Function: gcp:serviceaccount:getS
Arguments:
project: example-project
Using getS
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 getS(args: GetSArgs, opts?: InvokeOptions): Promise<GetSResult>
function getSOutput(args: GetSOutputArgs, opts?: InvokeOptions): Output<GetSResult>
def get_s(project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetSResult
def get_s_output(project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSResult]
func GetS(ctx *Context, args *GetSArgs, opts ...InvokeOption) (*GetSResult, error)
func GetSOutput(ctx *Context, args *GetSOutputArgs, opts ...InvokeOption) GetSResultOutput
> Note: This function is named GetS
in the Go SDK.
public static class GetS
{
public static Task<GetSResult> InvokeAsync(GetSArgs args, InvokeOptions? opts = null)
public static Output<GetSResult> Invoke(GetSInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSResult> getS(GetSArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:serviceaccount/getS:getS
arguments:
# arguments dictionary
The following arguments are supported:
- Project string
- The ID of the project. If it is not provided, the provider project is used.
- Project string
- The ID of the project. If it is not provided, the provider project is used.
- project String
- The ID of the project. If it is not provided, the provider project is used.
- project string
- The ID of the project. If it is not provided, the provider project is used.
- project str
- The ID of the project. If it is not provided, the provider project is used.
- project String
- The ID of the project. If it is not provided, the provider project is used.
getS Result
The following output properties are available:
- Accounts
List<Get
SAccount> - A list of all retrieved service accounts. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- Accounts
[]Get
SAccount - A list of all retrieved service accounts. Structure is defined below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Project string
- accounts
List<Get
SAccount> - A list of all retrieved service accounts. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- project String
- accounts
Get
SAccount[] - A list of all retrieved service accounts. Structure is defined below.
- id string
- The provider-assigned unique ID for this managed resource.
- project string
- accounts
Sequence[Get
SAccount] - A list of all retrieved service accounts. Structure is defined below.
- id str
- The provider-assigned unique ID for this managed resource.
- project str
- accounts List<Property Map>
- A list of all retrieved service accounts. Structure is defined below.
- id String
- The provider-assigned unique ID for this managed resource.
- project String
Supporting Types
GetSAccount
- Account
Id string - The Google service account ID (the part before the
@
sign in theemail
) - Disabled bool
- Whether a service account is disabled or not.
- Display
Name string - The display name for the service account.
- Email string
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - Member string
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - Name string
- The fully-qualified name of the service account.
- Unique
Id string - The unique id of the service account.
- Account
Id string - The Google service account ID (the part before the
@
sign in theemail
) - Disabled bool
- Whether a service account is disabled or not.
- Display
Name string - The display name for the service account.
- Email string
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - Member string
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - Name string
- The fully-qualified name of the service account.
- Unique
Id string - The unique id of the service account.
- account
Id String - The Google service account ID (the part before the
@
sign in theemail
) - disabled Boolean
- Whether a service account is disabled or not.
- display
Name String - The display name for the service account.
- email String
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - member String
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - name String
- The fully-qualified name of the service account.
- unique
Id String - The unique id of the service account.
- account
Id string - The Google service account ID (the part before the
@
sign in theemail
) - disabled boolean
- Whether a service account is disabled or not.
- display
Name string - The display name for the service account.
- email string
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - member string
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - name string
- The fully-qualified name of the service account.
- unique
Id string - The unique id of the service account.
- account_
id str - The Google service account ID (the part before the
@
sign in theemail
) - disabled bool
- Whether a service account is disabled or not.
- display_
name str - The display name for the service account.
- email str
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - member str
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - name str
- The fully-qualified name of the service account.
- unique_
id str - The unique id of the service account.
- account
Id String - The Google service account ID (the part before the
@
sign in theemail
) - disabled Boolean
- Whether a service account is disabled or not.
- display
Name String - The display name for the service account.
- email String
- The e-mail address of the service account. This value
should be referenced from any
gcp.organizations.getIAMPolicy
data sources that would grant the service account privileges. - member String
- The Identity of the service account in the form
serviceAccount:{email}
. This value is often used to refer to the service account in order to grant IAM permissions. - name String
- The fully-qualified name of the service account.
- unique
Id String - The unique id of the service account.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.