次の方法で共有


AssetMappingsClient.GetAssetMapping(String, String, RequestContext) メソッド

定義

receivedShare で AssetMapping を取得します。

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

パラメーター

receivedShareName
String

受信した共有の名前。

assetMappingName
String

資産マッピングの名前。

context
RequestContext

要求コンテキスト。これは、呼び出しごとにクライアント パイプラインの既定の動作をオーバーライドできます。

戻り値

サービスから返された応答。 応答本文スキーマの詳細については、以下の「解説」セクションを参照してください。

例外

receivedShareName または assetMappingName が null です。

receivedShareName または assetMappingName が空の文字列であり、空でないと想定されていました。

サービスから成功以外の状態コードが返されました。

このサンプルでは、必要なパラメーターを使用して GetAssetMapping を呼び出し、結果を解析する方法を示します。

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

注釈

受信した共有の資産マッピングを取得する

応答ペイロードの JSON スキーマを次に示します。

応答本文:

このメソッドは、以下のいずれかの JSON オブジェクトをペイロードとして受け取ります。 JSON オブジェクトを選択して、このスキーマを表示してください。

AdlsGen2AccountAssetMappingAdlsGen2AccountAssetMappingスキーマ:
{
              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 つの JSON オブジェクト
BlobAccountAssetMappingBlobAccountAssetMappingスキーマ:
{
              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.
            }

適用対象