VariableValuesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

PolicyClient's

<xref:variable_values> attribute.

Inheritance
builtins.object
VariableValuesOperations

Constructor

VariableValuesOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a variable value.

This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.

create_or_update_at_management_group

Creates or updates a variable value.

This operation creates or updates a variable value with the given management group and name for a given variable. Variable values are scoped to the variable for which they are created for.

delete

Deletes a variable value.

This operation deletes a variable value, given its name, the subscription it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

delete_at_management_group

Deletes a variable value.

This operation deletes a variable value, given its name, the management group it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

get

Retrieves a variable value.

This operation retrieves a single variable value; given its name, subscription it was created at and the variable it's created for.

get_at_management_group

Retrieves a variable value.

This operation retrieves a single variable value; given its name, management group it was created at and the variable it's created for.

list

List variable values for a variable.

This operation retrieves the list of all variable values associated with the given variable that is at a subscription level.

list_for_management_group

List variable values at management group level.

This operation retrieves the list of all variable values applicable the variable indicated at the management group scope.

create_or_update

Creates or updates a variable value.

This operation creates or updates a variable value with the given subscription and name for a given variable. Variable values are scoped to the variable for which they are created for.

create_or_update(variable_name: str, variable_value_name: str, parameters: _models.VariableValue, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VariableValue

Parameters

Name Description
variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

parameters
Required

Parameters for the variable value. Is either a VariableValue 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

VariableValue or the result of cls(response)

Exceptions

Type Description

create_or_update_at_management_group

Creates or updates a variable value.

This operation creates or updates a variable value with the given management group and name for a given variable. Variable values are scoped to the variable for which they are created for.

create_or_update_at_management_group(management_group_id: str, variable_name: str, variable_value_name: str, parameters: _models.VariableValue, *, content_type: str = 'application/json', **kwargs: Any) -> _models.VariableValue

Parameters

Name Description
management_group_id
Required
str

The ID of the management group. Required.

variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

parameters
Required

Parameters for the variable value. Is either a VariableValue 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

VariableValue or the result of cls(response)

Exceptions

Type Description

delete

Deletes a variable value.

This operation deletes a variable value, given its name, the subscription it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

delete(variable_name: str, variable_value_name: str, **kwargs: Any) -> None

Parameters

Name Description
variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_at_management_group

Deletes a variable value.

This operation deletes a variable value, given its name, the management group it was created in, and the variable it belongs to. The scope of a variable value is the part of its ID preceding '/providers/Microsoft.Authorization/variables/{variableName}'.

delete_at_management_group(management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any) -> None

Parameters

Name Description
management_group_id
Required
str

The ID of the management group. Required.

variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Retrieves a variable value.

This operation retrieves a single variable value; given its name, subscription it was created at and the variable it's created for.

get(variable_name: str, variable_value_name: str, **kwargs: Any) -> VariableValue

Parameters

Name Description
variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

VariableValue or the result of cls(response)

Exceptions

Type Description

get_at_management_group

Retrieves a variable value.

This operation retrieves a single variable value; given its name, management group it was created at and the variable it's created for.

get_at_management_group(management_group_id: str, variable_name: str, variable_value_name: str, **kwargs: Any) -> VariableValue

Parameters

Name Description
management_group_id
Required
str

The ID of the management group. Required.

variable_name
Required
str

The name of the variable to operate on. Required.

variable_value_name
Required
str

The name of the variable value to operate on. Required.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

VariableValue or the result of cls(response)

Exceptions

Type Description

list

List variable values for a variable.

This operation retrieves the list of all variable values associated with the given variable that is at a subscription level.

list(variable_name: str, **kwargs: Any) -> Iterable[VariableValue]

Parameters

Name Description
variable_name
Required
str

The name of the variable to operate on. Required.

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 VariableValue or the result of cls(response)

Exceptions

Type Description

list_for_management_group

List variable values at management group level.

This operation retrieves the list of all variable values applicable the variable indicated at the management group scope.

list_for_management_group(management_group_id: str, variable_name: str, **kwargs: Any) -> Iterable[VariableValue]

Parameters

Name Description
management_group_id
Required
str

The ID of the management group. Required.

variable_name
Required
str

The name of the variable to operate on. Required.

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 VariableValue or the result of cls(response)

Exceptions

Type Description

Attributes

models

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