Skip to content

AzureautomationClient

Classes

CreateJobResponse dataclass

CreateJobResponse(id: Optional[str] = None, properties: Optional[Dict[str, Any]] = None)

Response for Get status of job

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

Resource ID of the Job

properties class-attribute instance-attribute
properties: Optional[Dict[str, Any]] = None

properties

CreateJobInput dataclass

CreateJobInput(properties: Optional[Dict[str, Any]] = None)

Create job

SubscriptionListResult dataclass

SubscriptionListResult(value: Optional[List[Subscription]] = None, next_link: Optional[str] = None)

Response for List subscriptions

Attributes

value class-attribute instance-attribute
value: Optional[List[Subscription]] = None

The subscriptions.

next_link: Optional[str] = field(default=None, metadata={'wire_name': 'nextLink'})

The URL to get the next set of results.

ResourceGroupListResult dataclass

ResourceGroupListResult(value: Optional[List[ResourceGroup]] = None, next_link: Optional[str] = None)

Response for List resource groups

Attributes

value class-attribute instance-attribute
value: Optional[List[ResourceGroup]] = None

The list of resource groups.

next_link: Optional[str] = field(default=None, metadata={'wire_name': 'nextLink'})

The URL to get the next set of results.

AutomationAccountResponse dataclass

AutomationAccountResponse(value: Optional[List[Dict[str, Any]]] = None)

Response for List Automation accounts

Attributes

value class-attribute instance-attribute
value: Optional[List[Dict[str, Any]]] = None

value

RunbookListResults dataclass

RunbookListResults(value: Optional[List[Dict[str, Any]]] = None)

Response for List runbooks

Subscription dataclass

Subscription(id: Optional[str] = None, subscription_id: Optional[str] = None, tenant_id: Optional[str] = None, display_name: Optional[str] = None, state: Optional[str] = None, authorization_source: Optional[str] = None)

Definition: Subscription

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The fully qualified Id. For example, /subscriptions/00000000-0000-0000-0000-000000000000.

subscription_id class-attribute instance-attribute
subscription_id: Optional[str] = field(default=None, metadata={'wire_name': 'subscriptionId'})

The subscription Id.

tenant_id class-attribute instance-attribute
tenant_id: Optional[str] = field(default=None, metadata={'wire_name': 'tenantId'})

The tenant Id.

display_name class-attribute instance-attribute
display_name: Optional[str] = field(default=None, metadata={'wire_name': 'displayName'})

The subscription display name.

state class-attribute instance-attribute
state: Optional[str] = None

The subscription state.

authorization_source class-attribute instance-attribute
authorization_source: Optional[str] = field(default=None, metadata={'wire_name': 'authorizationSource'})

The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'.

ResourceGroup dataclass

ResourceGroup(id: Optional[str] = None, name: Optional[str] = None, managed_by: Optional[str] = None)

Definition: ResourceGroup

Attributes

id class-attribute instance-attribute
id: Optional[str] = None

The ID of the resource group (e.g. /subscriptions/XXX/resourceGroups/YYY).

name class-attribute instance-attribute
name: Optional[str] = None

The Name of the resource group.

managed_by class-attribute instance-attribute
managed_by: Optional[str] = field(default=None, metadata={'wire_name': 'managedBy'})

Id of the resource that manages this resource group.

AzureautomationClient

AzureautomationClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)

Bases: ConnectorClientBase

Typed client for azureautomation connector.

Initialize a AzureautomationClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
token_provider Optional[TokenProvider]

Optional token provider. Defaults to ManagedIdentityTokenProvider.

None
options Optional[ConnectorClientOptions]

Optional connector client options.

None

Methods:

get_job_output_async async
get_job_output_async(subscription_id: str, resource_group_name: str, automation_account: str, job_id: str) -> bytes

Get job output

Get outputs of an Azure Automation job.

get_status_of_job_async async
get_status_of_job_async(subscription_id: str, resource_group_name: str, automation_account: str, job_id: str) -> dict[str, Any] | None

Get status of job

Get Status of a Job

create_job_async async
create_job_async(input: CreateJobInput, subscription_id: str, resource_group_name: str, automation_account: str, runbook_name: Optional[str] = None, wait: Optional[bool] = None) -> dict[str, Any] | None

Create job

Create Job to run on hybrid worker

subscriptions_list_async async
subscriptions_list_async() -> dict[str, Any] | None

List subscriptions

Gets a list of all the subscriptions to which the principal has access.

resource_groups_list_async async
resource_groups_list_async(subscription_id: str) -> dict[str, Any] | None

List resource groups

Lists all the resource groups within the subscription. Paginates at 1,000 records.

automation_accounts_list_async async
automation_accounts_list_async(subscription_id: str, resource_group_name: str) -> dict[str, Any] | None

List Automation accounts

Lists Azure Automation accounts in a resource group.

runbooks_list_async async
runbooks_list_async(subscription_id: str, resource_group_name: str, automation_account: str) -> dict[str, Any] | None

List runbooks

Lists Azure Automation runbooks in an automation account.

get_runbook_async async
get_runbook_async(subscription_id: str, resource_group_name: str, automation_account: str, runbook_name: str) -> dict[str, Any] | None

Get runbook

Get information on an Azure Automation runbook.