VariablesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:variables> attribute.
- Inheritance
-
builtins.objectVariablesOperations
Constructor
VariablesOperations(*args, **kwargs)
Methods
create_or_update |
Creates or updates a variable. This operation creates or updates a variable with the given subscription and name. Policy variables can only be used by a policy definition at the scope they are created or below. |
create_or_update_at_management_group |
Creates or updates a variable. This operation creates or updates a variable with the given management group and name. Policy variables can only be used by a policy definition at the scope they are created or below. |
delete |
Deletes a variable. This operation deletes a variable, given its name and the subscription it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'. |
delete_at_management_group |
Deletes a variable. This operation deletes a variable, given its name and the management group it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'. |
get |
Retrieves a variable. This operation retrieves a single variable, given its name and the subscription it was created at. |
get_at_management_group |
Retrieves a variable. This operation retrieves a single variable, given its name and the management group it was created at. |
list |
Retrieves all variables that are at this subscription level. This operation retrieves the list of all variables associated with the given subscription. |
list_for_management_group |
Retrieves all variables that are at this management group level. This operation retrieves the list of all variables applicable to the management group. |
create_or_update
Creates or updates a variable.
This operation creates or updates a variable with the given subscription and name. Policy variables can only be used by a policy definition at the scope they are created or below.
create_or_update(variable_name: str, parameters: _models.Variable, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Variable
Parameters
Name | Description |
---|---|
variable_name
Required
|
The name of the variable to operate on. Required. |
parameters
Required
|
Parameters for the variable. Is either a Variable type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
create_or_update_at_management_group
Creates or updates a variable.
This operation creates or updates a variable with the given management group and name. Policy variables can only be used by a policy definition at the scope they are created or below.
create_or_update_at_management_group(management_group_id: str, variable_name: str, parameters: _models.Variable, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Variable
Parameters
Name | Description |
---|---|
management_group_id
Required
|
The ID of the management group. Required. |
variable_name
Required
|
The name of the variable to operate on. Required. |
parameters
Required
|
Parameters for the variable. Is either a Variable type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes a variable.
This operation deletes a variable, given its name and the subscription it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.
delete(variable_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
variable_name
Required
|
The name of the variable to operate on. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete_at_management_group
Deletes a variable.
This operation deletes a variable, given its name and the management group it was created in. The scope of a variable is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.
delete_at_management_group(management_group_id: str, variable_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
management_group_id
Required
|
The ID of the management group. Required. |
variable_name
Required
|
The name of the variable to operate on. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Retrieves a variable.
This operation retrieves a single variable, given its name and the subscription it was created at.
get(variable_name: str, **kwargs: Any) -> Variable
Parameters
Name | Description |
---|---|
variable_name
Required
|
The name of the variable to operate on. Required. |
Returns
Type | Description |
---|---|
Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get_at_management_group
Retrieves a variable.
This operation retrieves a single variable, given its name and the management group it was created at.
get_at_management_group(management_group_id: str, variable_name: str, **kwargs: Any) -> Variable
Parameters
Name | Description |
---|---|
management_group_id
Required
|
The ID of the management group. Required. |
variable_name
Required
|
The name of the variable to operate on. Required. |
Returns
Type | Description |
---|---|
Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Retrieves all variables that are at this subscription level.
This operation retrieves the list of all variables associated with the given subscription.
list(**kwargs: Any) -> Iterable[Variable]
Returns
Type | Description |
---|---|
An iterator like instance of either Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_for_management_group
Retrieves all variables that are at this management group level.
This operation retrieves the list of all variables applicable to the management group.
list_for_management_group(management_group_id: str, **kwargs: Any) -> Iterable[Variable]
Parameters
Name | Description |
---|---|
management_group_id
Required
|
The ID of the management group. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either Variable or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.resource.policy.v2022_08_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\resource\\policy\\v2022_08_01_preview\\models\\__init__.py'>
Azure SDK for Python
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour