Container for the parameters to the DeleteLoginProfile operation. Deletes the password for the specified IAM user, which terminates the user's ability to access AWS services through the AWS Management Console.

Deleting a user's password does not prevent a user from accessing AWS through the command line interface or the API. To prevent all user access you must also either make any access keys inactive or delete them. For more information about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey.

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

            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 DeleteLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteLoginProfile 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<DeleteLoginProfileResponse> DeleteLoginProfileAsync(DeleteLoginProfileRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.Instance;

            return InvokeAsync<DeleteLoginProfileRequest,DeleteLoginProfileResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        internal DeleteLoginProfileResponse DeleteLoginProfile(DeleteLoginProfileRequest request)
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.Instance;

            return Invoke<DeleteLoginProfileRequest,DeleteLoginProfileResponse>(request, marshaller, unmarshaller);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteLoginProfile operation.
 /// <seealso cref="Amazon.IdentityManagement.AmazonIdentityManagementService.DeleteLoginProfile"/>
 /// </summary>
 /// 
 /// <param name="deleteLoginProfileRequest">Container for the necessary parameters to execute the DeleteLoginProfile 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 BeginDeleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest, AsyncCallback callback, object state)
 {
     return invokeDeleteLoginProfile(deleteLoginProfileRequest, callback, state, false);
 }
 IAsyncResult invokeDeleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DeleteLoginProfileRequestMarshaller().Marshall(deleteLoginProfileRequest);
     var unmarshaller = DeleteLoginProfileResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
 /// <summary>
 /// <para>Deletes the password for the specified user, which terminates the user's ability to access AWS services through the AWS Management
 /// Console.</para> <para><b>IMPORTANT:</b>Deleting a user's password does not prevent a user from accessing IAM through the command line
 /// interface or the API. To prevent all user access you must also either make the access key inactive or delete it. For more information
 /// about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey. </para>
 /// </summary>
 /// 
 /// <param name="deleteLoginProfileRequest">Container for the necessary parameters to execute the DeleteLoginProfile service method on
 ///          AmazonIdentityManagementService.</param>
 /// 
 /// <exception cref="EntityTemporarilyUnmodifiableException"/>
 /// <exception cref="NoSuchEntityException"/>
 public DeleteLoginProfileResponse DeleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest)
 {
     IAsyncResult asyncResult = invokeDeleteLoginProfile(deleteLoginProfileRequest, null, null, true);
     return EndDeleteLoginProfile(asyncResult);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteLoginProfile operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteLoginProfile 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 EndDeleteLoginProfile
        ///         operation.</returns>
        public IAsyncResult BeginDeleteLoginProfile(DeleteLoginProfileRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.Instance;

            return BeginInvoke<DeleteLoginProfileRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
 /// <summary>
 /// <para>Deletes the login profile for the specified User, which
 /// terminates the User's ability to access AWS services through the IAM
 /// login page.</para> <para><b>IMPORTANT:</b>Deleting a User's login
 /// profile does not prevent a User from accessing IAM through the command
 /// line interface or the API. To prevent all User access you must also
 /// either make the access key inactive or delete it. For more
 /// information about making keys inactive or deleting them, see
 /// UpdateAccessKey and DeleteAccessKey. </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="deleteLoginProfileRequest">Container for the necessary
 ///           parameters to execute the DeleteLoginProfile service method on
 ///           AmazonIdentityManagementService.</param>
 /// 
 /// <exception cref="EntityTemporarilyUnmodifiableException"/>
 /// <exception cref="NoSuchEntityException"/>
 public DeleteLoginProfileResponse DeleteLoginProfile(DeleteLoginProfileRequest deleteLoginProfileRequest)
 {
     IRequest<DeleteLoginProfileRequest> request = new DeleteLoginProfileRequestMarshaller().Marshall(deleteLoginProfileRequest);
     DeleteLoginProfileResponse response = Invoke<DeleteLoginProfileRequest, DeleteLoginProfileResponse> (request, this.signer, DeleteLoginProfileResponseUnmarshaller.GetInstance());
     return response;
 }
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteLoginProfile operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the DeleteLoginProfile 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 DeleteLoginProfileAsync(DeleteLoginProfileRequest request, AmazonServiceCallback<DeleteLoginProfileRequest, DeleteLoginProfileResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new DeleteLoginProfileRequestMarshaller();
     var unmarshaller = DeleteLoginProfileResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<DeleteLoginProfileRequest,DeleteLoginProfileResponse> responseObject 
                     = new AmazonServiceResult<DeleteLoginProfileRequest,DeleteLoginProfileResponse>((DeleteLoginProfileRequest)req, (DeleteLoginProfileResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<DeleteLoginProfileRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteLoginProfile operation.
        /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.DeleteLoginProfile"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteLoginProfile 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<DeleteLoginProfileResponse> DeleteLoginProfileAsync(DeleteLoginProfileRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DeleteLoginProfileRequest, DeleteLoginProfileResponse>(request, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// <para>Deletes the password for the specified user, which terminates the user's ability to access AWS services through the AWS Management
        /// Console.</para> <para><b>IMPORTANT:</b>Deleting a user's password does not prevent a user from accessing IAM through the command line
        /// interface or the API. To prevent all user access you must also either make the access key inactive or delete it. For more information about
        /// making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey. </para>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <exception cref="T:Amazon.IdentityManagement.Model.EntityTemporarilyUnmodifiableException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" />
        /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" />
		public DeleteLoginProfileResponse DeleteLoginProfile(DeleteLoginProfileRequest request)
        {
            var task = DeleteLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
 private Amazon.IdentityManagement.Model.DeleteLoginProfileResponse CallAWSServiceOperation(IAmazonIdentityManagementService client, Amazon.IdentityManagement.Model.DeleteLoginProfileRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Identity and Access Management", "DeleteLoginProfile");
     try
     {
         #if DESKTOP
         return(client.DeleteLoginProfile(request));
         #elif CORECLR
         return(client.DeleteLoginProfileAsync(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;
     }
 }
Esempio n. 13
0
        /// <summary>
        /// <para>Deletes the password for the specified user, which terminates the user's ability to access AWS services through the AWS Management
        /// Console.</para> <para><b>IMPORTANT:</b>Deleting a user's password does not prevent a user from accessing IAM through the command line
        /// interface or the API. To prevent all user access you must also either make the access key inactive or delete it. For more information about
        /// making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey. </para>
        /// </summary>
        /// 
        /// <param name="deleteLoginProfileRequest">Container for the necessary parameters to execute the DeleteLoginProfile service method on
        /// AmazonIdentityManagementService.</param>
        /// 
        /// <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<DeleteLoginProfileResponse> DeleteLoginProfileAsync(DeleteLoginProfileRequest deleteLoginProfileRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DeleteLoginProfileRequest, DeleteLoginProfileResponse>(deleteLoginProfileRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Esempio n. 14
0
		internal DeleteLoginProfileResponse DeleteLoginProfile(DeleteLoginProfileRequest request)
        {
            var task = DeleteLoginProfileAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
        IAsyncResult invokeDeleteLoginProfile(DeleteLoginProfileRequest request, AsyncCallback callback, object state, bool synchronized)
        {
            var marshaller = new DeleteLoginProfileRequestMarshaller();
            var unmarshaller = DeleteLoginProfileResponseUnmarshaller.Instance;

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