Resource Groups - Export Template

Captures the specified resource group as a template.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate?api-version=2018-05-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

resourceGroupName
path True
  • string

The name of the resource group to export as a template.

Regex pattern: ^[-\w\._\(\)]+$

api-version
query True
  • string

The API version to use for this operation.

Request Body

Name Type Description
options
  • string

The export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments

resources
  • string[]

The IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources.

Responses

Name Type Description
200 OK

OK - Returns the result of the export.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Definitions

ExportTemplateRequest

Export resource group template request parameters.

ResourceGroupExportResult

Resource group export result.

ResourceManagementErrorWithDetails

The detailed error message of resource management.

ExportTemplateRequest

Export resource group template request parameters.

Name Type Description
options
  • string

The export template options. Supported values include 'IncludeParameterDefaultValue', 'IncludeComments' or 'IncludeParameterDefaultValue, IncludeComments

resources
  • string[]

The IDs of the resources. The only supported string currently is '*' (all resources). Future updates will support exporting specific resources.

ResourceGroupExportResult

Resource group export result.

Name Type Description
error

The error.

template
  • object

The template content.

ResourceManagementErrorWithDetails

The detailed error message of resource management.

Name Type Description
code
  • string

The error code returned when exporting the template.

details

Validation error.

message
  • string

The error message describing the export error.

target
  • string

The target of the error.