Targets - List

Get a list of Target resources that extend a tracked regional resource.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets?api-version=2024-01-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets?api-version=2024-01-01&continuationToken={continuationToken}

URI Parameters

Name In Required Type Description
parentProviderNamespace
path True

string

String that represents a resource provider namespace.

Regex pattern: ^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$

parentResourceName
path True

string

String that represents a resource name.

Regex pattern: ^[a-zA-Z0-9_\-\.]+$

parentResourceType
path True

string

String that represents a resource type.

Regex pattern: ^[a-zA-Z0-9_\-\.]+$

resourceGroupName
path True

string

String that represents an Azure resource group.

Regex pattern: ^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$

subscriptionId
path True

string

GUID that represents an Azure subscription ID.

Regex pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

api-version
query True

string

String that sets the API version.

Regex pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}(|-preview)$

continuationToken
query

string

String that sets the continuation token.

Responses

Name Type Description
200 OK

targetListResult

List of Target resources returned if request was successful.

Other Status Codes

ErrorResponse

Error response returned if request was unsuccessful.

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

Examples

List all Targets that extend a virtual machine resource.

Sample Request

GET https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets?api-version=2024-01-01&continuationToken=

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets/Microsoft-Agent",
      "type": "Microsoft.Chaos/targets",
      "name": "Microsoft-Agent",
      "location": "centraluseuap",
      "properties": {
        "identities": [
          {
            "type": "CertificateSubjectIssuer",
            "subject": "CN=example.subject"
          }
        ],
        "agentProfileId": "ac4e8251-fdc9-4277-8e87-dc57fe5794cf"
      },
      "systemData": {
        "createdAt": "2021-07-01T00:00:00.0Z",
        "lastModifiedAt": "2021-07-01T00:00:00.0Z"
      }
    }
  ],
  "nextLink": "https://management.azure.com/subscriptions/6b052e15-03d3-4f17-b2e1-be7f07588291/resourceGroups/exampleRG/providers/Microsoft.Compute/virtualMachines/exampleVM/providers/Microsoft.Chaos/targets?continuationToken=&api-version=2024-01-01"
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

systemData

Metadata pertaining to creation and last modification of the resource.

target

Model that represents a Target resource.

targetListResult

Model that represents a list of Target resources and a link for pagination.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

target

Model that represents a Target resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

Location of the target resource.

name

string

The name of the resource

systemData

systemData

The system metadata of the target resource.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

targetListResult

Model that represents a list of Target resources and a link for pagination.

Name Type Description
nextLink

string

URL to retrieve the next page of Target resources.

value

target[]

List of Target resources.