Share via


GraphQueryOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ResourceGraphClient's

<xref:graph_query> attribute.

Constructor

GraphQueryOperations(*args, **kwargs)

Methods

create_or_update

Create a new graph query.

delete

Delete a graph query.

get

Get a single graph query by its resourceName.

list

Get all graph queries defined within a specified subscription and resource group.

list_by_subscription

Get all graph queries defined within a specified subscription.

update

Updates a graph query that has already been added.

create_or_update

Create a new graph query.

create_or_update(subscription_id: str, resource_group_name: str, resource_name: str, properties: _models.GraphQueryResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.GraphQueryResource

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

resource_group_name
Required
str

The name of the resource group. Required.

resource_name
Required
str

The name of the Graph Query resource. Required.

properties
Required

Properties that need to be specified to create a new graph query. Is either a GraphQueryResource type or a IO[bytes] type. Required.

Returns

Type Description

GraphQueryResource or the result of cls(response)

Exceptions

Type Description

delete

Delete a graph query.

delete(subscription_id: str, resource_group_name: str, resource_name: str, **kwargs: Any) -> None

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

resource_group_name
Required
str

The name of the resource group. Required.

resource_name
Required
str

The name of the Graph Query resource. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Get a single graph query by its resourceName.

get(subscription_id: str, resource_group_name: str, resource_name: str, **kwargs: Any) -> GraphQueryResource

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

resource_group_name
Required
str

The name of the resource group. Required.

resource_name
Required
str

The name of the Graph Query resource. Required.

Returns

Type Description

GraphQueryResource or the result of cls(response)

Exceptions

Type Description

list

Get all graph queries defined within a specified subscription and resource group.

list(subscription_id: str, resource_group_name: str, **kwargs: Any) -> ItemPaged[GraphQueryResource]

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

resource_group_name
Required
str

The name of the resource group. Required.

Returns

Type Description

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

Exceptions

Type Description

list_by_subscription

Get all graph queries defined within a specified subscription.

list_by_subscription(subscription_id: str, **kwargs: Any) -> ItemPaged[GraphQueryResource]

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

Returns

Type Description

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

Exceptions

Type Description

update

Updates a graph query that has already been added.

update(subscription_id: str, resource_group_name: str, resource_name: str, body: _models.GraphQueryUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.GraphQueryResource

Parameters

Name Description
subscription_id
Required
str

The Azure subscription Id. Required.

resource_group_name
Required
str

The name of the resource group. Required.

resource_name
Required
str

The name of the Graph Query resource. Required.

body
Required

Properties that need to be specified to create a new graph query. Is either a GraphQueryUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

GraphQueryResource or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.resourcegraph.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv208\\Lib\\site-packages\\azure\\mgmt\\resourcegraph\\models\\__init__.py'>