Partager via


AssetMappingsClient.GetAssetMappingAsync Méthode

Définition

Obtenir AssetMapping dans un receivedShare.

public virtual System.Threading.Tasks.Task<Azure.Response> GetAssetMappingAsync (string receivedShareName, string assetMappingName, Azure.RequestContext context = default);
abstract member GetAssetMappingAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetAssetMappingAsync : string * string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetAssetMappingAsync (receivedShareName As String, assetMappingName As String, Optional context As RequestContext = Nothing) As Task(Of Response)

Paramètres

receivedShareName
String

Nom du partage reçu.

assetMappingName
String

Nom du mappage de ressources.

context
RequestContext

Contexte de la demande, qui peut remplacer les comportements par défaut du pipeline client par appel.

Retours

Réponse retournée par le service. Les détails du schéma du corps de la réponse se trouvent dans la section Remarques ci-dessous.

Exceptions

receivedShareName ou assetMappingName est null.

receivedShareName ou assetMappingName est une chaîne vide, et était censé être non vide.

Le service a retourné un code de status non réussi.

Exemples

Cet exemple montre comment appeler GetAssetMappingAsync avec les paramètres requis et analyser le résultat.

var credential = new DefaultAzureCredential();
var client = new AssetMappingsClient("<https://my-service.azure.com>", credential);

Response response = await client.GetAssetMappingAsync("<receivedShareName>", "<assetMappingName>");

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());

Remarques

Obtenir un mappage de ressources pour un partage reçu

Vous trouverez ci-dessous le schéma JSON pour la charge utile de réponse.

Corps de réponse :

Cette méthode prend l’un des objets JSON ci-dessous en tant que charge utile. Sélectionnez un objet JSON pour afficher le schéma correspondant.

AdlsGen2AccountAssetMapping Schéma pour AdlsGen2AccountAssetMapping:
{
              kind: AdlsGen2Account, # Required. Types of asset mapping.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                assetId: AdlsGen2AccountAssetMappingPropertiesAssetId, # Required. The id of the sender asset.
                assetMappingStatus: "Ok" | "Broken", # Optional. State of asset mapping
                containerName: string, # Required. Name of the container to received the shared paths.
                folder: string, # Required. Folder under which the shared paths will be reflected.
                location: string, # Optional. Location of the receiver storage account.
                mountPath: string, # Optional. Optional mount path for the shared paths.
                provisioningState: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed" | "SoftDeleting" | "SoftDeleted" | "SourceMoved" | "SourceDeleted" | "TargetMoved" | "TargetDeleted", # Optional. Provisioning status of the resource
                storageAccountResourceId: string, # Required. Resource id of the receiver storage account.
              }, # Required. Properties of the adls gen2 storage account asset mapping.
            }
~+ 1 autres objets
JSON BlobAccountAssetMapping Schéma pour BlobAccountAssetMapping:
{
              kind: BlobAccount, # Required. Types of asset mapping.
              id: string, # Optional. The resource id of the resource.
              name: string, # Optional. Name of the resource.
              type: string, # Optional. Type of the resource.
              properties: {
                assetId: BlobAccountAssetMappingPropertiesAssetId, # Required. The id of the sender asset.
                assetMappingStatus: "Ok" | "Broken", # Optional. State of asset mapping
                containerName: string, # Required. Name of the container to received the shared paths.
                folder: string, # Required. Folder under which the shared paths will be reflected.
                location: string, # Optional. Location of the receiver storage account.
                mountPath: string, # Optional. Optional mount path for the shared paths.
                provisioningState: "Unknown" | "Succeeded" | "Creating" | "Deleting" | "Moving" | "Failed" | "SoftDeleting" | "SoftDeleted" | "SourceMoved" | "SourceDeleted" | "TargetMoved" | "TargetDeleted", # Optional. Provisioning status of the resource
                storageAccountResourceId: string, # Required. Resource id of the receiver storage account.
              }, # Required. Properties of the blob storage account asset mapping.
            }

S’applique à