internal virtual CreateGroupResponse CreateGroup(CreateGroupRequest request) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return(Invoke <CreateGroupRequest, CreateGroupResponse>(request, marshaller, unmarshaller)); }
public void CreateGroupMarshallTest() { var operation = service_model.FindOperation("CreateGroup"); var request = InstantiateClassGenerator.Execute <CreateGroupRequest>(); var marshaller = new CreateGroupRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("CreateGroup", 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 = CreateGroupResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as CreateGroupResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void CreateGroupMarshallTest() { var request = InstantiateClassGenerator.Execute <CreateGroupRequest>(); var marshaller = new CreateGroupRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <CreateGroupRequest>(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("CreateGroup").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = CreateGroupResponseUnmarshaller.Instance.Unmarshall(context) as CreateGroupResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateGroup operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateGroup 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/resource-groups-2017-11-27/CreateGroup">REST API Reference for CreateGroup Operation</seealso> public virtual Task <CreateGroupResponse> CreateGroupAsync(CreateGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return(InvokeAsync <CreateGroupRequest, CreateGroupResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the CreateGroup operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateGroup 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<CreateGroupResponse> CreateGroupAsync(CreateGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return InvokeAsync<CreateGroupRequest,CreateGroupResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal CreateGroupResponse CreateGroup(CreateGroupRequest request) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return Invoke<CreateGroupRequest,CreateGroupResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeCreateGroup(CreateGroupRequest createGroupRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateGroupRequestMarshaller().Marshall(createGroupRequest); var unmarshaller = CreateGroupResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
public void CreateGroupMarshallTest() { var operation = service_model.FindOperation("CreateGroup"); var request = InstantiateClassGenerator.Execute<CreateGroupRequest>(); var marshaller = new CreateGroupRequestMarshaller(); 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 = CreateGroupResponseUnmarshaller.Instance.Unmarshall(context) as CreateGroupResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateGroup operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateGroup 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 EndCreateGroup /// operation.</returns> public IAsyncResult BeginCreateGroup(CreateGroupRequest request, AsyncCallback callback, object state) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return BeginInvoke<CreateGroupRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>Creates a new group.</para> <para>For information about the /// number of groups you can create, see Limitations on IAM Entities in /// Using AWS Identity and Access Management.</para> /// </summary> /// /// <param name="createGroupRequest">Container for the necessary /// parameters to execute the CreateGroup service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateGroup service method, as returned /// by AmazonIdentityManagementService.</returns> /// /// <exception cref="NoSuchEntityException"/> /// <exception cref="LimitExceededException"/> /// <exception cref="EntityAlreadyExistsException"/> public CreateGroupResponse CreateGroup(CreateGroupRequest createGroupRequest) { IRequest<CreateGroupRequest> request = new CreateGroupRequestMarshaller().Marshall(createGroupRequest); CreateGroupResponse response = Invoke<CreateGroupRequest, CreateGroupResponse> (request, this.signer, CreateGroupResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CreateGroup operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateGroup 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 CreateGroupAsync(CreateGroupRequest request, AmazonServiceCallback<CreateGroupRequest, CreateGroupResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<CreateGroupRequest,CreateGroupResponse> responseObject = new AmazonServiceResult<CreateGroupRequest,CreateGroupResponse>((CreateGroupRequest)req, (CreateGroupResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<CreateGroupRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the CreateGroup operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.CreateGroup"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateGroup 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<CreateGroupResponse> CreateGroupAsync(CreateGroupRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateGroupRequest, CreateGroupResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Creates a new group.</para> <para>For information about the number of groups you can create, see <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> /// </summary> /// /// <param name="createGroupRequest">Container for the necessary parameters to execute the CreateGroup service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateGroup service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <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<CreateGroupResponse> CreateGroupAsync(CreateGroupRequest createGroupRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateGroupRequest, CreateGroupResponse>(createGroupRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCreateGroup(CreateGroupRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateGroupRequestMarshaller(); var unmarshaller = CreateGroupResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }