Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.iam/v1.Key
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a ServiceAccountKey. Auto-naming is currently not supported for this resource.
Create Key Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Key(name: string, args: KeyArgs, opts?: CustomResourceOptions);
@overload
def Key(resource_name: str,
args: KeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Key(resource_name: str,
opts: Optional[ResourceOptions] = None,
service_account_id: Optional[str] = None,
key_algorithm: Optional[KeyKeyAlgorithm] = None,
private_key_type: Optional[KeyPrivateKeyType] = None,
project: Optional[str] = None)
func NewKey(ctx *Context, name string, args KeyArgs, opts ...ResourceOption) (*Key, error)
public Key(string name, KeyArgs args, CustomResourceOptions? opts = null)
type: google-native:iam/v1:Key
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KeyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var google_nativeKeyResource = new GoogleNative.IAM.V1.Key("google-nativeKeyResource", new()
{
ServiceAccountId = "string",
KeyAlgorithm = GoogleNative.IAM.V1.KeyKeyAlgorithm.KeyAlgUnspecified,
PrivateKeyType = GoogleNative.IAM.V1.KeyPrivateKeyType.TypeUnspecified,
Project = "string",
});
example, err := iam.NewKey(ctx, "google-nativeKeyResource", &iam.KeyArgs{
ServiceAccountId: pulumi.String("string"),
KeyAlgorithm: iam.KeyKeyAlgorithmKeyAlgUnspecified,
PrivateKeyType: iam.KeyPrivateKeyTypeTypeUnspecified,
Project: pulumi.String("string"),
})
var google_nativeKeyResource = new Key("google-nativeKeyResource", KeyArgs.builder()
.serviceAccountId("string")
.keyAlgorithm("KEY_ALG_UNSPECIFIED")
.privateKeyType("TYPE_UNSPECIFIED")
.project("string")
.build());
google_native_key_resource = google_native.iam.v1.Key("google-nativeKeyResource",
service_account_id="string",
key_algorithm=google_native.iam.v1.KeyKeyAlgorithm.KEY_ALG_UNSPECIFIED,
private_key_type=google_native.iam.v1.KeyPrivateKeyType.TYPE_UNSPECIFIED,
project="string")
const google_nativeKeyResource = new google_native.iam.v1.Key("google-nativeKeyResource", {
serviceAccountId: "string",
keyAlgorithm: google_native.iam.v1.KeyKeyAlgorithm.KeyAlgUnspecified,
privateKeyType: google_native.iam.v1.KeyPrivateKeyType.TypeUnspecified,
project: "string",
});
type: google-native:iam/v1:Key
properties:
keyAlgorithm: KEY_ALG_UNSPECIFIED
privateKeyType: TYPE_UNSPECIFIED
project: string
serviceAccountId: string
Key Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Key resource accepts the following input properties:
- Service
Account stringId - Key
Algorithm Pulumi.Google Native. IAM. V1. Key Key Algorithm - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- Private
Key Pulumi.Type Google Native. IAM. V1. Key Private Key Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - Project string
- Service
Account stringId - Key
Algorithm KeyKey Algorithm - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- Private
Key KeyType Private Key Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - Project string
- service
Account StringId - key
Algorithm KeyKey Algorithm - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- private
Key KeyType Private Key Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - project String
- service
Account stringId - key
Algorithm KeyKey Algorithm - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- private
Key KeyType Private Key Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - project string
- service_
account_ strid - key_
algorithm KeyKey Algorithm - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- private_
key_ Keytype Private Key Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - project str
- service
Account StringId - key
Algorithm "KEY_ALG_UNSPECIFIED" | "KEY_ALG_RSA_1024" | "KEY_ALG_RSA_2048" - Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
- private
Key "TYPE_UNSPECIFIED" | "TYPE_PKCS12_FILE" | "TYPE_GOOGLE_CREDENTIALS_FILE"Type - The output format of the private key. The default value is
TYPE_GOOGLE_CREDENTIALS_FILE
, which is the Google Credentials File format. - project String
Outputs
All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:
- Disabled bool
- The key status.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
- id String
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
- id string
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
- id str
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
- id String
- The provider-assigned unique ID for this managed resource.
- 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. - 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.
Supporting Types
KeyKeyAlgorithm, KeyKeyAlgorithmArgs
- Key
Alg Unspecified - KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- Key
Alg Rsa1024 - KEY_ALG_RSA_10241k RSA Key.
- Key
Alg Rsa2048 - KEY_ALG_RSA_20482k RSA Key.
- Key
Key Algorithm Key Alg Unspecified - KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- Key
Key Algorithm Key Alg Rsa1024 - KEY_ALG_RSA_10241k RSA Key.
- Key
Key Algorithm Key Alg Rsa2048 - KEY_ALG_RSA_20482k RSA Key.
- Key
Alg Unspecified - KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- Key
Alg Rsa1024 - KEY_ALG_RSA_10241k RSA Key.
- Key
Alg Rsa2048 - KEY_ALG_RSA_20482k RSA Key.
- Key
Alg Unspecified - KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- Key
Alg Rsa1024 - KEY_ALG_RSA_10241k RSA Key.
- Key
Alg Rsa2048 - KEY_ALG_RSA_20482k RSA Key.
- KEY_ALG_UNSPECIFIED
- KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- KEY_ALG_RSA1024
- KEY_ALG_RSA_10241k RSA Key.
- KEY_ALG_RSA2048
- KEY_ALG_RSA_20482k RSA Key.
- "KEY_ALG_UNSPECIFIED"
- KEY_ALG_UNSPECIFIEDAn unspecified key algorithm.
- "KEY_ALG_RSA_1024"
- KEY_ALG_RSA_10241k RSA Key.
- "KEY_ALG_RSA_2048"
- KEY_ALG_RSA_20482k RSA Key.
KeyPrivateKeyType, KeyPrivateKeyTypeArgs
- Type
Unspecified - TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - Type
Pkcs12File - TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - Type
Google Credentials File - TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
- Key
Private Key Type Type Unspecified - TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - Key
Private Key Type Type Pkcs12File - TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - Key
Private Key Type Type Google Credentials File - TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
- Type
Unspecified - TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - Type
Pkcs12File - TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - Type
Google Credentials File - TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
- Type
Unspecified - TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - Type
Pkcs12File - TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - Type
Google Credentials File - TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
- TYPE_UNSPECIFIED
- TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - TYPE_PKCS12_FILE
- TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - TYPE_GOOGLE_CREDENTIALS_FILE
- TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
- "TYPE_UNSPECIFIED"
- TYPE_UNSPECIFIEDUnspecified. Equivalent to
TYPE_GOOGLE_CREDENTIALS_FILE
. - "TYPE_PKCS12_FILE"
- TYPE_PKCS12_FILEPKCS12 format. The password for the PKCS12 file is
notasecret
. For more information, see https://tools.ietf.org/html/rfc7292. - "TYPE_GOOGLE_CREDENTIALS_FILE"
- TYPE_GOOGLE_CREDENTIALS_FILEGoogle Credentials File format.
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.