예제 #1
0
        public async Task <Response <AvailableClustersList> > ListAvailableClustersAsync(CancellationToken cancellationToken = default)
        {
            using var message = CreateListAvailableClustersRequest();
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

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

                value = AvailableClustersList.DeserializeAvailableClustersList(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }
        public async Task <Response <AvailableClustersList> > ListAvailableClusterRegionAsync(string subscriptionId, CancellationToken cancellationToken = default)
        {
            Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));

            using var message = CreateListAvailableClusterRegionRequest(subscriptionId);
            await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);

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

                value = AvailableClustersList.DeserializeAvailableClustersList(document.RootElement);
                return(Response.FromValue(value, message.Response));
            }