SIGN IN SIGN UP

Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.

0 0 241 Java
2017-03-02 13:01:17 -08:00
<?php
/**
2018-02-26 21:35:20 -08:00
* Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2017-03-02 13:01:17 -08:00
*
* This file is licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License. A copy of
* the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
require 'vendor/autoload.php';
use Aws\Iam\IamClient;
use Aws\Exception\AwsException;
/**
* Deletes the password for the specified user, which terminates the user's ability
* to access AWS services through the AWS Management Console.
*
* This code expects that you have AWS credentials set up per:
* https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html
2017-03-02 13:01:17 -08:00
*/
$client = new IamClient([
'profile' => 'default',
'region' => 'us-west-2',
'version' => '2010-05-08'
]);
try {
$result = $client->deleteLoginProfile(array(
// UserName is required
'UserName' => 'string',
));
var_dump($result);
} catch (AwsException $e) {
// output error message if fails
error_log($e->getMessage());
}
2018-10-11 14:25:58 -07:00
//snippet-sourcedescription:[<<FILENAME>> demonstrates how to ...]
//snippet-keyword:[PHP]
//snippet-keyword:[Code Sample]
//snippet-service:[<<ADD SERVICE>>]
//snippet-sourcetype:[full-example]
//snippet-sourcedate:[]
//snippet-sourceauthor:[AWS]