Compartilhar via


AssetMappingsClient.GetAssetMappingAsync Método

Definição

Obter AssetMapping em um 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)

Parâmetros

receivedShareName
String

O nome do compartilhamento recebido.

assetMappingName
String

O nome do mapeamento de ativos.

context
RequestContext

O contexto de solicitação, que pode substituir os comportamentos padrão do pipeline do cliente por chamada.

Retornos

A resposta retornada do serviço. Os detalhes do esquema do corpo da resposta estão na seção Comentários abaixo.

Exceções

receivedShareName ou assetMappingName é nulo.

receivedShareName ou assetMappingName é uma cadeia de caracteres vazia e esperava-se que não estivesse vazia.

O serviço retornou um código de status sem êxito.

Exemplos

Este exemplo mostra como chamar GetAssetMappingAsync com os parâmetros necessários e analisar o resultado.

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());

Comentários

Obter um mapeamento de ativos para um compartilhamento recebido

Abaixo está o esquema JSON para o conteúdo da resposta.

Corpo da resposta:

Esse método usa um dos objetos JSON abaixo como uma carga. Selecione um objeto JSON para exibir o esquema para isso.

AdlsGen2AccountAssetMapping Esquema para 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.
            }
~+ Mais 1 objeto
JSON BlobAccountAssetMapping Esquema para 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.
            }

Aplica-se a