TemplateSpecsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

TemplateSpecsClient's

<xref:template_specs> attribute.

Inheritance
builtins.object
TemplateSpecsOperations

Constructor

TemplateSpecsOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a Template Spec.

delete

Deletes a Template Spec by name. When operation completes, status code 200 returned without content.

get

Gets a Template Spec with a given name.

list_by_resource_group

Lists all the Template Specs within the specified resource group.

list_by_subscription

Lists all the Template Specs within the specified subscriptions.

update

Updates Template Spec tags with specified values.

create_or_update

Creates or updates a Template Spec.

async create_or_update(resource_group_name: str, template_spec_name: str, template_spec: _models.TemplateSpec, *, content_type: str = 'application/json', **kwargs: Any) -> _models.TemplateSpec

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

template_spec_name
Required
str

Name of the Template Spec. Required.

template_spec
Required

Template Spec supplied to the operation. Is either a TemplateSpec type or a IO[bytes] type. Required.

Returns

Type Description

TemplateSpec or the result of cls(response)

Exceptions

Type Description

delete

Deletes a Template Spec by name. When operation completes, status code 200 returned without content.

async delete(resource_group_name: str, template_spec_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

template_spec_name
Required
str

Name of the Template Spec. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets a Template Spec with a given name.

async get(resource_group_name: str, template_spec_name: str, expand: str | TemplateSpecExpandKind | None = None, **kwargs: Any) -> TemplateSpec

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

template_spec_name
Required
str

Name of the Template Spec. Required.

expand
Required

Allows for expansion of additional Template Spec details in the response. Optional. "versions" Default value is None.

Returns

Type Description

TemplateSpec or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

Lists all the Template Specs within the specified resource group.

list_by_resource_group(resource_group_name: str, expand: str | TemplateSpecExpandKind | None = None, **kwargs: Any) -> AsyncIterable[TemplateSpec]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

expand
Required

Allows for expansion of additional Template Spec details in the response. Optional. "versions" Default value is None.

Returns

Type Description

An iterator like instance of either TemplateSpec or the result of cls(response)

Exceptions

Type Description

list_by_subscription

Lists all the Template Specs within the specified subscriptions.

list_by_subscription(expand: str | TemplateSpecExpandKind | None = None, **kwargs: Any) -> AsyncIterable[TemplateSpec]

Parameters

Name Description
expand
Required

Allows for expansion of additional Template Spec details in the response. Optional. "versions" Default value is None.

Returns

Type Description

An iterator like instance of either TemplateSpec or the result of cls(response)

Exceptions

Type Description

update

Updates Template Spec tags with specified values.

async update(resource_group_name: str, template_spec_name: str, template_spec: _models.TemplateSpecUpdateModel | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.TemplateSpec

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. The name is case insensitive. Required.

template_spec_name
Required
str

Name of the Template Spec. Required.

template_spec
Required

Template Spec resource with the tags to be updated. Is either a TemplateSpecUpdateModel type or a IO[bytes] type. Default value is None.

Returns

Type Description

TemplateSpec or the result of cls(response)

Exceptions

Type Description

Attributes

models

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