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.getKey
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 ServiceAccountKey.
Using getKey
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 getKey(args: GetKeyArgs, opts?: InvokeOptions): Promise<GetKeyResult>
function getKeyOutput(args: GetKeyOutputArgs, opts?: InvokeOptions): Output<GetKeyResult>
def get_key(key_id: Optional[str] = None,
project: Optional[str] = None,
public_key_type: Optional[str] = None,
service_account_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetKeyResult
def get_key_output(key_id: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
public_key_type: Optional[pulumi.Input[str]] = None,
service_account_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKeyResult]
func LookupKey(ctx *Context, args *LookupKeyArgs, opts ...InvokeOption) (*LookupKeyResult, error)
func LookupKeyOutput(ctx *Context, args *LookupKeyOutputArgs, opts ...InvokeOption) LookupKeyResultOutput
> Note: This function is named LookupKey
in the Go SDK.
public static class GetKey
{
public static Task<GetKeyResult> InvokeAsync(GetKeyArgs args, InvokeOptions? opts = null)
public static Output<GetKeyResult> Invoke(GetKeyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKeyResult> getKey(GetKeyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:iam/v1:getKey
arguments:
# arguments dictionary
The following arguments are supported:
- Key
Id string - Service
Account stringId - Project string
- Public
Key stringType
- Key
Id string - Service
Account stringId - Project string
- Public
Key stringType
- key
Id String - service
Account StringId - project String
- public
Key StringType
- key
Id string - service
Account stringId - project string
- public
Key stringType
- key_
id str - service_
account_ strid - project str
- public_
key_ strtype
- key
Id String - service
Account StringId - project String
- public
Key StringType
getKey Result
The following output properties are available:
- Disabled bool
- The key status.
- Key
Algorithm string - Specifies the algorithm (and possibly key size) for the key.
- Key
Origin string - The key origin.
- Key
Type string - The key type.
- Name string
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - Private
Key stringData - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - Private
Key stringType - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - Public
Key stringData - The public key data. Only provided in
GetServiceAccountKey
responses. - Valid
After stringTime - The key can be used after this timestamp.
- Valid
Before stringTime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
- Disabled bool
- The key status.
- Key
Algorithm string - Specifies the algorithm (and possibly key size) for the key.
- Key
Origin string - The key origin.
- Key
Type string - The key type.
- Name string
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - Private
Key stringData - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - Private
Key stringType - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - Public
Key stringData - The public key data. Only provided in
GetServiceAccountKey
responses. - Valid
After stringTime - The key can be used after this timestamp.
- Valid
Before stringTime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
- disabled Boolean
- The key status.
- key
Algorithm String - Specifies the algorithm (and possibly key size) for the key.
- key
Origin String - The key origin.
- key
Type String - The key type.
- name String
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - private
Key StringData - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - private
Key StringType - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - public
Key StringData - The public key data. Only provided in
GetServiceAccountKey
responses. - valid
After StringTime - The key can be used after this timestamp.
- valid
Before StringTime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
- disabled boolean
- The key status.
- key
Algorithm string - Specifies the algorithm (and possibly key size) for the key.
- key
Origin string - The key origin.
- key
Type string - The key type.
- name string
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - private
Key stringData - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - private
Key stringType - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - public
Key stringData - The public key data. Only provided in
GetServiceAccountKey
responses. - valid
After stringTime - The key can be used after this timestamp.
- valid
Before stringTime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
- disabled bool
- The key status.
- key_
algorithm str - Specifies the algorithm (and possibly key size) for the key.
- key_
origin str - The key origin.
- key_
type str - The key type.
- name str
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - private_
key_ strdata - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - private_
key_ strtype - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - public_
key_ strdata - The public key data. Only provided in
GetServiceAccountKey
responses. - valid_
after_ strtime - The key can be used after this timestamp.
- valid_
before_ strtime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
- disabled Boolean
- The key status.
- key
Algorithm String - Specifies the algorithm (and possibly key size) for the key.
- key
Origin String - The key origin.
- key
Type String - The key type.
- name String
- The resource name of the service account key in the following format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}
. - private
Key StringData - The private key data. Only provided in
CreateServiceAccountKey
responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account. - private
Key StringType - The output format for the private key. Only provided in
CreateServiceAccountKey
responses, not inGetServiceAccountKey
orListServiceAccountKey
responses. Google never exposes system-managed private keys, and never retains user-managed private keys. - public
Key StringData - The public key data. Only provided in
GetServiceAccountKey
responses. - valid
After StringTime - The key can be used after this timestamp.
- valid
Before StringTime - The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
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