コード例 #1
0
        /// <summary>
        /// Lists the properties of all containers in AWS Elemental MediaStore.
        ///
        ///
        /// <para>
        /// You can query to receive all the containers in one response. Or you can include the
        /// <code>MaxResults</code> parameter to receive a limited number of containers in each
        /// response. In this case, the response includes a token. To get the next set of containers,
        /// send the command again, this time with the <code>NextToken</code> parameter (with
        /// the returned token as its value). The next set of responses appears, with a token
        /// if there are still more containers to receive.
        /// </para>
        ///
        /// <para>
        /// See also <a>DescribeContainer</a>, which gets the properties of one container.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the ListContainers service method.</param>
        ///
        /// <returns>The response from the ListContainers service method, as returned by MediaStore.</returns>
        /// <exception cref="Amazon.MediaStore.Model.InternalServerErrorException">
        /// The service is temporarily unavailable.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers">REST API Reference for ListContainers Operation</seealso>
        public virtual ListContainersResponse ListContainers(ListContainersRequest request)
        {
            var marshaller   = new ListContainersRequestMarshaller();
            var unmarshaller = ListContainersResponseUnmarshaller.Instance;

            return(Invoke <ListContainersRequest, ListContainersResponse>(request, marshaller, unmarshaller));
        }
コード例 #2
0
        public void ListContainersMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <ListContainersRequest>();
            var marshaller = new ListContainersRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <ListContainersRequest>(request, jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("ListContainers").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = ListContainersResponseUnmarshaller.Instance.Unmarshall(context)
                           as ListContainersResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
コード例 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListContainers operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListContainers operation on AmazonMediaStoreClient.</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 EndListContainers
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers">REST API Reference for ListContainers Operation</seealso>
        public virtual IAsyncResult BeginListContainers(ListContainersRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new ListContainersRequestMarshaller();
            var unmarshaller = ListContainersResponseUnmarshaller.Instance;

            return(BeginInvoke <ListContainersRequest>(request, marshaller, unmarshaller,
                                                       callback, state));
        }
コード例 #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the ListContainers operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the ListContainers 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers">REST API Reference for ListContainers Operation</seealso>
        public virtual Task <ListContainersResponse> ListContainersAsync(ListContainersRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new ListContainersRequestMarshaller();
            var unmarshaller = ListContainersResponseUnmarshaller.Instance;

            return(InvokeAsync <ListContainersRequest, ListContainersResponse>(request, marshaller,
                                                                               unmarshaller, cancellationToken));
        }