internal RetireGrantResponse RetireGrant(RetireGrantRequest request) { var marshaller = new RetireGrantRequestMarshaller(); var unmarshaller = RetireGrantResponseUnmarshaller.Instance; return(Invoke <RetireGrantRequest, RetireGrantResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the RetireGrant operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RetireGrant 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 <RetireGrantResponse> RetireGrantAsync(RetireGrantRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RetireGrantRequestMarshaller(); var unmarshaller = RetireGrantResponseUnmarshaller.Instance; return(InvokeAsync <RetireGrantRequest, RetireGrantResponse>(request, marshaller, unmarshaller, cancellationToken)); }
public void RetireGrantMarshallTest() { var request = InstantiateClassGenerator.Execute <RetireGrantRequest>(); var marshaller = new RetireGrantRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <RetireGrantRequest>(request, jsonRequest); }
/// <summary> /// Initiates the asynchronous execution of the RetireGrant operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RetireGrant 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<RetireGrantResponse> RetireGrantAsync(RetireGrantRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RetireGrantRequestMarshaller(); var unmarshaller = RetireGrantResponseUnmarshaller.Instance; return InvokeAsync<RetireGrantRequest,RetireGrantResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Retires a grant. You can retire a grant when you're done using it to clean up. You /// should revoke a grant when you intend to actively deny operations that depend on it. /// The following are permitted to call this API: <ul> <li>The account that created the /// grant</li> <li>The <code>RetiringPrincipal</code>, if present</li> <li>The <code>GranteePrincipal</code>, /// if <code>RetireGrant</code> is a grantee operation</li> </ul> The grant to retire /// must be identified by its grant token or by a combination of the key ARN and the grant /// ID. A grant token is a unique variable-length base64-encoded string. A grant ID is /// a 64 character unique identifier of a grant. Both are returned by the <code>CreateGrant</code> /// function. /// </summary> /// <param name="request">Container for the necessary parameters to execute the RetireGrant service method.</param> /// /// <returns>The response from the RetireGrant service method, as returned by KeyManagementService.</returns> /// <exception cref="Amazon.KeyManagementService.Model.DependencyTimeoutException"> /// The system timed out while trying to fulfill the request. /// </exception> /// <exception cref="Amazon.KeyManagementService.Model.InvalidGrantTokenException"> /// A grant token provided as part of the request is invalid. /// </exception> /// <exception cref="Amazon.KeyManagementService.Model.KMSInternalException"> /// The request was rejected because an internal exception occurred. This error can be /// retried. /// </exception> /// <exception cref="Amazon.KeyManagementService.Model.NotFoundException"> /// The request was rejected because the specified entity or resource could not be found. /// </exception> public RetireGrantResponse RetireGrant(RetireGrantRequest request) { var marshaller = new RetireGrantRequestMarshaller(); var unmarshaller = RetireGrantResponseUnmarshaller.Instance; return Invoke<RetireGrantRequest,RetireGrantResponse>(request, marshaller, unmarshaller); }
public void RetireGrantMarshallTest() { var request = InstantiateClassGenerator.Execute<RetireGrantRequest>(); var marshaller = new RetireGrantRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<RetireGrantRequest>(request,jsonRequest); }
/// <summary> /// Initiates the asynchronous execution of the RetireGrant operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RetireGrant operation on AmazonKeyManagementServiceClient.</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 EndRetireGrant /// operation.</returns> public IAsyncResult BeginRetireGrant(RetireGrantRequest request, AsyncCallback callback, object state) { var marshaller = new RetireGrantRequestMarshaller(); var unmarshaller = RetireGrantResponseUnmarshaller.Instance; return BeginInvoke<RetireGrantRequest>(request, marshaller, unmarshaller, callback, state); }