/// <summary> /// Gets a list of tags for the specified AWS CloudHSM cluster. /// /// /// <para> /// This is a paginated operation, which means that each response might contain only a /// subset of all the tags. When the response contains only a subset of tags, it includes /// a <code>NextToken</code> value. Use this value in a subsequent <code>ListTags</code> /// request to get more tags. When you receive a response with no <code>NextToken</code> /// (or an empty or null value), that means there are no more tags to get. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param> /// /// <returns>The response from the ListTags service method, as returned by CloudHSMV2.</returns> /// <exception cref="Amazon.CloudHSMV2.Model.CloudHsmAccessDeniedException"> /// The request was rejected because the requester does not have permission to perform /// the requested operation. /// </exception> /// <exception cref="Amazon.CloudHSMV2.Model.CloudHsmInternalFailureException"> /// The request was rejected because of an AWS CloudHSM internal failure. The request /// can be retried. /// </exception> /// <exception cref="Amazon.CloudHSMV2.Model.CloudHsmInvalidRequestException"> /// The request was rejected because it is not a valid request. /// </exception> /// <exception cref="Amazon.CloudHSMV2.Model.CloudHsmResourceNotFoundException"> /// The request was rejected because it refers to a resource that cannot be found. /// </exception> /// <exception cref="Amazon.CloudHSMV2.Model.CloudHsmServiceException"> /// The request was rejected because an error occurred. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/cloudhsmv2-2017-04-28/ListTags">REST API Reference for ListTags Operation</seealso> public virtual ListTagsResponse ListTags(ListTagsRequest request) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return(Invoke <ListTagsRequest, ListTagsResponse>(request, marshaller, unmarshaller)); }
public void ListTagsMarshallTest() { var request = InstantiateClassGenerator.Execute <ListTagsRequest>(); var marshaller = new ListTagsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <ListTagsRequest>(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("ListTags").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = ListTagsResponseUnmarshaller.Instance.Unmarshall(context) as ListTagsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void ListTagsMarshallTest() { var operation = service_model.FindOperation("ListTags"); var request = InstantiateClassGenerator.Execute <ListTagsRequest>(); var marshaller = new ListTagsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListTags", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListTagsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListTagsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListTags operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTags 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/cloudhsmv2-2017-04-28/ListTags">REST API Reference for ListTags Operation</seealso> public virtual Task <ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return(InvokeAsync <ListTagsRequest, ListTagsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListTags operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTags operation on AmazonElasticsearchClient.</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 EndListTags /// operation.</returns> public IAsyncResult BeginListTags(ListTagsRequest request, AsyncCallback callback, object state) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return(BeginInvoke <ListTagsRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the ListTags operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTags operation on AmazonCloudTrailClient.</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 EndListTags /// operation.</returns> public IAsyncResult BeginListTags(ListTagsRequest request, AsyncCallback callback, object state) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return BeginInvoke<ListTagsRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Lists the tags for the trail in the current region. /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListTags service method.</param> /// /// <returns>The response from the ListTags service method, as returned by CloudTrail.</returns> /// <exception cref="Amazon.CloudTrail.Model.CloudTrailARNInvalidException"> /// This exception is thrown when an operation is called with an invalid trail ARN. The /// format of a trail ARN is <code>arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail</code>. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidTokenException"> /// Reserved for future use. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException"> /// This exception is thrown when the provided trail name is not valid. Trail names must /// meet the following requirements: /// /// <ul> <li>Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores /// (_), or dashes (-)</li> <li>Start with a letter or number, and end with a letter or /// number</li> <li>Be between 3 and 128 characters</li> <li>Have no adjacent periods, /// underscores or dashes. Names like <code>my-_namespace</code> and <code>my--namespace</code> /// are invalid.</li> <li>Not be in IP address format (for example, 192.168.5.4)</li> /// </ul> /// </exception> /// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException"> /// This exception is thrown when the requested operation is not permitted. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.ResourceNotFoundException"> /// This exception is thrown when the specified resource is not found. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.ResourceTypeNotSupportedException"> /// This exception is thrown when the specified resource type is not supported by CloudTrail. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException"> /// This exception is thrown when the requested operation is not supported. For example, /// this exception will occur if an attempt is made to tag a trail and tagging is not /// supported in the current region. /// </exception> public ListTagsResponse ListTags(ListTagsRequest request) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return Invoke<ListTagsRequest,ListTagsResponse>(request, marshaller, unmarshaller); }
public void ListTagsMarshallTest() { var request = InstantiateClassGenerator.Execute<ListTagsRequest>(); var marshaller = new ListTagsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<ListTagsRequest>(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("ListTags").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = ListTagsResponseUnmarshaller.Instance.Unmarshall(context) as ListTagsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListTags operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListTags 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<ListTagsResponse> ListTagsAsync(ListTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListTagsRequestMarshaller(); var unmarshaller = ListTagsResponseUnmarshaller.Instance; return InvokeAsync<ListTagsRequest,ListTagsResponse>(request, marshaller, unmarshaller, cancellationToken); }