/// <summary> /// Initiates the asynchronous execution of the CreateVirtualMFADevice operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVirtualMFADevice 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<CreateVirtualMFADeviceResponse> CreateVirtualMFADeviceAsync(CreateVirtualMFADeviceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.Instance; return InvokeAsync<CreateVirtualMFADeviceRequest,CreateVirtualMFADeviceResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeCreateVirtualMFADevice(CreateVirtualMFADeviceRequest createVirtualMFADeviceRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new CreateVirtualMFADeviceRequestMarshaller().Marshall(createVirtualMFADeviceRequest); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
internal CreateVirtualMFADeviceResponse CreateVirtualMFADevice(CreateVirtualMFADeviceRequest request) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.Instance; return Invoke<CreateVirtualMFADeviceRequest,CreateVirtualMFADeviceResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the CreateVirtualMFADevice operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVirtualMFADevice 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 EndCreateVirtualMFADevice /// operation.</returns> public IAsyncResult BeginCreateVirtualMFADevice(CreateVirtualMFADeviceRequest request, AsyncCallback callback, object state) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.Instance; return BeginInvoke<CreateVirtualMFADeviceRequest>(request, marshaller, unmarshaller, callback, state); }
public void CreateVirtualMFADeviceMarshallTest() { var operation = service_model.FindOperation("CreateVirtualMFADevice"); var request = InstantiateClassGenerator.Execute<CreateVirtualMFADeviceRequest>(); var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); 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 = CreateVirtualMFADeviceResponseUnmarshaller.Instance.Unmarshall(context) as CreateVirtualMFADeviceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the CreateVirtualMFADevice operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVirtualMFADevice 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 CreateVirtualMFADeviceAsync(CreateVirtualMFADeviceRequest request, AmazonServiceCallback<CreateVirtualMFADeviceRequest, CreateVirtualMFADeviceResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<CreateVirtualMFADeviceRequest,CreateVirtualMFADeviceResponse> responseObject = new AmazonServiceResult<CreateVirtualMFADeviceRequest,CreateVirtualMFADeviceResponse>((CreateVirtualMFADeviceRequest)req, (CreateVirtualMFADeviceResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<CreateVirtualMFADeviceRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the CreateVirtualMFADevice operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.CreateVirtualMFADevice"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the CreateVirtualMFADevice 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<CreateVirtualMFADeviceResponse> CreateVirtualMFADeviceAsync(CreateVirtualMFADeviceRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, CreateVirtualMFADeviceRequest, CreateVirtualMFADeviceResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, use <a href="http://docs.aws.amazon.com/IAM/latest/APIReference/API_EnableMFADevice.html">EnableMFADevice</a> to attach the MFA device to an IAM /// user. For more information about creating and working with virtual MFA devices, go to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_VirtualMFA.html">Using a Virtual MFA Device</a> in <i>Using AWS /// Identity and Access Management</i> .</para> <para>For information about limits on the number of MFA devices you can create, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?LimitationsOnEntities.html">Limitations on Entities</a> in <i>Using AWS /// Identity and Access Management</i> .</para> <para><b>IMPORTANT:</b>The seed information contained in the QR code and the Base32 string /// should be treated like any other secret access information, such as your AWS access keys or your passwords. After you provision your virtual /// device, you should ensure that the information is destroyed following secure procedures.</para> /// </summary> /// /// <param name="createVirtualMFADeviceRequest">Container for the necessary parameters to execute the CreateVirtualMFADevice service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateVirtualMFADevice service method, as returned by AmazonIdentityManagementService.</returns> /// /// <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<CreateVirtualMFADeviceResponse> CreateVirtualMFADeviceAsync(CreateVirtualMFADeviceRequest createVirtualMFADeviceRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.GetInstance(); return Invoke<IRequest, CreateVirtualMFADeviceRequest, CreateVirtualMFADeviceResponse>(createVirtualMFADeviceRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeCreateVirtualMFADevice(CreateVirtualMFADeviceRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new CreateVirtualMFADeviceRequestMarshaller(); var unmarshaller = CreateVirtualMFADeviceResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }
/// <summary> /// <para>Creates a new virtual MFA device for the AWS account. After creating the virtual MFA, use EnableMFADevice to attach the MFA device to /// an IAM user. For more information about creating and working with virtual MFA devices, go to Using a Virtual MFA Device in <i>Using AWS /// Identity and Access Management</i> .</para> <para>For information about limits on the number of MFA devices you can create, see Limitations /// on Entities in <i>Using AWS Identity and Access Management</i> .</para> <para><b>IMPORTANT:</b>The seed information contained in the QR code /// and the Base32 string should be treated like any other secret access information, such as your AWS access keys or your passwords. After you /// provision your virtual device, you should ensure that the information is destroyed following secure procedures.</para> /// </summary> /// /// <param name="createVirtualMFADeviceRequest">Container for the necessary parameters to execute the CreateVirtualMFADevice service method on /// AmazonIdentityManagementService.</param> /// /// <returns>The response from the CreateVirtualMFADevice service method, as returned by AmazonIdentityManagementService.</returns> /// /// <exception cref="LimitExceededException"/> /// <exception cref="EntityAlreadyExistsException"/> public CreateVirtualMFADeviceResponse CreateVirtualMFADevice(CreateVirtualMFADeviceRequest createVirtualMFADeviceRequest) { IRequest<CreateVirtualMFADeviceRequest> request = new CreateVirtualMFADeviceRequestMarshaller().Marshall(createVirtualMFADeviceRequest); CreateVirtualMFADeviceResponse response = Invoke<CreateVirtualMFADeviceRequest, CreateVirtualMFADeviceResponse> (request, this.signer, CreateVirtualMFADeviceResponseUnmarshaller.GetInstance()); return response; }