Compartir a través de


AssetMappingsClient.GetAssetMapping(String, String, RequestContext) Método

Definición

Obtenga AssetMapping en un recurso compartido recibido.

public virtual Azure.Response GetAssetMapping (string receivedShareName, string assetMappingName, Azure.RequestContext context = default);
abstract member GetAssetMapping : string * string * Azure.RequestContext -> Azure.Response
override this.GetAssetMapping : string * string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetAssetMapping (receivedShareName As String, assetMappingName As String, Optional context As RequestContext = Nothing) As Response

Parámetros

receivedShareName
String

Nombre del recurso compartido recibido.

assetMappingName
String

Nombre de la asignación de recursos.

context
RequestContext

Contexto de solicitud, que puede invalidar los comportamientos predeterminados de la canalización de cliente por llamada.

Devoluciones

Respuesta devuelta desde el servicio. Los detalles del esquema del cuerpo de la respuesta se encuentran en la sección Comentarios a continuación.

Excepciones

receivedShareName o assetMappingName es null.

receivedShareName o assetMappingName es una cadena vacía y se espera que no esté vacía.

El servicio devolvió un código de estado no correcto.

Ejemplos

En este ejemplo se muestra cómo llamar a GetAssetMapping con los parámetros necesarios y analizar el resultado.

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

Response response = client.GetAssetMapping("<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());

Comentarios

Obtención de una asignación de recursos para un recurso compartido recibido

A continuación se muestra el esquema JSON para la carga de respuesta.

Cuerpo de la respuesta:

Este método toma uno de los objetos JSON siguientes como una carga útil. Seleccione un objeto JSON para ver el esquema.

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.
            }
~+ 1 objetos
JSON más 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.
            }

Se aplica a