Ejemplo n.º 1
0
        internal ListAvailableZonesResponse ListAvailableZones(ListAvailableZonesRequest request)
        {
            var marshaller   = new ListAvailableZonesRequestMarshaller();
            var unmarshaller = ListAvailableZonesResponseUnmarshaller.Instance;

            return(Invoke <ListAvailableZonesRequest, ListAvailableZonesResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListAvailableZones operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListAvailableZones operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <ListAvailableZonesResponse> ListAvailableZonesAsync(ListAvailableZonesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListAvailableZonesRequestMarshaller();
            var unmarshaller = ListAvailableZonesResponseUnmarshaller.Instance;

            return(InvokeAsync <ListAvailableZonesRequest, ListAvailableZonesResponse>(request, marshaller,
                                                                                       unmarshaller, cancellationToken));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 查询可用区信息
        /// </summary>
        public async Task <ListAvailableZonesResponse> ListAvailableZonesAsync(ListAvailableZonesRequest listAvailableZonesRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();
            string              urlPath          = HttpUtils.AddUrlPath("/v2/available-zones", urlParam);
            SdkRequest          request          = HttpUtils.InitSdkRequest(urlPath, "application/json", listAvailableZonesRequest);
            HttpResponseMessage response         = await DoHttpRequestAsync("GET", request);

            return(JsonUtils.DeSerialize <ListAvailableZonesResponse>(response));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 查询可用区信息
        /// </summary>
        public ListAvailableZonesResponse ListAvailableZones(ListAvailableZonesRequest listAvailableZonesRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();
            string              urlPath          = HttpUtils.AddUrlPath("/v2/available-zones", urlParam);
            SdkRequest          request          = HttpUtils.InitSdkRequest(urlPath, listAvailableZonesRequest);
            HttpResponseMessage response         = DoHttpRequestSync("GET", request);

            return(JsonUtils.DeSerialize <ListAvailableZonesResponse>(response));
        }
        private static void listAvailableZones(RabbitmqClient client)
        {
            var req = new ListAvailableZonesRequest();

            try
            {
                var resp = client.ListAvailableZones(req);
                Console.WriteLine(resp.GetHttpBody());
            }
            catch (RequestTimeoutException requestTimeoutException)
            {
                Console.WriteLine(requestTimeoutException.ErrorMessage);
            }
            catch (ServiceResponseException clientRequestException)
            {
                Console.WriteLine(clientRequestException.HttpStatusCode);
                Console.WriteLine(clientRequestException.ErrorCode);
                Console.WriteLine(clientRequestException.ErrorMsg);
            }
            catch (ConnectionException connectionException)
            {
                Console.WriteLine(connectionException.ErrorMessage);
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Lists the Availability Zones that have available AWS CloudHSM capacity.
        /// </summary>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the ListAvailableZones service method, as returned by CloudHSM.</returns>
        /// <exception cref="Amazon.CloudHSM.Model.CloudHsmInternalException">
        /// Indicates that an internal error occurred.
        /// </exception>
        /// <exception cref="Amazon.CloudHSM.Model.CloudHsmServiceException">
        /// Indicates that an exception occurred in the AWS CloudHSM service.
        /// </exception>
        /// <exception cref="Amazon.CloudHSM.Model.InvalidRequestException">
        /// Indicates that one or more of the request parameters are not valid.
        /// </exception>
        public Task <ListAvailableZonesResponse> ListAvailableZonesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var request = new ListAvailableZonesRequest();

            return(ListAvailableZonesAsync(request, cancellationToken));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListAvailableZones operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListAvailableZones operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<ListAvailableZonesResponse> ListAvailableZonesAsync(ListAvailableZonesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new ListAvailableZonesRequestMarshaller();
            var unmarshaller = ListAvailableZonesResponseUnmarshaller.Instance;

            return InvokeAsync<ListAvailableZonesRequest,ListAvailableZonesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
Ejemplo n.º 8
0
 /// <summary>
 /// Lists the Availability Zones that have available AWS CloudHSM capacity.
 /// </summary>
 /// <param name="cancellationToken">
 ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
 /// </param>
 /// 
 /// <returns>The response from the ListAvailableZones service method, as returned by CloudHSM.</returns>
 /// <exception cref="Amazon.CloudHSM.Model.CloudHsmInternalException">
 /// Indicates that an internal error occurred.
 /// </exception>
 /// <exception cref="Amazon.CloudHSM.Model.CloudHsmServiceException">
 /// Indicates that an exception occurred in the AWS CloudHSM service.
 /// </exception>
 /// <exception cref="Amazon.CloudHSM.Model.InvalidRequestException">
 /// Indicates that one or more of the request parameters are not valid.
 /// </exception>
 public Task<ListAvailableZonesResponse> ListAvailableZonesAsync(System.Threading.CancellationToken cancellationToken = default(CancellationToken))
 {
     var request = new ListAvailableZonesRequest();
     return ListAvailableZonesAsync(request, cancellationToken);
 }
Ejemplo n.º 9
0
        internal ListAvailableZonesResponse ListAvailableZones(ListAvailableZonesRequest request)
        {
            var marshaller = new ListAvailableZonesRequestMarshaller();
            var unmarshaller = ListAvailableZonesResponseUnmarshaller.Instance;

            return Invoke<ListAvailableZonesRequest,ListAvailableZonesResponse>(request, marshaller, unmarshaller);
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Lists the Availability Zones that have available AWS CloudHSM capacity.
 /// </summary>
 /// 
 /// <returns>The response from the ListAvailableZones service method, as returned by CloudHSM.</returns>
 /// <exception cref="Amazon.CloudHSM.Model.CloudHsmInternalException">
 /// Indicates that an internal error occurred.
 /// </exception>
 /// <exception cref="Amazon.CloudHSM.Model.CloudHsmServiceException">
 /// Indicates that an exception occurred in the AWS CloudHSM service.
 /// </exception>
 /// <exception cref="Amazon.CloudHSM.Model.InvalidRequestException">
 /// Indicates that one or more of the request parameters are not valid.
 /// </exception>
 public ListAvailableZonesResponse ListAvailableZones()
 {
     var request = new ListAvailableZonesRequest();
     return ListAvailableZones(request);
 }
Ejemplo n.º 11
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListAvailableZones operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the ListAvailableZones operation on AmazonCloudHSMClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListAvailableZones
        ///         operation.</returns>
        public IAsyncResult BeginListAvailableZones(ListAvailableZonesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new ListAvailableZonesRequestMarshaller();
            var unmarshaller = ListAvailableZonesResponseUnmarshaller.Instance;

            return BeginInvoke<ListAvailableZonesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }