ArmClient
Classes
LocationListResult
dataclass
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, subscription_policies: Optional[SubscriptionPolicies] = None, authorization_source: Optional[str] = None)
Response for Read a subscription
Attributes
id
class-attribute
instance-attribute
The fully qualified Id. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
subscription_id
class-attribute
instance-attribute
The subscription Id.
tenant_id
class-attribute
instance-attribute
The tenant Id.
display_name
class-attribute
instance-attribute
The subscription display name.
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'.
SubscriptionListResult
dataclass
Response for List subscriptions
DeploymentExtended
dataclass
DeploymentValidateResult
dataclass
DeploymentValidateResult(error: Optional[ResourceManagementErrorWithDetails] = None, properties: Optional[DeploymentPropertiesExtended] = None)
Response for Validate a template deployment
DeploymentExportResult
dataclass
DeploymentListResult
dataclass
DeploymentListResult(value: Optional[List[DeploymentExtended]] = None, next_link: Optional[str] = None)
Response for List template deployments
DeploymentOperation
dataclass
DeploymentOperation(id: Optional[str] = None, operation_id: Optional[str] = None, properties: Optional[DeploymentOperationProperties] = None)
Response for Read a template deployment operation
DeploymentOperationsListResult
dataclass
DeploymentOperationsListResult(value: Optional[List[DeploymentOperation]] = None, next_link: Optional[str] = None)
Response for Lists template deployment operations
Provider
dataclass
Provider(id: Optional[str] = None, namespace: Optional[str] = None, registration_state: Optional[str] = None, resource_types: Optional[List[ProviderResourceType]] = None)
Response for Unregister resource provider
ProviderListResult
dataclass
Response for List resource providers
ResourceListResult
dataclass
Response for List resources by resource group
ResourceGroup
dataclass
ResourceGroup(id: Optional[str] = None, name: Optional[str] = None, location: Optional[str] = None, managed_by: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, properties: Optional[ResourceGroupProperties] = None)
Response for Read a resource group
Attributes
id
class-attribute
instance-attribute
The ID of the resource group (e.g. /subscriptions/XXX/resourceGroups/YYY).
location
class-attribute
instance-attribute
The location of the resource group. It cannot be changed after the resource group has been created. Has to be one of the supported Azure Locations, such as West US, East US, West Europe, East Asia, etc.
managed_by
class-attribute
instance-attribute
Id of the resource that manages this resource group.
ResourceGroupExportResult
dataclass
ResourceGroupListResult
dataclass
ResourceGroupListResult(value: Optional[List[ResourceGroup]] = None, next_link: Optional[str] = None)
Response for List resource groups
GenericResource
dataclass
GenericResource(id: Optional[str] = None, name: Optional[str] = None, type_: Optional[str] = None, location: Optional[str] = None, tags: Optional[Dict[str, Any]] = None, plan: Optional[Plan] = None, kind: Optional[str] = None, managed_by: Optional[str] = None, sku: Optional[Sku] = None, identity: Optional[Identity] = None, properties: Optional[Dict[str, Any]] = None)
Response for Read a resource
Attributes
type_
class-attribute
instance-attribute
Resource type
managed_by
class-attribute
instance-attribute
Id of the resource that manages this resource.
ResourcesInvokeInput
dataclass
ResourcesInvokeResponse
dataclass
ProviderResourcesInvokeInput
dataclass
ProviderResourcesInvokeResponse
dataclass
TagValue
dataclass
TagDetails
dataclass
TagDetails(id: Optional[str] = None, tag_name: Optional[str] = None, count: Optional[TagCount] = None, values: Optional[List[TagValue]] = None)
Response for Create or update a subscription resource tag name
Attributes
tag_name
class-attribute
instance-attribute
The tag name.
TagsListResult
dataclass
Response for List subscription resource tags
Location
dataclass
Location(id: Optional[str] = None, subscription_id: Optional[str] = None, name: Optional[str] = None, display_name: Optional[str] = None, latitude: Optional[str] = None, longitude: Optional[str] = None)
Definition: Location
Attributes
id
class-attribute
instance-attribute
The fully qualified Id of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
subscription_id
class-attribute
instance-attribute
The subscription Id.
display_name
class-attribute
instance-attribute
The display name of the location.
latitude
class-attribute
instance-attribute
The latitude of the location.
SubscriptionPolicies
dataclass
SubscriptionPolicies(location_placement_id: Optional[str] = None, quota_id: Optional[str] = None, spending_limit: Optional[str] = None)
Definition: SubscriptionPolicies
Attributes
location_placement_id
class-attribute
instance-attribute
location_placement_id: Optional[str] = field(default=None, metadata={'wire_name': 'locationPlacementId'})
The subscription location placement Id. The Id indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.
quota_id
class-attribute
instance-attribute
The subscription quota Id.
TemplateLink
dataclass
Definition: TemplateLink
Attributes
ParametersLink
dataclass
Definition: ParametersLink
Attributes
DeploymentProperties
dataclass
DeploymentProperties(template: Optional[Dict[str, Any]] = None, template_link: Optional[TemplateLink] = None, parameters: Optional[Dict[str, Any]] = None, parameters_link: Optional[ParametersLink] = None, mode: Optional[str] = None, debug_setting: Optional[DebugSetting] = None)
Definition: DeploymentProperties
Attributes
template
class-attribute
instance-attribute
The template content. It can be a JObject or a well formed JSON string. Use only one of Template or TemplateLink.
parameters
class-attribute
instance-attribute
Deployment parameters. It can be a JObject or a well formed JSON string. Use only one of Parameters or ParametersLink.
DebugSetting
dataclass
Deployment
dataclass
Definition: Deployment
ResourceManagementErrorWithDetails
dataclass
ResourceManagementErrorWithDetails(code: Optional[str] = None, message: Optional[str] = None, target: Optional[str] = None, details: Optional[List[Dict[str, Any]]] = None)
Definition: ResourceManagementErrorWithDetails
Attributes
code
class-attribute
instance-attribute
The error code returned from the server.
message
class-attribute
instance-attribute
The error message returned from the server.
AliasPathType
dataclass
AliasType
dataclass
ProviderResourceType
dataclass
ProviderResourceType(resource_type: Optional[str] = None, locations: Optional[List[ObjectWithoutType]] = None, aliases: Optional[List[AliasType]] = None, api_versions: Optional[List[str]] = None, properties: Optional[Dict[str, Any]] = None)
Definition: ProviderResourceType
Attributes
resource_type
class-attribute
instance-attribute
The resource type.
locations
class-attribute
instance-attribute
The collection of locations where this resource type can be created in.
aliases
class-attribute
instance-attribute
The aliases that are supported by this resource type.
api_versions
class-attribute
instance-attribute
The api version.
BasicDependency
dataclass
BasicDependency(id: Optional[str] = None, resource_type: Optional[str] = None, resource_name: Optional[str] = None)
Definition: BasicDependency
Attributes
resource_type
class-attribute
instance-attribute
The dependency resource type.
Dependency
dataclass
Dependency(depends_on: Optional[List[BasicDependency]] = None, id: Optional[str] = None, resource_type: Optional[str] = None, resource_name: Optional[str] = None)
DeploymentPropertiesExtended
dataclass
DeploymentPropertiesExtended(provisioning_state: Optional[str] = None, correlation_id: Optional[str] = None, timestamp: Optional[str] = None, outputs: Optional[Dict[str, Any]] = None, providers: Optional[List[Provider]] = None, dependencies: Optional[List[Dependency]] = None, template: Optional[Dict[str, Any]] = None, template_link: Optional[TemplateLink] = None, parameters: Optional[Dict[str, Any]] = None, parameters_link: Optional[ParametersLink] = None, mode: Optional[str] = None, debug_setting: Optional[DebugSetting] = None)
Definition: DeploymentPropertiesExtended
Attributes
provisioning_state
class-attribute
instance-attribute
provisioning_state: Optional[str] = field(default=None, metadata={'wire_name': 'provisioningState'})
The state of the provisioning.
correlation_id
class-attribute
instance-attribute
The correlation ID of the deployment.
timestamp
class-attribute
instance-attribute
The timestamp of the template deployment.
outputs
class-attribute
instance-attribute
Key/value pairs that represent deploymentoutput.
providers
class-attribute
instance-attribute
The list of resource providers needed for the deployment.
dependencies
class-attribute
instance-attribute
The list of deployment dependencies.
template
class-attribute
instance-attribute
The template content. Use only one of Template or TemplateLink.
parameters
class-attribute
instance-attribute
Deployment parameters. Use only one of Parameters or ParametersLink.
Plan
dataclass
Plan(name: Optional[str] = None, publisher: Optional[str] = None, product: Optional[str] = None, promotion_code: Optional[str] = None)
Definition: Plan
Attributes
Sku
dataclass
Sku(name: Optional[str] = None, tier: Optional[str] = None, size: Optional[str] = None, family: Optional[str] = None, model: Optional[str] = None, capacity: Optional[int] = None)
Definition: Sku
Attributes
Identity
dataclass
Identity(principal_id: Optional[str] = None, tenant_id: Optional[str] = None, type_: Optional[str] = None)
Definition: Identity
Attributes
principal_id
class-attribute
instance-attribute
The principal id of resource identity.
tenant_id
class-attribute
instance-attribute
The tenant id of resource.
ResourceGroupProperties
dataclass
ExportTemplateRequest
dataclass
Definition: ExportTemplateRequest
Attributes
resources
class-attribute
instance-attribute
The ids of the resources. The only supported string currently is '*' (all resources). Future api updates will support exporting specific resources.
TagCount
dataclass
TargetResource
dataclass
TargetResource(id: Optional[str] = None, resource_name: Optional[str] = None, resource_type: Optional[str] = None)
Definition: TargetResource
Attributes
resource_name
class-attribute
instance-attribute
The name of the resource.
HttpMessage
dataclass
DeploymentOperationProperties
dataclass
DeploymentOperationProperties(provisioning_state: Optional[str] = None, timestamp: Optional[str] = None, service_request_id: Optional[str] = None, status_code: Optional[str] = None, status_message: Optional[Dict[str, Any]] = None, target_resource: Optional[TargetResource] = None, request: Optional[HttpMessage] = None, response: Optional[HttpMessage] = None)
Definition: DeploymentOperationProperties
Attributes
provisioning_state
class-attribute
instance-attribute
provisioning_state: Optional[str] = field(default=None, metadata={'wire_name': 'provisioningState'})
The state of the provisioning.
timestamp
class-attribute
instance-attribute
The date and time of the operation.
service_request_id
class-attribute
instance-attribute
Deployment operation service request id.
status_code
class-attribute
instance-attribute
Operation status code.
ObjectWithoutType
dataclass
ArmClient
ArmClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for arm connector.
Initialize a ArmClient.
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:
subscriptions_list_locations_async
async
Lists the subscription locations
Lists the locations available for the subscription.
subscriptions_get_async
async
Read a subscription
Reads the details for a particular subscription.
subscriptions_list_async
async
List subscriptions
Gets a list of all the subscriptions to which the principal has access.
deployments_get_async
async
deployments_get_async(subscription_id: str, resource_group_name: str, deployment_name: str, wait: Optional[bool] = None) -> dict[str, Any] | None
Read a template deployment
Reads a template deployment within a resource group.
deployments_create_or_update_async
async
deployments_create_or_update_async(input: Deployment, subscription_id: str, resource_group_name: str, deployment_name: str, wait: Optional[bool] = None) -> dict[str, Any] | None
Create or update a template deployment
Create or update a named resource group template deployment. A template and parameters are expected for the request to succeed.
deployments_delete_async
async
deployments_delete_async(subscription_id: str, resource_group_name: str, deployment_name: str) -> None
Delete template deployment
Deletes a resource group template deployment. The resources will not be deleted; only the metadata about the template deployment.
deployments_cancel_async
async
deployments_cancel_async(subscription_id: str, resource_group_name: str, deployment_name: str) -> None
Cancel a template deployment
Cancel a currently running template deployment. All pending template operations will be suspended.
deployments_validate_async
async
deployments_validate_async(input: Deployment, subscription_id: str, resource_group_name: str, deployment_name: str) -> dict[str, Any] | None
Validate a template deployment
Validates a deployment template. This operation does not have side effects and can be used to test a template deployment for syntax or logical errors.
deployments_export_template_async
async
deployments_export_template_async(subscription_id: str, resource_group_name: str, deployment_name: str) -> dict[str, Any] | None
Export deployment template
Exports a template from a past resource group deployment.
deployments_list_async
async
deployments_list_async(subscription_id: str, resource_group_name: str, filter: Optional[str] = None, top: Optional[int] = None) -> dict[str, Any] | None
List template deployments
Lists all the resource group template deployments. This operation is useful to know what has been provisioned thus far.
deployment_operations_get_async
async
deployment_operations_get_async(subscription_id: str, resource_group_name: str, deployment_name: str, operation_id: str) -> dict[str, Any] | None
Read a template deployment operation
Reads a particular resource group template deployment operation. This is useful for troubleshooting failed template deployments.
deployment_operations_list_async
async
deployment_operations_list_async(subscription_id: str, resource_group_name: str, deployment_name: str, top: Optional[int] = None) -> dict[str, Any] | None
Lists template deployment operations
Lists all the template deployment operations. This is useful for troubleshooting failed template deployments.
providers_unregister_async
async
providers_unregister_async(subscription_id: str, resource_provider_namespace: str) -> dict[str, Any] | None
Unregister resource provider
Unregisters provider from a subscription. This operation will fail if there are any resources from that resource provider in the subscription.
providers_register_async
async
providers_register_async(subscription_id: str, resource_provider_namespace: str) -> dict[str, Any] | None
Register resource provider
Registers a resource provider to be used with a subscription. This will provision permissions for the service into your subscription.
providers_list_async
async
providers_list_async(subscription_id: str, top: Optional[int] = None, expand: Optional[str] = None) -> dict[str, Any] | None
List resource providers
Lists the resource providers available for the subscription.
providers_get_async
async
providers_get_async(subscription_id: str, resource_provider_namespace: str, expand: Optional[str] = None) -> dict[str, Any] | None
Read resource provider
Reads a particular resource provider within the subscription.
resource_groups_list_resources_async
async
resource_groups_list_resources_async(subscription_id: str, resource_group_name: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None) -> dict[str, Any] | None
List resources by resource group
Lists all the resources under a resource group.
resource_groups_get_async
async
Read a resource group
Reads a particular resource group within the subscription.
resource_groups_create_or_update_async
async
resource_groups_create_or_update_async(input: ResourceGroup, subscription_id: str, resource_group_name: str) -> dict[str, Any] | None
Create or update a resource group
Creates or updates a resource group. The response code can be used to distinguish between a create (201) or update (200).
resource_groups_delete_async
async
Delete a resource group
Delete a particular resource group within the subscription.
resource_groups_patch_async
async
resource_groups_patch_async(input: ResourceGroup, subscription_id: str, resource_group_name: str) -> dict[str, Any] | None
Update an existing resource group
Updates an existing resource group. If the resource does not exist, this request will fail.
resource_groups_export_template_async
async
resource_groups_export_template_async(input: ExportTemplateRequest, subscription_id: str, resource_group_name: str) -> dict[str, Any] | None
Export a resource group template
Exports a deployment template from an existing resource group. This can only be successful if the underlying resources have a schema defined by Microsoft.
resource_groups_list_async
async
resource_groups_list_async(subscription_id: str, filter: Optional[str] = None, top: Optional[int] = None) -> dict[str, Any] | None
List resource groups
Lists all the resource groups within the subscription. The results are paginated at 1,000+ records.
resources_list_async
async
resources_list_async(subscription_id: str, filter: Optional[str] = None, expand: Optional[str] = None, top: Optional[int] = None) -> dict[str, Any] | None
List resources by subscription
Reads all of the resources under a particular subscription. The results are paginated at 1,000+ records.
resources_get_by_id_async
async
resources_get_by_id_async(subscription_id: str, resource_group_name: str, resource_provider_namespace: str, short_resource_id: str, x_ms_api_version: str) -> dict[str, Any] | None
Read a resource
Reads a resource object.
resources_create_or_update_by_id_async
async
resources_create_or_update_by_id_async(input: GenericResource, subscription_id: str, resource_group_name: str, resource_provider_namespace: str, short_resource_id: str, x_ms_api_version: str) -> dict[str, Any] | None
Create or update a resource
Creates or updates a resource. The response code can be used to distinguish between a create (201) or update (200).
resources_delete_by_id_async
async
resources_delete_by_id_async(subscription_id: str, resource_group_name: str, resource_provider_namespace: str, short_resource_id: str, x_ms_api_version: str) -> None
Delete a resource
Deletes a resource.
resources_invoke_async
async
resources_invoke_async(input: ResourcesInvokeInput, subscription_id: str, resource_group_name: str, resource_provider_namespace: str, short_resource_id: str, action_name: str, x_ms_api_version: str) -> dict[str, Any] | None
Invoke resource operation
Invokes an operation on an Azure resource.
provider_resources_get_by_id_async
async
provider_resources_get_by_id_async(subscription_id: str, resource_provider_namespace: str, short_resource_id: str, x_ms_api_version: str) -> dict[str, Any] | None
Read a resource in provider
Reads a resource object.
provider_resources_invoke_async
async
provider_resources_invoke_async(input: ProviderResourcesInvokeInput, subscription_id: str, resource_provider_namespace: str, short_resource_id: str, x_ms_api_version: str) -> dict[str, Any] | None
Invoke resource operation in provider
Invokes an operation on an Azure resource.
tags_create_or_update_value_async
async
tags_create_or_update_value_async(subscription_id: str, tag_name: str, tag_value: str) -> dict[str, Any] | None
Create or update a subscription resource tag value
Create or update a subscription resource tag value.
tags_delete_value_async
async
Delete a subscription resource tag value
Delete a subscription resource tag value.
tags_create_or_update_async
async
Create or update a subscription resource tag name
Create or update a subscription resource tag name.
tags_delete_async
async
Delete a subscription resource tag name
Delete a subscription resource tag name.