swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector ResourceGroups API
schemes:
- https
tags:
- name: ResourceGroups
paths:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources:
get:
tags:
- ResourceGroups
operationId: microsoftAzureResourcesListbyresourcegroup
description: Get all the resources for a resource group.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The resource group with the resources to get.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- name: $filter
in: query
required: false
type: string
description: 'The filter to apply on the operation.
The properties you can use for eq (equals) or ne (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, plan, plan/publisher, plan/product, plan/name, plan/version, and plan/promotionCode.
For example, to filter by a resource type, use: $filter=resourceType eq ''Microsoft.Network/virtualNetworks''
You can use substringof(value, property) in the filter. The properties you can use for substring are: name and resourceGroup.
For example, to get all resources with ''demo'' anywhere in the name, use: $filter=substringof(''demo'', name)
You can link more than one substringof together by adding and/or operators.
You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq ''tag1'' and tagValue eq ''Value1''. When you filter by a tag name and value, the tags for each resource are not returned in the results.
You can use some properties together when filtering. The combinations you can use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and identity/principalId.'
- name: $expand
in: query
required: false
type: string
description: Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`.
- name: $top
in: query
required: false
type: integer
format: int32
description: The number of results to return. If null is passed, returns all resources.
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'200':
description: OK - Returns an array of resources
schema:
$ref: '#/definitions/ResourceListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
x-ms-pageable:
nextLinkName: nextLink
x-ms-odata: '#/definitions/GenericResourceFilter'
summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Resources
/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}:
head:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsCheckexistence
description: Checks whether a resource group exists.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The name of the resource group to check. The name is case insensitive.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'204':
description: No Content
'404':
description: Not Found
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Microsoft Azure Head Subscriptions Subscriptionid Resourcegroups Resourcegroupname
put:
tags:
- ResourceGroups
x-ms-examples:
Create or update a resource group:
$ref: ./examples/CreateResourceGroup.json
operationId: microsoftAzureResourcegroupsCreateorupdate
description: Creates or updates a resource group.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- name: parameters
in: body
required: true
schema:
$ref: '#/definitions/ResourceGroup'
description: Parameters supplied to the create or update a resource group.
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'200':
description: OK - Returns information about the new resource group.
schema:
$ref: '#/definitions/ResourceGroup'
'201':
description: Created - Returns information about the new resource group.
schema:
$ref: '#/definitions/ResourceGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname
delete:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsDelete
summary: Microsoft Azure Deletes A Resource Group
description: When you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes all of its template deployments and currently stored operations.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The name of the resource group to delete. The name is case insensitive.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- name: forceDeletionTypes
in: query
required: false
type: string
description: 'The resource types you want to force delete. Currently, only the following is supported: forceDeletionTypes=Microsoft.Compute/virtualMachines,Microsoft.Compute/virtualMachineScaleSets'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
x-ms-examples:
Force delete all the Virtual Machines in a resource group:
$ref: ./examples/ForceDeleteVMsInResourceGroup.json
Force delete all the Virtual Machines and Virtual Machine Scale Sets in a resource group:
$ref: ./examples/ForceDeleteVMsAndVMSSInResourceGroup.json
responses:
'200':
description: OK
'202':
description: Accepted
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
x-ms-long-running-operation: true
get:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsGet
description: Gets a resource group.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The name of the resource group to get. The name is case insensitive.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'200':
description: OK - Returns information about the resource group.
schema:
$ref: '#/definitions/ResourceGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname
patch:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsUpdate
summary: Microsoft Azure Updates A Resource Group
description: Resource groups can be updated through a simple PATCH operation to a group address. The format of the request is the same as that for creating a resource group. If a field is unspecified, the current value is retained.
parameters:
- name: resourceGroupName
in: path
required: true
type: string
description: The name of the resource group to update. The name is case insensitive.
pattern: ^[-\w\._\(\)]+$
minLength: 1
maxLength: 90
- name: parameters
in: body
required: true
schema:
$ref: '#/definitions/ResourceGroupPatchable'
description: Parameters supplied to update a resource group.
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'200':
description: OK - Returns information about the resource group.
schema:
$ref: '#/definitions/ResourceGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate:
post:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsExporttemplate
description: Captures the specified resource group as a template.
parameters:
- $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter
- $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter
- $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter
- name: parameters
in: body
required: true
schema:
$ref: '#/definitions/ExportTemplateRequest'
description: Parameters for exporting the template.
x-ms-examples:
Export a resource group:
$ref: ./examples/ExportResourceGroup.json
Export a resource group with filtering:
$ref: ./examples/ExportResourceGroupWithFiltering.json
responses:
'200':
description: OK - Returns the result of the export.
schema:
$ref: '#/definitions/ResourceGroupExportResult'
'202':
description: Accepted
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
x-ms-long-running-operation: true
x-ms-long-running-operation-options:
final-state-via: location
summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups Resourcegroupname Exporttemplate
/subscriptions/{subscriptionId}/resourcegroups:
get:
tags:
- ResourceGroups
operationId: microsoftAzureResourcegroupsList
description: Gets all the resource groups for a subscription.
parameters:
- name: $filter
in: query
required: false
type: string
description: The filter to apply on the operation.
You can filter by tag names and values. For example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'
- name: $top
in: query
required: false
type: integer
format: int32
description: The number of results to return. If null is passed, returns all resource groups.
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
responses:
'200':
description: OK - Returns an array of resource groups.
schema:
$ref: '#/definitions/ResourceGroupListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
x-ms-pageable:
nextLinkName: nextLink
x-ms-odata: '#/definitions/ResourceGroupFilter'
summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups
definitions:
GenericResourceExpanded:
properties:
createdTime:
readOnly: true
type: string
format: date-time
description: The created time of the resource. This is only present if requested via the $expand query parameter.
changedTime:
readOnly: true
type: string
format: date-time
description: The changed time of the resource. This is only present if requested via the $expand query parameter.
provisioningState:
readOnly: true
type: string
description: The provisioning state of the resource. This is only present if requested via the $expand query parameter.
allOf:
- $ref: '#/definitions/GenericResource'
description: Resource information.
Identity:
properties:
principalId:
readOnly: true
type: string
description: The principal ID of resource identity.
tenantId:
readOnly: true
type: string
description: The tenant ID of resource.
type:
type: string
description: The identity type.
enum:
- SystemAssigned
- UserAssigned
- SystemAssigned, UserAssigned
- None
x-ms-enum:
name: ResourceIdentityType
modelAsString: false
userAssignedIdentities:
type: object
additionalProperties:
type: object
x-ms-client-name: IdentityUserAssignedIdentitiesValue
properties:
principalId:
readOnly: true
type: string
description: The principal id of user assigned identity.
clientId:
readOnly: true
type: string
description: The client id of user assigned identity.
description: 'The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: ''/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}''.'
description: Identity for the resource.
Resource:
properties:
id:
readOnly: true
type: string
description: Resource ID
name:
readOnly: true
type: string
description: Resource name
type:
readOnly: true
type: string
description: Resource type
location:
type: string
description: Resource location
extendedLocation:
$ref: '#/definitions/ExtendedLocation'
x-ms-mutability:
- read
- create
description: Resource extended location.
tags:
type: object
additionalProperties:
type: string
description: Resource tags
x-ms-azure-resource: true
description: Specified resource.
ResourceGroupPatchable:
properties:
name:
type: string
description: The name of the resource group.
properties:
$ref: '#/definitions/ResourceGroupProperties'
description: The resource group properties.
managedBy:
type: string
description: The ID of the resource that manages this resource group.
tags:
type: object
additionalProperties:
type: string
description: 'The additional properties. '
description: The tags attached to the resource group.
description: Resource group information.
ResourceGroup:
properties:
id:
readOnly: true
type: string
description: The ID of the resource group.
name:
readOnly: true
type: string
description: The name of the resource group.
type:
readOnly: true
type: string
description: The type of the resource group.
properties:
$ref: '#/definitions/ResourceGroupProperties'
description: The resource group properties.
location:
type: string
description: The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
managedBy:
type: string
description: The ID of the resource that manages this resource group.
tags:
type: object
additionalProperties:
type: string
description: 'The additional properties. '
description: The tags attached to the resource group.
required:
- location
x-ms-azure-resource: true
description: Resource group information.
ResourceGroupProperties:
properties:
provisioningState:
readOnly: true
type: string
description: 'The provisioning state. '
description: The resource group properties.
CloudError:
x-ms-external: true
properties:
error:
$ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse
description: An error response for a resource management request.
Sku:
properties:
name:
type: string
description: The SKU name.
tier:
type: string
description: The SKU tier.
size:
type: string
description: The SKU size.
family:
type: string
description: The SKU family.
model:
type: string
description: The SKU model.
capacity:
type: integer
format: int32
description: The SKU capacity.
description: SKU for the resource.
Plan:
properties:
name:
type: string
description: The plan ID.
publisher:
type: string
description: The publisher ID.
product:
type: string
description: The offer ID.
promotionCode:
type: string
description: The promotion code.
version:
type: string
description: The plan's version.
description: Plan for the resource.
GenericResource:
properties:
plan:
$ref: '#/definitions/Plan'
description: The plan of the resource.
properties:
type: object
description: The resource properties.
kind:
type: string
description: The kind of the resource.
pattern: ^[-\w\._,\(\)]+$
managedBy:
type: string
description: ID of the resource that manages this resource.
sku:
$ref: '#/definitions/Sku'
description: The SKU of the resource.
identity:
$ref: '#/definitions/Identity'
description: The identity of the resource.
allOf:
- $ref: '#/definitions/Resource'
description: Resource information.
ResourceListResult:
properties:
value:
type: array
items:
$ref: '#/definitions/GenericResourceExpanded'
description: An array of resources.
nextLink:
readOnly: true
type: string
description: The URL to use for getting the next set of results.
description: List of resource groups.
ResourceGroupExportResult:
properties:
template:
type: object
description: The template content.
error:
$ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse
description: The template export error.
description: Resource group export result.
ResourceGroupListResult:
properties:
value:
type: array
items:
$ref: '#/definitions/ResourceGroup'
description: An array of resource groups.
nextLink:
readOnly: true
type: string
description: The URL to use for getting the next set of results.
description: List of resource groups.
ExtendedLocation:
properties:
type:
type: string
enum:
- EdgeZone
x-ms-enum:
name: ExtendedLocationType
modelAsString: true
description: The extended location type.
name:
type: string
description: The extended location name.
description: Resource extended location.
ExportTemplateRequest:
properties:
resources:
type: array
items:
type: string
description: The IDs of the resources to filter the export by. To export all resources, supply an array with single entry '*'.
options:
type: string
description: 'The export template options. A CSV-formatted list containing zero or more of the following: ''IncludeParameterDefaultValue'', ''IncludeComments'', ''SkipResourceNameParameterization'', ''SkipAllParameterization'''
description: Export resource group template request parameters.
parameters:
ApiVersionParameter:
name: api-version
in: query
required: true
type: string
description: The API version to use for this operation.
SubscriptionIdParameter:
name: subscriptionId
in: path
required: true
type: string
description: The Microsoft Azure subscription ID.
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'