Key
Manages a Key Vault Key.
Create a Key Resource
new Key(name: string, args: KeyArgs, opts?: CustomResourceOptions);def Key(resource_name, opts=None, curve=None, expiration_date=None, key_opts=None, key_size=None, key_type=None, key_vault_id=None, name=None, not_before_date=None, tags=None, __props__=None);public Key(string name, KeyArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Key Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Key resource accepts the following input properties:
- Key
Opts List<string> A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- Key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- Key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- Curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- Expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- Key
Size int Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- Name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Key
Opts []string A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- Key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- Key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- Curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- Expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- Key
Size int Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- Name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- map[string]string
A mapping of tags to assign to the resource.
- key
Opts string[] A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- key
Size number Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- {[key: string]: string}
A mapping of tags to assign to the resource.
- key_
opts List[str] A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- key_
type str Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- key_
vault_ strid The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- curve str
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- expiration_
date str Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- key_
size float Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- name str
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not_
before_ strdate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- Dict[str, str]
A mapping of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Key resource produces the following output properties:
- E string
The RSA public exponent of this Key Vault Key.
- Id string
- The provider-assigned unique ID for this managed resource.
- N string
The RSA modulus of this Key Vault Key.
- Version string
The current version of the Key Vault Key.
- X string
The EC X component of this Key Vault Key.
- Y string
The EC Y component of this Key Vault Key.
- E string
The RSA public exponent of this Key Vault Key.
- Id string
- The provider-assigned unique ID for this managed resource.
- N string
The RSA modulus of this Key Vault Key.
- Version string
The current version of the Key Vault Key.
- X string
The EC X component of this Key Vault Key.
- Y string
The EC Y component of this Key Vault Key.
- e string
The RSA public exponent of this Key Vault Key.
- id string
- The provider-assigned unique ID for this managed resource.
- n string
The RSA modulus of this Key Vault Key.
- version string
The current version of the Key Vault Key.
- x string
The EC X component of this Key Vault Key.
- y string
The EC Y component of this Key Vault Key.
- e str
The RSA public exponent of this Key Vault Key.
- id str
- The provider-assigned unique ID for this managed resource.
- n str
The RSA modulus of this Key Vault Key.
- version str
The current version of the Key Vault Key.
- x str
The EC X component of this Key Vault Key.
- y str
The EC Y component of this Key Vault Key.
Look up an Existing Key Resource
Get an existing Key resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: KeyState, opts?: CustomResourceOptions): Keystatic get(resource_name, id, opts=None, curve=None, e=None, expiration_date=None, key_opts=None, key_size=None, key_type=None, key_vault_id=None, n=None, name=None, not_before_date=None, tags=None, version=None, x=None, y=None, __props__=None);public static Key Get(string name, Input<string> id, KeyState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- E string
The RSA public exponent of this Key Vault Key.
- Expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- Key
Opts List<string> A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- Key
Size int Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- Key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- Key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- N string
The RSA modulus of this Key Vault Key.
- Name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Version string
The current version of the Key Vault Key.
- X string
The EC X component of this Key Vault Key.
- Y string
The EC Y component of this Key Vault Key.
- Curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- E string
The RSA public exponent of this Key Vault Key.
- Expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- Key
Opts []string A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- Key
Size int Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- Key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- Key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- N string
The RSA modulus of this Key Vault Key.
- Name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- Not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- map[string]string
A mapping of tags to assign to the resource.
- Version string
The current version of the Key Vault Key.
- X string
The EC X component of this Key Vault Key.
- Y string
The EC Y component of this Key Vault Key.
- curve string
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- e string
The RSA public exponent of this Key Vault Key.
- expiration
Date string Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- key
Opts string[] A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- key
Size number Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- key
Type string Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- key
Vault stringId The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n string
The RSA modulus of this Key Vault Key.
- name string
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not
Before stringDate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- {[key: string]: string}
A mapping of tags to assign to the resource.
- version string
The current version of the Key Vault Key.
- x string
The EC X component of this Key Vault Key.
- y string
The EC Y component of this Key Vault Key.
- curve str
Specifies the curve to use when creating an
ECkey. Possible values areP-256,P-384,P-521, andSECP256K1. This field will be required in a future release ifkey_typeisECorEC-HSM. The API will default toP-256if nothing is specified. Changing this forces a new resource to be created.- e str
The RSA public exponent of this Key Vault Key.
- expiration_
date str Expiration UTC datetime (Y-m-d’T’H:M:S’Z’).
- key_
opts List[str] A list of JSON web key operations. Possible values include:
decrypt,encrypt,sign,unwrapKey,verifyandwrapKey. Please note these values are case sensitive.- key_
size float Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if
key_typeisRSAorRSA-HSM. Changing this forces a new resource to be created.- key_
type str Specifies the Key Type to use for this Key Vault Key. Possible values are
EC(Elliptic Curve),EC-HSM,Oct(Octet),RSAandRSA-HSM. Changing this forces a new resource to be created.- key_
vault_ strid The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created.
- n str
The RSA modulus of this Key Vault Key.
- name str
Specifies the name of the Key Vault Key. Changing this forces a new resource to be created.
- not_
before_ strdate Key not usable before the provided UTC datetime (Y-m-d’T’H:M:S’Z’).
- Dict[str, str]
A mapping of tags to assign to the resource.
- version str
The current version of the Key Vault Key.
- x str
The EC X component of this Key Vault Key.
- y str
The EC Y component of this Key Vault Key.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.