Container for the parameters to the UpdateLoginProfile operation.

Updates the login profile for the specified User. Use this API to change the User's password.

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.UpdateLoginProfileRequest();

            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 UpdateLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateLoginProfile 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<UpdateLoginProfileResponse> UpdateLoginProfileAsync(UpdateLoginProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateLoginProfileRequest,UpdateLoginProfileResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal UpdateLoginProfileResponse UpdateLoginProfile(UpdateLoginProfileRequest request)
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.Instance;

            return Invoke<UpdateLoginProfileRequest,UpdateLoginProfileResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokeUpdateLoginProfile(UpdateLoginProfileRequest updateLoginProfileRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new UpdateLoginProfileRequestMarshaller().Marshall(updateLoginProfileRequest);
     var unmarshaller = UpdateLoginProfileResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// <para>Changes the password for the specified user.</para>
 /// </summary>
 /// 
 /// <param name="updateLoginProfileRequest">Container for the necessary parameters to execute the UpdateLoginProfile service method on
 ///          AmazonIdentityManagementService.</param>
 /// 
 /// <exception cref="PasswordPolicyViolationException"/>
 /// <exception cref="EntityTemporarilyUnmodifiableException"/>
 /// <exception cref="NoSuchEntityException"/>
 public UpdateLoginProfileResponse UpdateLoginProfile(UpdateLoginProfileRequest updateLoginProfileRequest)
 {
     IAsyncResult asyncResult = invokeUpdateLoginProfile(updateLoginProfileRequest, null, null, true);
     return EndUpdateLoginProfile(asyncResult);
 }
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateLoginProfile operation.
 /// <seealso cref="Amazon.IdentityManagement.AmazonIdentityManagementService.UpdateLoginProfile"/>
 /// </summary>
 /// 
 /// <param name="updateLoginProfileRequest">Container for the necessary parameters to execute the UpdateLoginProfile 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>
 public IAsyncResult BeginUpdateLoginProfile(UpdateLoginProfileRequest updateLoginProfileRequest, AsyncCallback callback, object state)
 {
     return invokeUpdateLoginProfile(updateLoginProfileRequest, callback, state, false);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateLoginProfile operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateLoginProfile 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 EndUpdateLoginProfile
        ///         operation.</returns>
        public IAsyncResult BeginUpdateLoginProfile(UpdateLoginProfileRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateLoginProfileRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 private Amazon.IdentityManagement.Model.UpdateLoginProfileResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.UpdateLoginProfileRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "UpdateLoginProfile");
     try
     {
         #if DESKTOP
         return(client.UpdateLoginProfile(request));
         #elif CORECLR
         return(client.UpdateLoginProfileAsync(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;
     }
 }
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateLoginProfile operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the UpdateLoginProfile 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 UpdateLoginProfileAsync(UpdateLoginProfileRequest request, AmazonServiceCallback<UpdateLoginProfileRequest, UpdateLoginProfileResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new UpdateLoginProfileRequestMarshaller();
     var unmarshaller = UpdateLoginProfileResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<UpdateLoginProfileRequest,UpdateLoginProfileResponse> responseObject 
                     = new AmazonServiceResult<UpdateLoginProfileRequest,UpdateLoginProfileResponse>((UpdateLoginProfileRequest)req, (UpdateLoginProfileResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<UpdateLoginProfileRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
 /// <summary>
 /// <para>Updates the login profile for the specified User. Use this API
 /// to change the User's password.</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="updateLoginProfileRequest">Container for the necessary
 ///           parameters to execute the UpdateLoginProfile service method on
 ///           AmazonIdentityManagementService.</param>
 /// 
 /// <exception cref="EntityTemporarilyUnmodifiableException"/>
 /// <exception cref="NoSuchEntityException"/>
 public UpdateLoginProfileResponse UpdateLoginProfile(UpdateLoginProfileRequest updateLoginProfileRequest)
 {
     IRequest<UpdateLoginProfileRequest> request = new UpdateLoginProfileRequestMarshaller().Marshall(updateLoginProfileRequest);
     UpdateLoginProfileResponse response = Invoke<UpdateLoginProfileRequest, UpdateLoginProfileResponse> (request, this.signer, UpdateLoginProfileResponseUnmarshaller.GetInstance());
     return response;
 }
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.UpdateLoginProfile"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateLoginProfile 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<UpdateLoginProfileResponse> UpdateLoginProfileAsync(UpdateLoginProfileRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, UpdateLoginProfileRequest, UpdateLoginProfileResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// <para>Changes the password for the specified user.</para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.PasswordPolicyViolationException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.EntityTemporarilyUnmodifiableException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" />
		public UpdateLoginProfileResponse UpdateLoginProfile(UpdateLoginProfileRequest request)
        {
            var task = UpdateLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// <para>Changes the password for the specified user.</para>
        /// </summary>
        /// 
        /// <param name="updateLoginProfileRequest">Container for the necessary parameters to execute the UpdateLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.PasswordPolicyViolationException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.EntityTemporarilyUnmodifiableException" />
        /// <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<UpdateLoginProfileResponse> UpdateLoginProfileAsync(UpdateLoginProfileRequest updateLoginProfileRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, UpdateLoginProfileRequest, UpdateLoginProfileResponse>(updateLoginProfileRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Esempio n. 14
0
		internal UpdateLoginProfileResponse UpdateLoginProfile(UpdateLoginProfileRequest request)
        {
            var task = UpdateLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        IAsyncResult invokeUpdateLoginProfile(UpdateLoginProfileRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new UpdateLoginProfileRequestMarshaller();
            var unmarshaller = UpdateLoginProfileResponseUnmarshaller.Instance;

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