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)
public static Output<GetKeyResult> getKey(GetKeyArgs args, InvokeOptions options)
fn::invoke:
  function: google-native:iam/v1:getKey
  arguments:
    # arguments dictionaryThe following arguments are supported:
- KeyId string
- ServiceAccount stringId 
- Project string
- PublicKey stringType 
- KeyId string
- ServiceAccount stringId 
- Project string
- PublicKey stringType 
- keyId String
- serviceAccount StringId 
- project String
- publicKey StringType 
- keyId string
- serviceAccount stringId 
- project string
- publicKey stringType 
- key_id str
- service_account_ strid 
- project str
- public_key_ strtype 
- keyId String
- serviceAccount StringId 
- project String
- publicKey StringType 
getKey Result
The following output properties are available:
- Disabled bool
- The key status.
- KeyAlgorithm string
- Specifies the algorithm (and possibly key size) for the key.
- KeyOrigin string
- The key origin.
- KeyType 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}.
- PrivateKey stringData 
- The private key data. Only provided in CreateServiceAccountKeyresponses. 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.
- PrivateKey stringType 
- The output format for the private key. Only provided in CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- PublicKey stringData 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- ValidAfter stringTime 
- The key can be used after this timestamp.
- ValidBefore 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.
- KeyAlgorithm string
- Specifies the algorithm (and possibly key size) for the key.
- KeyOrigin string
- The key origin.
- KeyType 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}.
- PrivateKey stringData 
- The private key data. Only provided in CreateServiceAccountKeyresponses. 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.
- PrivateKey stringType 
- The output format for the private key. Only provided in CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- PublicKey stringData 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- ValidAfter stringTime 
- The key can be used after this timestamp.
- ValidBefore 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.
- keyAlgorithm String
- Specifies the algorithm (and possibly key size) for the key.
- keyOrigin String
- The key origin.
- keyType 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}.
- privateKey StringData 
- The private key data. Only provided in CreateServiceAccountKeyresponses. 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.
- privateKey StringType 
- The output format for the private key. Only provided in CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- publicKey StringData 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- validAfter StringTime 
- The key can be used after this timestamp.
- validBefore 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.
- keyAlgorithm string
- Specifies the algorithm (and possibly key size) for the key.
- keyOrigin string
- The key origin.
- keyType 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}.
- privateKey stringData 
- The private key data. Only provided in CreateServiceAccountKeyresponses. 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.
- privateKey stringType 
- The output format for the private key. Only provided in CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- publicKey stringData 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- validAfter stringTime 
- The key can be used after this timestamp.
- validBefore 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 CreateServiceAccountKeyresponses. 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 CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- public_key_ strdata 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- 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.
- keyAlgorithm String
- Specifies the algorithm (and possibly key size) for the key.
- keyOrigin String
- The key origin.
- keyType 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}.
- privateKey StringData 
- The private key data. Only provided in CreateServiceAccountKeyresponses. 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.
- privateKey StringType 
- The output format for the private key. Only provided in CreateServiceAccountKeyresponses, not inGetServiceAccountKeyorListServiceAccountKeyresponses. Google never exposes system-managed private keys, and never retains user-managed private keys.
- publicKey StringData 
- The public key data. Only provided in GetServiceAccountKeyresponses.
- validAfter StringTime 
- The key can be used after this timestamp.
- validBefore 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