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

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

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:

    KeyId string
    ServiceAccountId string
    Project string
    PublicKeyType string
    KeyId string
    ServiceAccountId string
    Project string
    PublicKeyType string
    keyId String
    serviceAccountId String
    project String
    publicKeyType String
    keyId string
    serviceAccountId string
    project string
    publicKeyType string
    keyId String
    serviceAccountId String
    project String
    publicKeyType String

    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}.
    PrivateKeyData string
    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.
    PrivateKeyType string
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    PublicKeyData string
    The public key data. Only provided in GetServiceAccountKey responses.
    ValidAfterTime string
    The key can be used after this timestamp.
    ValidBeforeTime string
    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}.
    PrivateKeyData string
    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.
    PrivateKeyType string
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    PublicKeyData string
    The public key data. Only provided in GetServiceAccountKey responses.
    ValidAfterTime string
    The key can be used after this timestamp.
    ValidBeforeTime string
    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}.
    privateKeyData String
    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.
    privateKeyType String
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    publicKeyData String
    The public key data. Only provided in GetServiceAccountKey responses.
    validAfterTime String
    The key can be used after this timestamp.
    validBeforeTime String
    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}.
    privateKeyData string
    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.
    privateKeyType string
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    publicKeyData string
    The public key data. Only provided in GetServiceAccountKey responses.
    validAfterTime string
    The key can be used after this timestamp.
    validBeforeTime string
    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_data str
    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_type str
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    public_key_data str
    The public key data. Only provided in GetServiceAccountKey responses.
    valid_after_time str
    The key can be used after this timestamp.
    valid_before_time str
    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}.
    privateKeyData String
    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.
    privateKeyType String
    The output format for the private key. Only provided in CreateServiceAccountKey responses, not in GetServiceAccountKey or ListServiceAccountKey responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
    publicKeyData String
    The public key data. Only provided in GetServiceAccountKey responses.
    validAfterTime String
    The key can be used after this timestamp.
    validBeforeTime String
    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-native logo

    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