import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Key resource in Oracle Cloud Infrastructure Kms service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/key/latest/Key * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/kms * * Creates a new master encryption key. * * As a management operation, this call is subject to a Key Management limit that applies to the total * number of requests across all management write operations. Key Management might throttle this call * to reject an otherwise valid request when the total rate of management write operations exceeds 10 * requests per second for a given tenancy. * * ## Import * * Keys can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Kms/key:Key test_key "managementEndpoint/{managementEndpoint}/keys/{keyId}" * ``` */ export declare class Key extends pulumi.CustomResource { /** * Get an existing Key resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: KeyState, opts?: pulumi.CustomResourceOptions): Key; /** * Returns true if the given object is an instance of Key. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Key; /** * (Updatable) The details of auto rotation schedule for the Key being create updated or imported. */ readonly autoKeyRotationDetails: pulumi.Output; /** * (Updatable) The OCID of the compartment where you want to create the master encryption key. */ readonly compartmentId: pulumi.Output; /** * The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion` property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations. */ readonly currentKeyVersion: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Desired state of the key. Possible values : `ENABLED` or `DISABLED` */ readonly desiredState: pulumi.Output; /** * (Updatable) A user-friendly name for the key. It does not have to be unique, and it is changeable. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * A reference to the key on external key manager. */ readonly externalKeyReference: pulumi.Output; /** * Key reference data to be returned to the customer as a response. */ readonly externalKeyReferenceDetails: pulumi.Output; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) A parameter specifying whether the auto key rotation is enabled or not. */ readonly isAutoRotationEnabled: pulumi.Output; /** * A Boolean value that indicates whether the Key belongs to primary Vault or replica vault. */ readonly isPrimary: pulumi.Output; /** * The cryptographic properties of a key. */ readonly keyShape: pulumi.Output; /** * The service endpoint to perform management operations against. Management operations include 'Create,' 'Update,' 'List,' 'Get,' and 'Delete' operations. See Vault Management endpoint. */ readonly managementEndpoint: pulumi.Output; /** * The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed. A protection mode of `HSM` means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside the HSM. A protection mode of `SOFTWARE` means that the key persists on the server, protected by the vault's RSA wrapping key which persists on the HSM. All cryptographic operations that use a key with a protection mode of `SOFTWARE` are performed on the server. By default, a key's protection mode is set to `HSM`. You can't change a key's protection mode after the key is created or imported. A protection mode of `EXTERNAL` mean that the key persists on the customer's external key manager which is hosted externally outside of oracle. Oracle only hold a reference to that key. All cryptographic operations that use a key with a protection mode of `EXTERNAL` are performed by external key manager. */ readonly protectionMode: pulumi.Output; /** * Key replica details */ readonly replicaDetails: pulumi.Output; /** * (Updatable) Details where key was backed up. */ readonly restoreFromFile: pulumi.Output; /** * (Updatable) Details where key was backed up */ readonly restoreFromObjectStore: pulumi.Output; /** * (Updatable) An optional property when flipped triggers restore from restore option provided in config file. */ readonly restoreTrigger: pulumi.Output; /** * The OCID of the key from which this key was restored. */ readonly restoredFromKeyId: pulumi.Output; /** * The key's current lifecycle state. Example: `ENABLED` */ readonly state: pulumi.Output; /** * The date and time the key was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-04-03T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * (Updatable) An optional property for the deletion time of the key, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2019-04-03T21:10:29.600Z` * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly timeOfDeletion: pulumi.Output; /** * The OCID of the vault that contains this key. */ readonly vaultId: pulumi.Output; /** * Create a Key resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: KeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Key resources. */ export interface KeyState { /** * (Updatable) The details of auto rotation schedule for the Key being create updated or imported. */ autoKeyRotationDetails?: pulumi.Input; /** * (Updatable) The OCID of the compartment where you want to create the master encryption key. */ compartmentId?: pulumi.Input; /** * The OCID of the key version used in cryptographic operations. During key rotation, the service might be in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion` property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations. */ currentKeyVersion?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Desired state of the key. Possible values : `ENABLED` or `DISABLED` */ desiredState?: pulumi.Input; /** * (Updatable) A user-friendly name for the key. It does not have to be unique, and it is changeable. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * A reference to the key on external key manager. */ externalKeyReference?: pulumi.Input; /** * Key reference data to be returned to the customer as a response. */ externalKeyReferenceDetails?: pulumi.Input[] | undefined>; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A parameter specifying whether the auto key rotation is enabled or not. */ isAutoRotationEnabled?: pulumi.Input; /** * A Boolean value that indicates whether the Key belongs to primary Vault or replica vault. */ isPrimary?: pulumi.Input; /** * The cryptographic properties of a key. */ keyShape?: pulumi.Input; /** * The service endpoint to perform management operations against. Management operations include 'Create,' 'Update,' 'List,' 'Get,' and 'Delete' operations. See Vault Management endpoint. */ managementEndpoint?: pulumi.Input; /** * The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed. A protection mode of `HSM` means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside the HSM. A protection mode of `SOFTWARE` means that the key persists on the server, protected by the vault's RSA wrapping key which persists on the HSM. All cryptographic operations that use a key with a protection mode of `SOFTWARE` are performed on the server. By default, a key's protection mode is set to `HSM`. You can't change a key's protection mode after the key is created or imported. A protection mode of `EXTERNAL` mean that the key persists on the customer's external key manager which is hosted externally outside of oracle. Oracle only hold a reference to that key. All cryptographic operations that use a key with a protection mode of `EXTERNAL` are performed by external key manager. */ protectionMode?: pulumi.Input; /** * Key replica details */ replicaDetails?: pulumi.Input[] | undefined>; /** * (Updatable) Details where key was backed up. */ restoreFromFile?: pulumi.Input; /** * (Updatable) Details where key was backed up */ restoreFromObjectStore?: pulumi.Input; /** * (Updatable) An optional property when flipped triggers restore from restore option provided in config file. */ restoreTrigger?: pulumi.Input; /** * The OCID of the key from which this key was restored. */ restoredFromKeyId?: pulumi.Input; /** * The key's current lifecycle state. Example: `ENABLED` */ state?: pulumi.Input; /** * The date and time the key was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2018-04-03T21:10:29.600Z` */ timeCreated?: pulumi.Input; /** * (Updatable) An optional property for the deletion time of the key, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2019-04-03T21:10:29.600Z` * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ timeOfDeletion?: pulumi.Input; /** * The OCID of the vault that contains this key. */ vaultId?: pulumi.Input; } /** * The set of arguments for constructing a Key resource. */ export interface KeyArgs { /** * (Updatable) The details of auto rotation schedule for the Key being create updated or imported. */ autoKeyRotationDetails?: pulumi.Input; /** * (Updatable) The OCID of the compartment where you want to create the master encryption key. */ compartmentId: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Desired state of the key. Possible values : `ENABLED` or `DISABLED` */ desiredState?: pulumi.Input; /** * (Updatable) A user-friendly name for the key. It does not have to be unique, and it is changeable. Avoid entering confidential information. */ displayName: pulumi.Input; /** * A reference to the key on external key manager. */ externalKeyReference?: pulumi.Input; /** * (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) A parameter specifying whether the auto key rotation is enabled or not. */ isAutoRotationEnabled?: pulumi.Input; /** * The cryptographic properties of a key. */ keyShape: pulumi.Input; /** * The service endpoint to perform management operations against. Management operations include 'Create,' 'Update,' 'List,' 'Get,' and 'Delete' operations. See Vault Management endpoint. */ managementEndpoint: pulumi.Input; /** * The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed. A protection mode of `HSM` means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside the HSM. A protection mode of `SOFTWARE` means that the key persists on the server, protected by the vault's RSA wrapping key which persists on the HSM. All cryptographic operations that use a key with a protection mode of `SOFTWARE` are performed on the server. By default, a key's protection mode is set to `HSM`. You can't change a key's protection mode after the key is created or imported. A protection mode of `EXTERNAL` mean that the key persists on the customer's external key manager which is hosted externally outside of oracle. Oracle only hold a reference to that key. All cryptographic operations that use a key with a protection mode of `EXTERNAL` are performed by external key manager. */ protectionMode?: pulumi.Input; /** * (Updatable) Details where key was backed up. */ restoreFromFile?: pulumi.Input; /** * (Updatable) Details where key was backed up */ restoreFromObjectStore?: pulumi.Input; /** * (Updatable) An optional property when flipped triggers restore from restore option provided in config file. */ restoreTrigger?: pulumi.Input; /** * (Updatable) An optional property for the deletion time of the key, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format. Example: `2019-04-03T21:10:29.600Z` * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ timeOfDeletion?: pulumi.Input; } //# sourceMappingURL=key.d.ts.map