internal CreateRoleResponse CreateRole(CreateRoleRequest request) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.Instance; return Invoke<CreateRoleRequest,CreateRoleResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateRole operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateRole 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<CreateRoleResponse> CreateRoleAsync(CreateRoleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.Instance; return InvokeAsync<CreateRoleRequest,CreateRoleResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void CreateRoleMarshallTest() { var operation = service_model.FindOperation("CreateRole"); var request = InstantiateClassGenerator.Execute<CreateRoleRequest>(); var marshaller = new CreateRoleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = CreateRoleResponseUnmarshaller.Instance.Unmarshall(context) as CreateRoleResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
IAsyncResult invokeCreateRole(CreateRoleRequest createRoleRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateRoleRequestMarshaller().Marshall(createRoleRequest); var unmarshaller = CreateRoleResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// Initiates the asynchronous execution of the CreateRole operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateRole 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 EndCreateRole /// operation.</returns> public IAsyncResult BeginCreateRole(CreateRoleRequest request, AsyncCallback callback, object state) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.Instance; return BeginInvoke<CreateRoleRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the CreateRole operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateRole 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 CreateRoleAsync(CreateRoleRequest request, AmazonServiceCallback<CreateRoleRequest, CreateRoleResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<CreateRoleRequest,CreateRoleResponse> responseObject = new AmazonServiceResult<CreateRoleRequest,CreateRoleResponse>((CreateRoleRequest)req, (CreateRoleResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<CreateRoleRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the CreateRole operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.CreateRole"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateRole 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<CreateRoleResponse> CreateRoleAsync(CreateRoleRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateRoleRequest, CreateRoleResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Creates a new role for your AWS account. For more information about roles, go to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html">Working with Roles</a> . /// For information about limitations on role names and the number of roles you can create, go to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?LimitationsOnEntities.html">Limitations on IAM Entities</a> in <i>Using /// AWS Identity and Access Management</i> .</para> <para>The policy grants permission to an EC2 instance to assume the role. The policy is /// URL-encoded according to RFC 3986. For more information about RFC 3986, go to <a href="http://www.faqs.org/rfcs/rfc3986.html">http://www.faqs.org/rfcs/rfc3986.html</a> . /// Currently, only EC2 instances can assume roles.</para> /// </summary> /// /// <param name="createRoleRequest">Container for the necessary parameters to execute the CreateRole service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateRole service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="T:Amazon.IdentityManagement.Model.MalformedPolicyDocumentException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.EntityAlreadyExistsException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<CreateRoleResponse> CreateRoleAsync(CreateRoleRequest createRoleRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateRoleRequest, CreateRoleResponse>(createRoleRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCreateRole(CreateRoleRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateRoleRequestMarshaller(); var unmarshaller = CreateRoleResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }