1. Packages
  2. Google Cloud Native
  3. API Docs
  4. iam
  5. iam/v1
  6. getServiceAccount

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.iam/v1.getServiceAccount

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Gets a ServiceAccount.

Using getServiceAccount

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 getServiceAccount(args: GetServiceAccountArgs, opts?: InvokeOptions): Promise<GetServiceAccountResult>
function getServiceAccountOutput(args: GetServiceAccountOutputArgs, opts?: InvokeOptions): Output<GetServiceAccountResult>
Copy
def get_service_account(project: Optional[str] = None,
                        service_account_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetServiceAccountResult
def get_service_account_output(project: Optional[pulumi.Input[str]] = None,
                        service_account_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetServiceAccountResult]
Copy
func LookupServiceAccount(ctx *Context, args *LookupServiceAccountArgs, opts ...InvokeOption) (*LookupServiceAccountResult, error)
func LookupServiceAccountOutput(ctx *Context, args *LookupServiceAccountOutputArgs, opts ...InvokeOption) LookupServiceAccountResultOutput
Copy

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

public static class GetServiceAccount 
{
    public static Task<GetServiceAccountResult> InvokeAsync(GetServiceAccountArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceAccountResult> Invoke(GetServiceAccountInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServiceAccountResult> getServiceAccount(GetServiceAccountArgs args, InvokeOptions options)
public static Output<GetServiceAccountResult> getServiceAccount(GetServiceAccountArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: google-native:iam/v1:getServiceAccount
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ServiceAccountId This property is required. string
Project string
ServiceAccountId This property is required. string
Project string
serviceAccountId This property is required. String
project String
serviceAccountId This property is required. string
project string
service_account_id This property is required. str
project str
serviceAccountId This property is required. String
project String

getServiceAccount Result

The following output properties are available:

Description string
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
Disabled bool
Whether the service account is disabled.
DisplayName string
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
Email string
The email address of the service account.
Etag string
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

Name string
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
Oauth2ClientId string
The OAuth 2.0 client ID for the service account.
Project string
The ID of the project that owns the service account.
UniqueId string
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
Description string
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
Disabled bool
Whether the service account is disabled.
DisplayName string
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
Email string
The email address of the service account.
Etag string
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

Name string
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
Oauth2ClientId string
The OAuth 2.0 client ID for the service account.
Project string
The ID of the project that owns the service account.
UniqueId string
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
description String
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
disabled Boolean
Whether the service account is disabled.
displayName String
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
email String
The email address of the service account.
etag String
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

name String
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
oauth2ClientId String
The OAuth 2.0 client ID for the service account.
project String
The ID of the project that owns the service account.
uniqueId String
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
description string
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
disabled boolean
Whether the service account is disabled.
displayName string
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
email string
The email address of the service account.
etag string
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

name string
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
oauth2ClientId string
The OAuth 2.0 client ID for the service account.
project string
The ID of the project that owns the service account.
uniqueId string
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
description str
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
disabled bool
Whether the service account is disabled.
display_name str
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
email str
The email address of the service account.
etag str
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

name str
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
oauth2_client_id str
The OAuth 2.0 client ID for the service account.
project str
The ID of the project that owns the service account.
unique_id str
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.
description String
Optional. A user-specified, human-readable description of the service account. The maximum length is 256 UTF-8 bytes.
disabled Boolean
Whether the service account is disabled.
displayName String
Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes.
email String
The email address of the service account.
etag String
Deprecated. Do not use.

Deprecated: Deprecated. Do not use.

name String
The resource name of the service account. Use one of the following formats: * projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS} * projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID} As an alternative, you can use the - wildcard character instead of the project ID: * projects/-/serviceAccounts/{EMAIL_ADDRESS} * projects/-/serviceAccounts/{UNIQUE_ID} When possible, avoid using the - wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account projects/-/serviceAccounts/fake@example.com, which does not exist, the response contains an HTTP 403 Forbidden error instead of a 404 Not Found error.
oauth2ClientId String
The OAuth 2.0 client ID for the service account.
project String
The ID of the project that owns the service account.
uniqueId String
The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi