/// <summary> /// Initiates the asynchronous execution of the CreateAccessKey operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateAccessKey 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<CreateAccessKeyResponse> CreateAccessKeyAsync(CreateAccessKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.Instance; return InvokeAsync<CreateAccessKeyRequest,CreateAccessKeyResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeCreateAccessKey(CreateAccessKeyRequest createAccessKeyRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateAccessKeyRequestMarshaller().Marshall(createAccessKeyRequest); var unmarshaller = CreateAccessKeyResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
internal CreateAccessKeyResponse CreateAccessKey(CreateAccessKeyRequest request) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.Instance; return Invoke<CreateAccessKeyRequest,CreateAccessKeyResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateAccessKey operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateAccessKey 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 EndCreateAccessKey /// operation.</returns> public IAsyncResult BeginCreateAccessKey(CreateAccessKeyRequest request, AsyncCallback callback, object state) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.Instance; return BeginInvoke<CreateAccessKeyRequest>(request, marshaller, unmarshaller, callback, state); }
public void CreateAccessKeyMarshallTest() { var operation = service_model.FindOperation("CreateAccessKey"); var request = InstantiateClassGenerator.Execute<CreateAccessKeyRequest>(); var marshaller = new CreateAccessKeyRequestMarshaller(); 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 = CreateAccessKeyResponseUnmarshaller.Instance.Unmarshall(context) as CreateAccessKeyResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para>Creates a new AWS Secret Access Key and corresponding AWS Access /// Key ID for the specified User. The default status for new keys is /// <c>Active</c> .</para> <para>If you do not specify a User name, IAM /// determines the User name implicitly based on the AWS Access Key ID /// signing the request. Because this action works for access keys under /// the AWS Account, you can use this API to manage root credentials even /// if the AWS Account has no associated Users.</para> <para>For /// information about limits on the number of keys you can create, see /// Limitations on IAM Entities in Using AWS Identity and Access /// Management.</para> <para><b>IMPORTANT:</b>To ensure the security of /// your AWS Account, the Secret Access Key is accessible only during key /// and User creation. You must save the key (for example, in a text /// file) if you want to be able to access it again. If a secret key is /// lost, you can delete the access keys for the associated User and then /// create new keys.</para> /// </summary> /// /// <param name="createAccessKeyRequest">Container for the necessary /// parameters to execute the CreateAccessKey service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateAccessKey service method, as /// returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="NoSuchEntityException"/> /// <exception cref="LimitExceededException"/> public CreateAccessKeyResponse CreateAccessKey(CreateAccessKeyRequest createAccessKeyRequest) { IRequest<CreateAccessKeyRequest> request = new CreateAccessKeyRequestMarshaller().Marshall(createAccessKeyRequest); CreateAccessKeyResponse response = Invoke<CreateAccessKeyRequest, CreateAccessKeyResponse> (request, this.signer, CreateAccessKeyResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the CreateAccessKey operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateAccessKey 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 CreateAccessKeyAsync(CreateAccessKeyRequest request, AmazonServiceCallback<CreateAccessKeyRequest, CreateAccessKeyResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<CreateAccessKeyRequest,CreateAccessKeyResponse> responseObject = new AmazonServiceResult<CreateAccessKeyRequest,CreateAccessKeyResponse>((CreateAccessKeyRequest)req, (CreateAccessKeyResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<CreateAccessKeyRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the CreateAccessKey operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.CreateAccessKey"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateAccessKey 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<CreateAccessKeyResponse> CreateAccessKeyAsync(CreateAccessKeyRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateAccessKeyRequest, CreateAccessKeyResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Creates a new AWS secret access key and corresponding AWS access key ID for the specified user. The default status for new keys is /// <c>Active</c> .</para> <para>If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID /// signing the request. Because this action works for access keys under the AWS account, you can use this API to manage root credentials even /// if the AWS account has no associated users.</para> <para>For information about limits on the number of keys 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> <para><b>IMPORTANT:</b>To ensure the security of your AWS account, the secret access key is /// accessible only during key and user creation. You must save the key (for example, in a text file) if you want to be able to access it again. /// If a secret key is lost, you can delete the access keys for the associated user and then create new keys.</para> /// </summary> /// /// <param name="createAccessKeyRequest">Container for the necessary parameters to execute the CreateAccessKey service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateAccessKey service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <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<CreateAccessKeyResponse> CreateAccessKeyAsync(CreateAccessKeyRequest createAccessKeyRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateAccessKeyRequest, CreateAccessKeyResponse>(createAccessKeyRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCreateAccessKey(CreateAccessKeyRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateAccessKeyRequestMarshaller(); var unmarshaller = CreateAccessKeyResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }