Microsoft.Resources snapshots

Bicep resource definition

The snapshots resource type is an extension resource, which means you can apply it to another resource.

Use the scope property on this resource to set the scope for this resource. See Set scope on extension resources in Bicep.

Note

This resource type is read-only, which means it can't be deployed but an existing instance can be referenced. Typically, read-only resource types are automatically created by the service.

Use the existing keyword.

Resource format

To create a Microsoft.Resources/snapshots resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Resources/snapshots@2022-11-01-preview' existing = {
  name: 'string'
}

Property values

snapshots

Name Description Value
name The name of the existing resource. string (required)

ARM template resource definition

The snapshots resource type is an extension resource, which means you can apply it to another resource.

Use the scope property on this resource to set the scope for this resource. See Set scope on extension resources in ARM templates.

Note

This resource type is read-only, which means it can't be deployed but an existing instance can be referenced. Typically, read-only resource types are automatically created by the service.

Use the reference function.

Resource format

To create a Microsoft.Resources/snapshots resource, add the following JSON to your template.

[reference(resourceId('Microsoft.Resources/snapshots', '{name}'), '2022-11-01-preview')]

Property values

snapshots

Name Description Value
name The name of the existing resource. string (required)

Terraform (AzAPI provider) resource definition

The snapshots resource type is an extension resource, which means you can apply it to another resource.

Use the parent_id property on this resource to set the scope for this resource.

Note

This resource type is read-only, which means it can't be deployed but an existing instance can be referenced. Typically, read-only resource types are automatically created by the service.

Use the data keyword.

Resource format

To create a Microsoft.Resources/snapshots resource, add the following Terraform to your template.

data "azapi_resource" "symbolicname" {
  type = "Microsoft.Resources/snapshots@2022-11-01-preview"
  name = "string"
  parent_id = "string"
}

Property values

snapshots

Name Description Value
name The name of the existing resource. string (required)
parent_id The ID of the resource to apply this extension resource to. string (required)