SecretsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

KeyVaultManagementClient's

secrets attribute.

Inheritance
builtins.object
SecretsOperations

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
str

The name of the Resource Group to which the vault belongs. Required.

vault_name
Required
str

Name of the vault. Required.

secret_name
Required
str

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 type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

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
str

The name of the Resource Group to which the vault belongs. Required.

vault_name
Required
str

The name of the vault. Required.

secret_name
Required
str

The name of the secret. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

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) -> Iterable[Secret]

Parameters

Name Description
resource_group_name
Required
str

The name of the Resource Group to which the vault belongs. Required.

vault_name
Required
str

The name of the vault. Required.

top
Required
int

Maximum number of results to return. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

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
str

The name of the Resource Group to which the vault belongs. Required.

vault_name
Required
str

Name of the vault. Required.

secret_name
Required
str

Name of the secret. Required.

parameters
Required

Parameters to patch the secret. Is either a SecretPatchParameters type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

Secret or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.keyvault.v2021_10_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\keyvault\\v2021_10_01\\models\\__init__.py'>