internal DeleteRoleResponse DeleteRole(DeleteRoleRequest request) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.Instance; return Invoke<DeleteRoleRequest,DeleteRoleResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRole operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRole 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<DeleteRoleResponse> DeleteRoleAsync(DeleteRoleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.Instance; return InvokeAsync<DeleteRoleRequest,DeleteRoleResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DeleteRoleMarshallTest() { var operation = service_model.FindOperation("DeleteRole"); var request = InstantiateClassGenerator.Execute<DeleteRoleRequest>(); var marshaller = new DeleteRoleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
IAsyncResult invokeDeleteRole(DeleteRoleRequest deleteRoleRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteRoleRequestMarshaller().Marshall(deleteRoleRequest); var unmarshaller = DeleteRoleResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the DeleteRole operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRole operation on AmazonIdentityManagementServiceClient.</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 EndDeleteRole /// operation.</returns> public IAsyncResult BeginDeleteRole(DeleteRoleRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.Instance; return BeginInvoke<DeleteRoleRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRole operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRole operation on AmazonIdentityManagementServiceClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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> public void DeleteRoleAsync(DeleteRoleRequest request, AmazonServiceCallback<DeleteRoleRequest, DeleteRoleResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeleteRoleRequest,DeleteRoleResponse> responseObject = new AmazonServiceResult<DeleteRoleRequest,DeleteRoleResponse>((DeleteRoleRequest)req, (DeleteRoleResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeleteRoleRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRole operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.DeleteRole"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRole 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 async Task<DeleteRoleResponse> DeleteRoleAsync(DeleteRoleRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteRoleRequest, DeleteRoleResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Deletes the specified role. The role must not have any policies attached. For more information about roles, go to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html">Working with Roles</a> .</para> <para><b>IMPORTANT:</b>Make /// sure you do not have any Amazon EC2 instances running with the role you are about to delete. Deleting a role or instance profile that is /// associated with a running instance will break any applications running on the instance.</para> /// </summary> /// /// <param name="deleteRoleRequest">Container for the necessary parameters to execute the DeleteRole service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.DeleteConflictException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteRoleResponse> DeleteRoleAsync(DeleteRoleRequest deleteRoleRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteRoleRequest, DeleteRoleResponse>(deleteRoleRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeDeleteRole(DeleteRoleRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new DeleteRoleRequestMarshaller(); var unmarshaller = DeleteRoleResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }