다음을 통해 공유


ChaosExtensions.GetChaosTargetAsync Method

Definition

Get a Target resource that extends a tracked regional resource.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}
  • Operation Id: Targets_Get
  • Default Api Version: 2024-01-01
  • Resource: ChaosTargetResource
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Chaos.ChaosTargetResource>> GetChaosTargetAsync (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string parentProviderNamespace, string parentResourceType, string parentResourceName, string targetName, System.Threading.CancellationToken cancellationToken = default);
static member GetChaosTargetAsync : Azure.ResourceManager.Resources.ResourceGroupResource * string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Chaos.ChaosTargetResource>>
<Extension()>
Public Function GetChaosTargetAsync (resourceGroupResource As ResourceGroupResource, parentProviderNamespace As String, parentResourceType As String, parentResourceName As String, targetName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ChaosTargetResource))

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

parentProviderNamespace
String

String that represents a resource provider namespace.

parentResourceType
String

String that represents a resource type.

parentResourceName
String

String that represents a resource name.

targetName
String

String that represents a Target resource name.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

resourceGroupResource, parentProviderNamespace, parentResourceType, parentResourceName or targetName is null.

parentProviderNamespace, parentResourceType, parentResourceName or targetName is an empty string, and was expected to be non-empty.

Applies to