Esempio n. 1
0
        public async Task <Response <VmInsightsOnboardingStatusData> > GetOnboardingStatusAsync(string resourceUri, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNull(resourceUri, nameof(resourceUri));

            using var message = CreateGetOnboardingStatusRequest(resourceUri);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

            switch (message.Response.Status)
            {
            case 200:
            {
                VmInsightsOnboardingStatusData value = default;
                using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);

                value = VmInsightsOnboardingStatusData.DeserializeVmInsightsOnboardingStatusData(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }
 internal VmInsightsOnboardingStatusResource(ArmClient client, VmInsightsOnboardingStatusData data) : this(client, data.Id)
 {
     HasData = true;
     _data   = data;
 }