Key Vault API versions supported by this package
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
this is the default version
A deleted keyâs properties, cryptographic material and its deletion information.
If soft-delete is enabled, returns information about its recovery as well.
properties (KeyProperties) â Properties of the deleted key.
deleted_date (datetime or None) â When the key was deleted, in UTC.
recovery_id (str or None) â An identifier used to recover the deleted key. Returns None
if soft-delete is disabled.
scheduled_purge_date (datetime or None) â When the key is scheduled to be purged, in UTC. Returns None
if soft-delete is disabled.
When the key was deleted, in UTC.
When the key was deleted, in UTC.
datetime or None
The key ID.
The key ID.
The JSON Web Key (JWK) for the key.
The JSON Web Key (JWK) for the key.
Permitted operations. See KeyOperation
for possible values.
Permitted operations. See KeyOperation
for possible values.
List[KeyOperation or str]
The keyâs type. See KeyType
for possible values.
The key name.
The key name.
The key properties.
The key properties.
An identifier used to recover the deleted key. Returns None
if soft-delete is disabled.
An identifier used to recover the deleted key. Returns None
if soft-delete is disabled.
str or None
When the key is scheduled to be purged, in UTC. Returns None
if soft-delete is disabled.
When the key is scheduled to be purged, in UTC. Returns None
if soft-delete is disabled.
datetime or None
As defined in http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18. All parameters are optional.
kid (str) â Key identifier.
kty (KeyType or str) â Key Type (kty), as defined in https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40
key_ops (list[str or KeyOperation]) â Allowed operations for the key
n (bytes) â RSA modulus.
e (bytes) â RSA public exponent.
d (bytes) â RSA private exponent, or the D component of an EC private key.
dp (bytes) â RSA private key parameter.
dq (bytes) â RSA private key parameter.
qi (bytes) â RSA private key parameter.
p (bytes) â RSA secret prime.
q (bytes) â RSA secret prime, with p < q.
k (bytes) â Symmetric key.
t (bytes) â HSM Token, used with âBring Your Own Keyâ.
crv (KeyCurveName or str) â Elliptic curve name.
x (bytes) â X component of an EC public key.
y (bytes) â Y component of an EC public key.
The key attestation information.
certificate_pem_file (bytes or None) â The certificate used for attestation validation, in PEM format.
private_key_attestation (bytes or None) â The key attestation corresponding to the private key material of the key.
public_key_attestation (bytes or None) â The key attestation corresponding to the public key material of the key.
version (str or None) â The version of the attestation.
A high-level interface for managing a vaultâs keys.
vault_url (str) â URL of the vault the client will access. This is also called the vaultâs âDNS Nameâ. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.
credential (TokenCredential) â An object which can provide an access token for the vault, such as a credential from azure.identity
api_version (ApiVersion or str) â Version of the service API to use. Defaults to the most recent.
verify_challenge_resource (bool) â Whether to verify the authentication challenge resource matches the Key Vault or Managed HSM domain. Defaults to True.
Example
Create a newKeyClient
ï
from azure.identity import DefaultAzureCredential from azure.keyvault.keys import KeyClient # Create a KeyClient using default Azure credentials credential = DefaultAzureCredential() key_client = KeyClient(vault_url, credential)
Back up a key in a protected form useable only by Azure Key Vault.
Requires keys/backup permission.
This is intended to allow copying a key from one vault to another. Both vaults must be owned by the same Azure subscription. Also, backup / restore cannot be performed across geopolitical boundaries. For example, a backup from a vault in a USA region cannot be restored to a vault in an EU region.
name (str) â The name of the key to back up
The key backup result, in a protected bytes format that can only be used by Azure Key Vault.
ResourceNotFoundError or HttpResponseError â the former if the key doesnât exist; the latter for other errors
Example
# backup key key_backup = key_client.backup_key(key_name) # returns the raw bytes of the backed up key print(key_backup)
Delete all versions of a key and its cryptographic material.
Requires keys/delete permission. When this method returns Key Vault has begun deleting the key. Deletion may take several seconds in a vault with soft-delete enabled. This method therefore returns a poller enabling you to wait for deletion to complete.
name (str) â The name of the key to delete.
A poller for the delete key operation. The pollerâs result method returns the DeletedKey
without waiting for deletion to complete. If the vault has soft-delete enabled and you want to permanently delete the key with purge_deleted_key()
, call the pollerâs wait method first. It will block until the deletion is complete. The wait method requires keys/get permission.
ResourceNotFoundError or HttpResponseError â the former if the key doesnât exist; the latter for other errors
Example
# delete a key deleted_key_poller = key_client.begin_delete_key(key_name) deleted_key = deleted_key_poller.result() print(deleted_key.name) # if the vault has soft-delete enabled, the key's deleted_date, # scheduled purge date and recovery id are set print(deleted_key.deleted_date) print(deleted_key.scheduled_purge_date) print(deleted_key.recovery_id) # if you want to block until deletion is complete, call wait() on the poller deleted_key_poller.wait()
Recover a deleted key to its latest version. Possible only in a vault with soft-delete enabled.
Requires keys/recover permission.
When this method returns Key Vault has begun recovering the key. Recovery may take several seconds. This method therefore returns a poller enabling you to wait for recovery to complete. Waiting is only necessary when you want to use the recovered key in another operation immediately.
name (str) â The name of the deleted key to recover
A poller for the recovery operation. The pollerâs result method returns the recovered KeyVaultKey
without waiting for recovery to complete. If you want to use the recovered key immediately, call the pollerâs wait method, which blocks until the key is ready to use. The wait method requires keys/get permission.
Example
# recover a deleted key to its latest version (requires soft-delete enabled for the vault) recover_key_poller = key_client.begin_recover_deleted_key(key_name) recovered_key = recover_key_poller.result() print(recovered_key.id) print(recovered_key.name) # if you want to block until key is recovered server-side, call wait() on the poller recover_key_poller.wait()
Close sockets opened by the client.
Calling this method is unnecessary when using the client as a context manager.
Create a new elliptic curve key or, if name
is already in use, create a new version of the key.
Requires the keys/create permission.
name (str) â The name for the new key.
curve (KeyCurveName or str or None) â Elliptic curve name. Defaults to the NIST P-256 elliptic curve.
key_operations (List[KeyOperation or str] or None) â Allowed key operations
hardware_protected (bool or None) â Whether the key should be created in a hardware security module. Defaults to False
.
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
exportable (bool or None) â Whether the private key can be exported.
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The created key
Example
Create an elliptic curve keyïkey_curve = "P-256" # create an EC (Elliptic curve) key with curve specification # EC key can be created with default curve of 'P-256' ec_key = key_client.create_ec_key(key_name, curve=key_curve) print(ec_key.id) print(ec_key.properties.version) print(ec_key.key_type) print(ec_key.key.crv)
Create a key or, if name
is already in use, create a new version of the key.
Requires keys/create permission.
size (int or None) â Key size in bits. Applies only to RSA and symmetric keys. Consider using create_rsa_key()
or create_oct_key()
instead.
curve (KeyCurveName or str or None) â Elliptic curve name. Applies only to elliptic curve keys. Defaults to the NIST P-256 elliptic curve. To create an elliptic curve key, consider using create_ec_key()
instead.
public_exponent (int or None) â The RSA public exponent to use. Applies only to RSA keys created in a Managed HSM.
key_operations (List[KeyOperation or str] or None) â Allowed key operations
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
exportable (bool or None) â Whether the private key can be exported.
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The created key
Example
from dateutil import parser as date_parse expires_on = date_parse.parse("2050-02-02T08:00:00.000Z") # create a key with optional arguments key = key_client.create_key(key_name, KeyType.rsa_hsm, expires_on=expires_on) print(key.name) print(key.id) print(key.key_type) print(key.properties.expires_on)
Create a new octet sequence (symmetric) key or, if name
is in use, create a new version of the key.
Requires the keys/create permission.
name (str) â The name for the new key.
size (int or None) â Key size in bits, for example 128, 192, or 256.
key_operations (List[KeyOperation or str] or None) â Allowed key operations.
hardware_protected (bool or None) â Whether the key should be created in a hardware security module. Defaults to False
.
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
exportable (bool or None) â Whether the key can be exported.
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The created key
Example
Create an octet sequence (symmetric) keyïkey = key_client.create_oct_key(key_name, size=256, hardware_protected=True) print(key.id) print(key.name) print(key.key_type)
Create a new RSA key or, if name
is already in use, create a new version of the key
Requires the keys/create permission.
name (str) â The name for the new key.
size (int or None) â Key size in bits, for example 2048, 3072, or 4096.
public_exponent (int or None) â The RSA public exponent to use. Applies only to RSA keys created in a Managed HSM.
hardware_protected (bool or None) â Whether the key should be created in a hardware security module. Defaults to False
.
key_operations (List[KeyOperation or str] or None) â Allowed key operations
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
exportable (bool or None) â Whether the private key can be exported.
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The created key
Example
key_size = 2048 key_ops = ["encrypt", "decrypt", "sign", "verify", "wrapKey", "unwrapKey"] # create an rsa key with size specification # RSA key can be created with default size of '2048' key = key_client.create_rsa_key(key_name, hardware_protected=True, size=key_size, key_operations=key_ops) print(key.id) print(key.name) print(key.key_type) print(key.key_operations)
Gets a CryptographyClient
for the given key.
key_name (str) â The name of the key used to perform cryptographic operations.
key_version (str or None) â Optional version of the key used to perform cryptographic operations.
A CryptographyClient
using the same options, credentials, and HTTP client as this KeyClient
.
Get a deleted key. Possible only in a vault with soft-delete enabled.
Requires keys/get permission.
name (str) â The name of the key
The deleted key
ResourceNotFoundError or HttpResponseError â the former if the key doesnât exist; the latter for other errors
Example
# get a deleted key (requires soft-delete enabled for the vault) deleted_key = key_client.get_deleted_key(key_name) print(deleted_key.name) # if the vault has soft-delete enabled, the key's deleted_date # scheduled purge date and recovery id are set print(deleted_key.deleted_date) print(deleted_key.scheduled_purge_date) print(deleted_key.recovery_id)
Get a keyâs attributes and, if itâs an asymmetric key, its public material.
Requires keys/get permission.
The fetched key.
ResourceNotFoundError or HttpResponseError â the former if the key doesnât exist; the latter for other errors
Example
# get the latest version of a key key = key_client.get_key(key_name) # alternatively, specify a version key_version = key.properties.version key = key_client.get_key(key_name, key_version) print(key.id) print(key.name) print(key.properties.version) print(key.key_type) print(key.properties.vault_url)
Get a key and its attestation blob.
This method is applicable to any key stored in Azure Key Vault Managed HSM. This operation requires the keys/get permission.
The key attestation.
Get the rotation policy of a Key Vault key.
key_name (str) â The name of the key.
The key rotation policy.
Get the requested number of random bytes from a managed HSM.
count (int) â The requested number of random bytes.
The random bytes.
ValueError or HttpResponseError â the former if less than one random byte is requested; the latter for other errors
Example
# get eight random bytes from a managed HSM random_bytes = client.get_random_bytes(count=8)
Import a key created externally.
Requires keys/import permission. If name
is already in use, the key will be imported as a new version.
name (str) â Name for the imported key
key (JsonWebKey) â The JSON web key to import
hardware_protected (bool or None) â Whether the key should be backed by a hardware security module
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
exportable (bool or None) â Whether the private key can be exported.
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The imported key
List all deleted keys, including the public part of each. Possible only in a vault with soft-delete enabled.
Requires keys/list permission.
An iterator of deleted keys
Example
List all the deleted keysï# get an iterator of deleted keys (requires soft-delete enabled for the vault) deleted_keys = key_client.list_deleted_keys() for key in deleted_keys: print(key.id) print(key.name) print(key.scheduled_purge_date) print(key.recovery_id) print(key.deleted_date)
List the identifiers and properties of a keyâs versions.
Requires keys/list permission.
name (str) â The name of the key
An iterator of keys without their cryptographic material
Example
List all versions of a keyï# get an iterator of a key's versions key_versions = key_client.list_properties_of_key_versions("key-name") for key in key_versions: print(key.id) print(key.name)
List identifiers and properties of all keys in the vault.
Requires keys/list permission.
An iterator of keys without their cryptographic material or version information
Example
# get an iterator of keys keys = key_client.list_properties_of_keys() for key in keys: print(key.id) print(key.name)
Permanently deletes a deleted key. Only possible in a vault with soft-delete enabled.
Performs an irreversible deletion of the specified key, without possibility for recovery. The operation is not available if the recovery_level
does not specify âPurgeableâ. This method is only necessary for purging a key before its scheduled_purge_date
.
Requires keys/purge permission.
name (str) â The name of the deleted key to purge
None
Example
# if the vault has soft-delete enabled, purge permanently deletes a deleted key # (with soft-delete disabled, begin_delete_key is permanent) key_client.purge_deleted_key("key-name")
Releases a key.
The release key operation is applicable to all key types. The target key must be marked exportable. This operation requires the keys/release permission.
version (str or None) â A specific version of the key to release. If unspecified, the latest version is released.
algorithm (str or KeyExportEncryptionAlgorithm or None) â The encryption algorithm to use to protect the released key material.
nonce (str or None) â A client-provided nonce for freshness.
The result of the key release.
Restore a key backup to the vault.
Requires keys/restore permission.
This imports all versions of the key, with its name, attributes, and access control policies. If the keyâs name is already in use, restoring it will fail. Also, the target vault must be owned by the same Microsoft Azure subscription as the source vault.
backup (bytes) â A key backup as returned by backup_key()
The restored key
ResourceExistsError or HttpResponseError â the former if the backed up keyâs name is already in use; the latter for other errors
Example
# restore a key backup restored_key = key_client.restore_key_backup(key_backup) print(restored_key.id) print(restored_key.properties.version)
Rotate the key based on the key policy by generating a new version of the key.
This operation requires the keys/rotate permission.
name (str) â The name of the key to rotate.
The new version of the rotated key.
Runs a network request using the clientâs existing pipeline.
The request URL can be relative to the vault URL. The service API version used for the request is the same as the clientâs unless otherwise specified. This method does not raise if the response is an error; to raise an exception, call raise_for_status() on the returned response object. For more information about how to send custom requests with this method, see https://aka.ms/azsdk/dpcodegen/python/send_request.
request (HttpRequest) â The network request you want to make.
stream (bool) â Whether the response payload will be streamed. Defaults to False.
The response of your network call. Does not do error handling on your response.
Change a keyâs properties (not its cryptographic material).
Requires keys/update permission.
key_operations (List[KeyOperation or str] or None) â Allowed key operations
enabled (bool or None) â Whether the key is enabled for use.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
not_before (datetime or None) â Not before date of the key in UTC
expires_on (datetime or None) â Expiry date of the key in UTC
release_policy (KeyReleasePolicy or None) â The policy rules under which the key can be exported.
The updated key
ResourceNotFoundError or HttpResponseError â the former if the key doesnât exist; the latter for other errors
Example
Update a keyâs attributesï# update attributes of an existing key expires_on = date_parse.parse("2050-01-02T08:00:00.000Z") tags = {"foo": "updated tag"} updated_key = key_client.update_key_properties(key.name, expires_on=expires_on, tags=tags) print(updated_key.properties.version) print(updated_key.properties.updated_on) print(updated_key.properties.expires_on) print(updated_key.properties.tags) print(key.key_type)
Updates the rotation policy of a Key Vault key.
This operation requires the keys/update permission.
key_name (str) â The name of the key in the given vault.
policy (KeyRotationPolicy) â The new rotation policy for the key.
lifetime_actions (List[KeyRotationLifetimeAction]) â Actions that will be performed by Key Vault over the lifetime of a key. This will override the lifetime actions of the provided policy
.
expires_in (str) â The expiry time of the policy that will be applied on new key versions, defined as an ISO 8601 duration. For example: 90 days is âP90Dâ, 3 months is âP3Mâ, and 48 hours is âPT48Hâ. See Wikipedia for more information on ISO 8601 durations. This will override the expiry time of the provided policy
.
The updated rotation policy.
Supported elliptic curves
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.
The SECG SECP256K1 elliptic curve.
The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.
The NIST P-521 elliptic curve, AKA SECG curve SECP521R1.
Supported algorithms for protecting exported key material
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
Supported key operations
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
A keyâs ID and attributes.
key_id (str) â The key ID.
attributes (KeyAttributes) â The key attributes.
managed (bool) â Whether the keyâs lifetime is managed by Key Vault.
tags (dict[str, str] or None) â Application specific metadata in the form of key-value pairs.
release_policy (KeyReleasePolicy or None) â The azure.keyvault.keys.KeyReleasePolicy specifying the rules under which the key can be exported.
The key attestation, if available and requested.
The key or key version attestation information.
KeyAttestation or None
When the key was created, in UTC.
When the key was created, in UTC.
datetime or None
Whether the key is enabled for use.
True if the key is enabled for use; False otherwise.
bool or None
When the key will expire, in UTC.
When the key will expire, in UTC.
datetime or None
Whether the private key can be exported.
True if the private key can be exported; False otherwise.
bool or None
The underlying HSM platform.
The underlying HSM platform.
str or None
The key ID.
The key ID.
Whether the keyâs lifetime is managed by Key Vault. If the key backs a certificate, this will be true.
True if the keyâs lifetime is managed by Key Vault; False otherwise.
bool or None
The key name.
The key name.
The time before which the key can not be used, in UTC.
The time before which the key can not be used, in UTC.
datetime or None
The number of days the key is retained before being deleted from a soft-delete enabled Key Vault.
The number of days the key is retained before being deleted from a soft-delete enabled Key Vault.
int or None
The vaultâs deletion recovery level for keys.
The vaultâs deletion recovery level for keys.
str or None
The KeyReleasePolicy
specifying the rules under which the key can be exported.
The keyâs release policy specifying the rules for exporting.
KeyReleasePolicy or None
Application specific metadata in the form of key-value pairs.
When the key was last updated, in UTC.
When the key was last updated, in UTC.
datetime or None
URL of the vault containing the key.
URL of the vault containing the key.
The key version.
The key version.
str or None
The policy rules under which a key can be exported.
encoded_policy (bytes) â The policy rules under which the key can be released. Encoded based on the content_type
. For more information regarding release policy grammar, please refer to: https://aka.ms/policygrammarkeys for Azure Key Vault; https://aka.ms/policygrammarmhsm for Azure Managed HSM.
content_type (str) â Content type and version of the release policy. Defaults to âapplication/json; charset=utf-8â if omitted.
immutable (bool) â Marks a release policy as immutable. An immutable release policy cannot be changed or updated after being marked immutable. Release policies are mutable by default.
An action and its corresponding trigger that will be performed by Key Vault over the lifetime of a key.
action (KeyRotationPolicyAction or str) â The action that will be executed.
time_after_create (str or None) â
Time after creation to attempt the specified action, as an ISO 8601 duration. For example, 90 days is âP90Dâ. See Wikipedia for more information on ISO 8601 durations.
time_before_expiry (str or None) â
Time before expiry to attempt the specified action, as an ISO 8601 duration. For example, 90 days is âP90Dâ. See Wikipedia for more information on ISO 8601 durations.
The key rotation policy that belongs to a key.
id (str or None) â The identifier of the key rotation policy.
lifetime_actions (list[KeyRotationLifetimeAction]) â Actions that will be performed by Key Vault over the lifetime of a key.
expires_in (str or None) â
The expiry time of the policy that will be applied on new key versions, defined as an ISO 8601 duration. For example, 90 days is âP90Dâ. See Wikipedia for more information on ISO 8601 durations.
created_on (datetime or None) â When the policy was created, in UTC
updated_on (datetime or None) â When the policy was last updated, in UTC
The action that will be executed in a key rotation policy
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
Trigger Event Grid events.
Rotate the key based on the key policy.
Supported key types
Return a translation table usable for str.translate().
If there is only one argument, it must be a dictionary mapping Unicode ordinals (integers) or characters to Unicode ordinals, strings or None. Character keys will be then converted to ordinals. If there are two arguments, they must be strings of equal length, and in the resulting dictionary, each character in x will be mapped to the character at the same position in y. If there is a third argument, it must be a string, whose characters will be mapped to None in the result.
Return a capitalized version of the string.
More specifically, make the first character have upper case and the rest lower case.
Return a version of the string suitable for caseless comparisons.
Return a centered string of length width.
Padding is done using the specified fill character (default is a space).
Return the number of non-overlapping occurrences of substring sub in string S[start:end].
Optional arguments start and end are interpreted as in slice notation.
Encode the string using the codec registered for encoding.
The encoding in which to encode the string.
The error handling scheme to use for encoding errors. The default is âstrictâ meaning that encoding errors raise a UnicodeEncodeError. Other possible values are âignoreâ, âreplaceâ and âxmlcharrefreplaceâ as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
Return True if the string ends with the specified suffix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return a formatted version of the string, using substitutions from args and kwargs. The substitutions are identified by braces (â{â and â}â).
Return a formatted version of the string, using substitutions from mapping. The substitutions are identified by braces (â{â and â}â).
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return True if the string is an alpha-numeric string, False otherwise.
A string is alpha-numeric if all characters in the string are alpha-numeric and there is at least one character in the string.
Return True if the string is an alphabetic string, False otherwise.
A string is alphabetic if all characters in the string are alphabetic and there is at least one character in the string.
Return True if all characters in the string are ASCII, False otherwise.
ASCII characters have code points in the range U+0000-U+007F. Empty string is ASCII too.
Return True if the string is a decimal string, False otherwise.
A string is a decimal string if all characters in the string are decimal and there is at least one character in the string.
Return True if the string is a digit string, False otherwise.
A string is a digit string if all characters in the string are digits and there is at least one character in the string.
Return True if the string is a valid Python identifier, False otherwise.
Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as âdefâ or âclassâ.
Return True if the string is a lowercase string, False otherwise.
A string is lowercase if all cased characters in the string are lowercase and there is at least one cased character in the string.
Return True if the string is a numeric string, False otherwise.
A string is numeric if all characters in the string are numeric and there is at least one character in the string.
Return True if all characters in the string are printable, False otherwise.
A character is printable if repr() may use it in its output.
Return True if the string is a whitespace string, False otherwise.
A string is whitespace if all characters in the string are whitespace and there is at least one character in the string.
Return True if the string is a title-cased string, False otherwise.
In a title-cased string, upper- and title-case characters may only follow uncased characters and lowercase characters only cased ones.
Return True if the string is an uppercase string, False otherwise.
A string is uppercase if all cased characters in the string are uppercase and there is at least one cased character in the string.
Concatenate any number of strings.
The string whose method is called is inserted in between each given string. The result is returned as a new string.
Example: â.â.join([âabâ, âpqâ, ârsâ]) -> âab.pq.rsâ
Return a left-justified string of length width.
Padding is done using the specified fill character (default is a space).
Return a copy of the string converted to lowercase.
Return a copy of the string with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
Partition the string into three parts using the given separator.
This will search for the separator in the string. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing the original string and two empty strings.
Return a str with the given prefix string removed if present.
If the string starts with the prefix string, return string[len(prefix):]. Otherwise, return a copy of the original string.
Return a str with the given suffix string removed if present.
If the string ends with the suffix string and that suffix is not empty, return string[:-len(suffix)]. Otherwise, return a copy of the original string.
Return a copy with all occurrences of substring old replaced by new.
- count
Maximum number of occurrences to replace. -1 (the default value) means replace all occurrences.
If the optional argument count is given, only the first count occurrences are replaced.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
Optional arguments start and end are interpreted as in slice notation. Raises ValueError when the substring is not found.
Return a right-justified string of length width.
Padding is done using the specified fill character (default is a space).
Partition the string into three parts using the given separator.
This will search for the separator in the string, starting at the end. If the separator is found, returns a 3-tuple containing the part before the separator, the separator itself, and the part after it.
If the separator is not found, returns a 3-tuple containing two empty strings and the original string.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the end of the string and works to the front.
Return a copy of the string with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Return a list of the substrings in the string, using sep as the separator string.
- sep
The separator used to split the string.
When set to None (the default value), will split on any whitespace character (including n r t f and spaces) and will discard empty strings from the result.
- maxsplit
Maximum number of splits. -1 (the default value) means no limit.
Splitting starts at the front of the string and works to the end.
Note, str.split() is mainly useful for data that has been intentionally delimited. With natural text that includes punctuation, consider using the regular expression module.
Return a list of the lines in the string, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends is given and true.
Return True if the string starts with the specified prefix, False otherwise.
A string or a tuple of strings to try.
Optional start position. Default: start of the string.
Optional stop position. Default: end of the string.
Return a copy of the string with leading and trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
Convert uppercase characters to lowercase and lowercase characters to uppercase.
Return a version of the string where each word is titlecased.
More specifically, words start with uppercased characters and all remaining cased characters have lower case.
Replace each character in the string using the given translation table.
- table
Translation table, which must be a mapping of Unicode ordinals to Unicode ordinals, strings, or None.
The table must implement lookup/indexing via __getitem__, for instance a dictionary or list. If this operation raises LookupError, the character is left untouched. Characters mapped to None are deleted.
Return a copy of the string converted to uppercase.
Pad a numeric string with zeros on the left, to fill a field of the given width.
The string is never truncated.
Elliptic Curve
Elliptic Curve with a private key which is not exportable from the HSM
Octet sequence (used to represent symmetric keys)
Octet sequence with a private key which is not exportable from the HSM
//tools.ietf.org/html/rfc3447)
RSA (https
RSA with a private key which is not exportable from the HSM
A keyâs attributes and cryptographic material.
key_id (str) â Key Vaultâs identifier for the key. Typically a URI, e.g. https://myvault.vault.azure.net/keys/my-key/version
jwk (Dict[str, Any]) â The keyâs cryptographic material as a JSON Web Key (https://tools.ietf.org/html/rfc7517). This may be provided as a dictionary or keyword arguments. See JsonWebKey
for field names.
Providing cryptographic material as keyword arguments:
from azure.keyvault.keys.models import KeyVaultKey key_id = 'https://myvault.vault.azure.net/keys/my-key/my-key-version' key_bytes = os.urandom(32) key = KeyVaultKey(key_id, k=key_bytes, kty='oct', key_ops=['unwrapKey', 'wrapKey'])
Providing cryptographic material as a dictionary:
from azure.keyvault.keys.models import KeyVaultKey key_id = 'https://myvault.vault.azure.net/keys/my-key/my-key-version' key_bytes = os.urandom(32) jwk = {'k': key_bytes, 'kty': 'oct', 'key_ops': ['unwrapKey', 'wrapKey']} key = KeyVaultKey(key_id, jwk=jwk)
The key ID.
The key ID.
The JSON Web Key (JWK) for the key.
The JSON Web Key (JWK) for the key.
Permitted operations. See KeyOperation
for possible values.
Permitted operations. See KeyOperation
for possible values.
List[KeyOperation or str]
The keyâs type. See KeyType
for possible values.
The key name.
The key name.
The key properties.
The key properties.
Information about a KeyVaultKey parsed from a key ID.
source_id (str) â The full original identifier of a key
ValueError â if the key ID is improperly formatted
Example
key = client.get_key(key_name) parsed_key_id = KeyVaultKeyIdentifier(key.id) print(parsed_key_id.name) print(parsed_key_id.vault_url) print(parsed_key_id.version) print(parsed_key_id.source_id)
The result of a key release operation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4