Container for the parameters to the CreateLoginProfile operation.

Creates a login profile for the specified User, giving the User the ability to access AWS services such as the AWS Management Console. For more information about login profiles, see Managing Login Profiles and MFA Devices in Using AWS Identity and Access Management.

NOTE:In the full release you will be able to use IAM to access your services through the AWS Management Console. Although this feature is not currently available, you can create login profiles for your Users now. Then, when this feature is implemented, your Users can use IAM to access your services through the AWS Management Console.

Inheritance: Amazon.Runtime.AmazonWebServiceRequest
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.IdentityManagement.Model.CreateLoginProfileRequest();

            if (cmdletContext.Password != null)
            {
                request.Password = cmdletContext.Password;
            }
            if (cmdletContext.PasswordResetRequired != null)
            {
                request.PasswordResetRequired = cmdletContext.PasswordResetRequired.Value;
            }
            if (cmdletContext.UserName != null)
            {
                request.UserName = cmdletContext.UserName;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateLoginProfile 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<CreateLoginProfileResponse> CreateLoginProfileAsync(CreateLoginProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.Instance;

            return InvokeAsync<CreateLoginProfileRequest,CreateLoginProfileResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal CreateLoginProfileResponse CreateLoginProfile(CreateLoginProfileRequest request)
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.Instance;

            return Invoke<CreateLoginProfileRequest,CreateLoginProfileResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokeCreateLoginProfile(CreateLoginProfileRequest createLoginProfileRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new CreateLoginProfileRequestMarshaller().Marshall(createLoginProfileRequest);
     var unmarshaller = CreateLoginProfileResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the CreateLoginProfile operation.
 /// <seealso cref="Amazon.IdentityManagement.AmazonIdentityManagementService.CreateLoginProfile"/>
 /// </summary>
 /// 
 /// <param name="createLoginProfileRequest">Container for the necessary parameters to execute the CreateLoginProfile operation on
 ///          AmazonIdentityManagementService.</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
 ///         EndCreateLoginProfile operation.</returns>
 public IAsyncResult BeginCreateLoginProfile(CreateLoginProfileRequest createLoginProfileRequest, AsyncCallback callback, object state)
 {
     return invokeCreateLoginProfile(createLoginProfileRequest, callback, state, false);
 }
 /// <summary>
 /// <para>Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For
 /// more information about managing passwords, see Managing Passwords in <i>Using IAM</i> .</para>
 /// </summary>
 /// 
 /// <param name="createLoginProfileRequest">Container for the necessary parameters to execute the CreateLoginProfile service method on
 ///          AmazonIdentityManagementService.</param>
 /// 
 /// <returns>The response from the CreateLoginProfile service method, as returned by AmazonIdentityManagementService.</returns>
 /// 
 /// <exception cref="PasswordPolicyViolationException"/>
 /// <exception cref="NoSuchEntityException"/>
 /// <exception cref="EntityAlreadyExistsException"/>
 public CreateLoginProfileResponse CreateLoginProfile(CreateLoginProfileRequest createLoginProfileRequest)
 {
     IAsyncResult asyncResult = invokeCreateLoginProfile(createLoginProfileRequest, null, null, true);
     return EndCreateLoginProfile(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateLoginProfile operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateLoginProfile 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 EndCreateLoginProfile
        ///         operation.</returns>
        public IAsyncResult BeginCreateLoginProfile(CreateLoginProfileRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.Instance;

            return BeginInvoke<CreateLoginProfileRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// <para>Creates a login profile for the specified User, giving the User
 /// the ability to access AWS services such as the AWS Management Console.
 /// For more information about login profiles, see Managing Login
 /// Profiles and MFA Devices in Using AWS Identity and Access
 /// Management.</para> <para><b>NOTE:</b>In the full release you will be
 /// able to use IAM to access your services through the AWS Management
 /// Console. Although this feature is not currently available, you can
 /// create login profiles for your Users now. Then, when this feature is
 /// implemented, your Users can use IAM to access your services through
 /// the AWS Management Console.</para>
 /// </summary>
 /// 
 /// <param name="createLoginProfileRequest">Container for the necessary
 ///           parameters to execute the CreateLoginProfile service method on
 ///           AmazonIdentityManagementService.</param>
 /// 
 /// <returns>The response from the CreateLoginProfile service method, as
 ///         returned by AmazonIdentityManagementService.</returns>
 /// 
 /// <exception cref="NoSuchEntityException"/>
 /// <exception cref="EntityAlreadyExistsException"/>
 public CreateLoginProfileResponse CreateLoginProfile(CreateLoginProfileRequest createLoginProfileRequest)
 {
     IRequest<CreateLoginProfileRequest> request = new CreateLoginProfileRequestMarshaller().Marshall(createLoginProfileRequest);
     CreateLoginProfileResponse response = Invoke<CreateLoginProfileRequest, CreateLoginProfileResponse> (request, this.signer, CreateLoginProfileResponseUnmarshaller.GetInstance());
     return response;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the CreateLoginProfile operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the CreateLoginProfile 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 CreateLoginProfileAsync(CreateLoginProfileRequest request, AmazonServiceCallback<CreateLoginProfileRequest, CreateLoginProfileResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new CreateLoginProfileRequestMarshaller();
     var unmarshaller = CreateLoginProfileResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<CreateLoginProfileRequest,CreateLoginProfileResponse> responseObject 
                     = new AmazonServiceResult<CreateLoginProfileRequest,CreateLoginProfileResponse>((CreateLoginProfileRequest)req, (CreateLoginProfileResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<CreateLoginProfileRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.CreateLoginProfile"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateLoginProfile 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<CreateLoginProfileResponse> CreateLoginProfileAsync(CreateLoginProfileRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, CreateLoginProfileRequest, CreateLoginProfileResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// <para>Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For
        /// more information about managing passwords, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_ManagingLogins.html">Managing Passwords</a> in <i>Using IAM</i>
        /// .</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <returns>The response from the CreateLoginProfile service method, as returned by AmazonIdentityManagementService.</returns>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.PasswordPolicyViolationException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.EntityAlreadyExistsException" />
		public CreateLoginProfileResponse CreateLoginProfile(CreateLoginProfileRequest request)
        {
            var task = CreateLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
Beispiel #12
0
        /// <summary>
        /// <para>Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For
        /// more information about managing passwords, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?Using_ManagingLogins.html">Managing Passwords</a> in <i>Using IAM</i>
        /// .</para>
        /// </summary>
        /// 
        /// <param name="createLoginProfileRequest">Container for the necessary parameters to execute the CreateLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <returns>The response from the CreateLoginProfile service method, as returned by AmazonIdentityManagementService.</returns>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.PasswordPolicyViolationException" />
        /// <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<CreateLoginProfileResponse> CreateLoginProfileAsync(CreateLoginProfileRequest createLoginProfileRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, CreateLoginProfileRequest, CreateLoginProfileResponse>(createLoginProfileRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Beispiel #13
0
		internal CreateLoginProfileResponse CreateLoginProfile(CreateLoginProfileRequest request)
        {
            var task = CreateLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
 private Amazon.IdentityManagement.Model.CreateLoginProfileResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.CreateLoginProfileRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "CreateLoginProfile");
     try
     {
         #if DESKTOP
         return(client.CreateLoginProfile(request));
         #elif CORECLR
         return(client.CreateLoginProfileAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        IAsyncResult invokeCreateLoginProfile(CreateLoginProfileRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new CreateLoginProfileRequestMarshaller();
            var unmarshaller = CreateLoginProfileResponseUnmarshaller.Instance;

            return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer);
        }