Module resty.azure.api.keyvault
The KeyVault API module.
Functions
build_url (resource_type, resource_name, resource_version, opts) | Builds a URL for a given Azure Key Vault resource. |
delete_resource (resource_type, resource_name, resource_version) | This function deletes a resource from Azure Key Vault. |
get_resource (resource_type, resource_name, resource_version, opts) | This function retrieves a resource from Azure Key Vault. |
new (parent_client, vault_uri) | Creates a new KeyVault object. |
post_resource (resource_type, resource_name, resource_version) | This function posts a resource to Azure Key Vault. |
put_resource (resource_type, resource_name, resource_body, resource_version) | This function puts a resource to Azure Key Vault. |
query_resource (parent_client, url, method, body) | Makes a request to Azure API using the provided parent client, URL, method, and body. |
update_resource (resource_type, resource_name, resource_body, resource_version) | This function updates a resource in Azure Key Vault. |
Functions
- build_url (resource_type, resource_name, resource_version, opts)
-
Builds a URL for a given Azure Key Vault resource.
Parameters:
- resource_type string: The type of the resource (e.g. "secrets", "keys", "certificates").
- resource_name string: The name of the resource.
- resource_version string: The version of the resource (optional).
- opts [opt] table: Extra options to include in the URL (optional).
Returns:
-
string: The URL for the given resource.
- delete_resource (resource_type, resource_name, resource_version)
-
This function deletes a resource from Azure Key Vault.
Parameters:
- resource_type (string) The type of the resource to delete.
- resource_name (string) The name of the resource to delete.
- resource_version (string) The version of the resource to delete. Defaults to "latest-version".
Returns:
-
(table) The response from the Azure Key Vault API.
- get_resource (resource_type, resource_name, resource_version, opts)
-
This function retrieves a resource from Azure Key Vault.
Parameters:
- resource_type (string) The type of the resource to retrieve.
- resource_name (string) The name of the resource to retrieve.
- resource_version (string) The version of the resource to retrieve. Defaults to "latest-version".
- opts (table) options table passed to build_url.
Returns:
-
(table) The response from the Azure Key Vault API.
- new (parent_client, vault_uri)
-
Creates a new KeyVault object.
Parameters:
- parent_client string: The parent client object.
- vault_uri string: The URI of the KeyVault to use. If not provided, the default URI from the parent client's global configuration will be used.
Returns:
-
table: The new KeyVault object.
- post_resource (resource_type, resource_name, resource_version)
-
This function posts a resource to Azure Key Vault.
Parameters:
- resource_type (string) The type of the resource to post.
- resource_name (string) The name of the resource to post.
- resource_version (string) The version of the resource to post. Defaults to "latest-version".
Returns:
-
(table) The response from the Azure Key Vault API.
- put_resource (resource_type, resource_name, resource_body, resource_version)
-
This function puts a resource to Azure Key Vault.
Parameters:
- resource_type (string) The type of the resource to put.
- resource_name (string) The name of the resource to put.
- resource_body (table) The body of the resource to put.
- resource_version (string) The version of the resource to put. Defaults to "latest-version".
Returns:
-
(table) The response from the Azure Key Vault API.
- query_resource (parent_client, url, method, body)
-
Makes a request to Azure API using the provided parent client, URL, method, and body.
Parameters:
- parent_client The parent client object used to make the request.
- url The URL to send the request to.
- method The HTTP method to use for the request.
- body The request body.
Returns:
-
The response from the Azure API, or nil and an error message if the request failed.
- update_resource (resource_type, resource_name, resource_body, resource_version)
-
This function updates a resource in Azure Key Vault.
Parameters:
- resource_type (string) The type of the resource to update.
- resource_name (string) The name of the resource to update.
- resource_body (table) The body of the resource to update.
- resource_version (string) The version of the resource to update. Defaults to "latest-version".
Returns:
-
(table) The response from the Azure Key Vault API.