SecretsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
secrets attribute.
Constructor
SecretsOperations(*args, **kwargs)
Methods
| create_or_update |
Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. |
| get |
Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. |
| list |
The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. |
| update |
Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. |
create_or_update
Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
create_or_update(resource_group_name: str, vault_name: str, secret_name: str, parameters: _models.SecretCreateOrUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Secret
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the Resource Group to which the vault belongs. Required. |
|
vault_name
Required
|
Name of the vault. Required. |
|
secret_name
Required
|
Name of the secret. The value you provide may be copied globally for the purpose of running the service. The value provided should not include personally identifiable or sensitive information. Required. |
|
parameters
Required
|
Parameters to create or update the secret. Is either a SecretCreateOrUpdateParameters type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
Secret or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
get
Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
get(resource_group_name: str, vault_name: str, secret_name: str, **kwargs: Any) -> Secret
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the Resource Group to which the vault belongs. Required. |
|
vault_name
Required
|
The name of the vault. Required. |
|
secret_name
Required
|
The name of the secret. Required. |
Returns
| Type | Description |
|---|---|
|
Secret or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
list
The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
list(resource_group_name: str, vault_name: str, top: int | None = None, **kwargs: Any) -> ItemPaged[Secret]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the Resource Group to which the vault belongs. Required. |
|
vault_name
Required
|
The name of the vault. Required. |
|
top
|
Maximum number of results to return. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of either Secret or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
update
Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets.
update(resource_group_name: str, vault_name: str, secret_name: str, parameters: _models.SecretPatchParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Secret
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the Resource Group to which the vault belongs. Required. |
|
vault_name
Required
|
Name of the vault. Required. |
|
secret_name
Required
|
Name of the secret. Required. |
|
parameters
Required
|
Parameters to patch the secret. Is either a SecretPatchParameters type or a IO[bytes] type. Required. |
Returns
| Type | Description |
|---|---|
|
Secret or the result of cls(response) |
Exceptions
| Type | Description |
|---|---|
Attributes
models
models = <module 'azure.mgmt.keyvault.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv154\\Lib\\site-packages\\azure\\mgmt\\keyvault\\models\\__init__.py'>