// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

package iam_test

import (
	"bytes"
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/iam"
)

var _ time.Duration
var _ bytes.Buffer

func ExampleIAM_AddClientIDToOpenIDConnectProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AddClientIDToOpenIDConnectProviderInput{
		ClientID:                 aws.String("clientIDType"), // Required
		OpenIDConnectProviderArn: aws.String("arnType"),      // Required
	}
	resp, err := svc.AddClientIDToOpenIDConnectProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_AddRoleToInstanceProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AddRoleToInstanceProfileInput{
		InstanceProfileName: aws.String("instanceProfileNameType"), // Required
		RoleName:            aws.String("roleNameType"),            // Required
	}
	resp, err := svc.AddRoleToInstanceProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_AddUserToGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AddUserToGroupInput{
		GroupName: aws.String("groupNameType"),        // Required
		UserName:  aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.AddUserToGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_AttachGroupPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AttachGroupPolicyInput{
		GroupName: aws.String("groupNameType"), // Required
		PolicyArn: aws.String("arnType"),       // Required
	}
	resp, err := svc.AttachGroupPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_AttachRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AttachRolePolicyInput{
		PolicyArn: aws.String("arnType"),      // Required
		RoleName:  aws.String("roleNameType"), // Required
	}
	resp, err := svc.AttachRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_AttachUserPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.AttachUserPolicyInput{
		PolicyArn: aws.String("arnType"),      // Required
		UserName:  aws.String("userNameType"), // Required
	}
	resp, err := svc.AttachUserPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ChangePassword() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ChangePasswordInput{
		NewPassword: aws.String("passwordType"), // Required
		OldPassword: aws.String("passwordType"), // Required
	}
	resp, err := svc.ChangePassword(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateAccessKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateAccessKeyInput{
		UserName: aws.String("existingUserNameType"),
	}
	resp, err := svc.CreateAccessKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateAccountAlias() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateAccountAliasInput{
		AccountAlias: aws.String("accountAliasType"), // Required
	}
	resp, err := svc.CreateAccountAlias(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateGroupInput{
		GroupName: aws.String("groupNameType"), // Required
		Path:      aws.String("pathType"),
	}
	resp, err := svc.CreateGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateInstanceProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateInstanceProfileInput{
		InstanceProfileName: aws.String("instanceProfileNameType"), // Required
		Path:                aws.String("pathType"),
	}
	resp, err := svc.CreateInstanceProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateLoginProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateLoginProfileInput{
		Password:              aws.String("passwordType"), // Required
		UserName:              aws.String("userNameType"), // Required
		PasswordResetRequired: aws.Bool(true),
	}
	resp, err := svc.CreateLoginProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateOpenIDConnectProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateOpenIDConnectProviderInput{
		ThumbprintList: []*string{ // Required
			aws.String("thumbprintType"), // Required
			// More values...
		},
		Url: aws.String("OpenIDConnectProviderUrlType"), // Required
		ClientIDList: []*string{
			aws.String("clientIDType"), // Required
			// More values...
		},
	}
	resp, err := svc.CreateOpenIDConnectProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreatePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreatePolicyInput{
		PolicyDocument: aws.String("policyDocumentType"), // Required
		PolicyName:     aws.String("policyNameType"),     // Required
		Description:    aws.String("policyDescriptionType"),
		Path:           aws.String("policyPathType"),
	}
	resp, err := svc.CreatePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreatePolicyVersion() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreatePolicyVersionInput{
		PolicyArn:      aws.String("arnType"),            // Required
		PolicyDocument: aws.String("policyDocumentType"), // Required
		SetAsDefault:   aws.Bool(true),
	}
	resp, err := svc.CreatePolicyVersion(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateRole() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateRoleInput{
		AssumeRolePolicyDocument: aws.String("policyDocumentType"), // Required
		RoleName:                 aws.String("roleNameType"),       // Required
		Path:                     aws.String("pathType"),
	}
	resp, err := svc.CreateRole(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateSAMLProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateSAMLProviderInput{
		Name:                 aws.String("SAMLProviderNameType"),     // Required
		SAMLMetadataDocument: aws.String("SAMLMetadataDocumentType"), // Required
	}
	resp, err := svc.CreateSAMLProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateUser() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateUserInput{
		UserName: aws.String("userNameType"), // Required
		Path:     aws.String("pathType"),
	}
	resp, err := svc.CreateUser(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_CreateVirtualMFADevice() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.CreateVirtualMFADeviceInput{
		VirtualMFADeviceName: aws.String("virtualMFADeviceName"), // Required
		Path:                 aws.String("pathType"),
	}
	resp, err := svc.CreateVirtualMFADevice(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeactivateMFADevice() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeactivateMFADeviceInput{
		SerialNumber: aws.String("serialNumberType"),     // Required
		UserName:     aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.DeactivateMFADevice(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteAccessKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteAccessKeyInput{
		AccessKeyId: aws.String("accessKeyIdType"), // Required
		UserName:    aws.String("existingUserNameType"),
	}
	resp, err := svc.DeleteAccessKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteAccountAlias() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteAccountAliasInput{
		AccountAlias: aws.String("accountAliasType"), // Required
	}
	resp, err := svc.DeleteAccountAlias(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteAccountPasswordPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.DeleteAccountPasswordPolicyInput
	resp, err := svc.DeleteAccountPasswordPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteGroupInput{
		GroupName: aws.String("groupNameType"), // Required
	}
	resp, err := svc.DeleteGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteGroupPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteGroupPolicyInput{
		GroupName:  aws.String("groupNameType"),  // Required
		PolicyName: aws.String("policyNameType"), // Required
	}
	resp, err := svc.DeleteGroupPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteInstanceProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteInstanceProfileInput{
		InstanceProfileName: aws.String("instanceProfileNameType"), // Required
	}
	resp, err := svc.DeleteInstanceProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteLoginProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteLoginProfileInput{
		UserName: aws.String("userNameType"), // Required
	}
	resp, err := svc.DeleteLoginProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteOpenIDConnectProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteOpenIDConnectProviderInput{
		OpenIDConnectProviderArn: aws.String("arnType"), // Required
	}
	resp, err := svc.DeleteOpenIDConnectProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeletePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeletePolicyInput{
		PolicyArn: aws.String("arnType"), // Required
	}
	resp, err := svc.DeletePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeletePolicyVersion() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeletePolicyVersionInput{
		PolicyArn: aws.String("arnType"),             // Required
		VersionId: aws.String("policyVersionIdType"), // Required
	}
	resp, err := svc.DeletePolicyVersion(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteRole() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteRoleInput{
		RoleName: aws.String("roleNameType"), // Required
	}
	resp, err := svc.DeleteRole(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteRolePolicyInput{
		PolicyName: aws.String("policyNameType"), // Required
		RoleName:   aws.String("roleNameType"),   // Required
	}
	resp, err := svc.DeleteRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteSAMLProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteSAMLProviderInput{
		SAMLProviderArn: aws.String("arnType"), // Required
	}
	resp, err := svc.DeleteSAMLProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteSSHPublicKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteSSHPublicKeyInput{
		SSHPublicKeyId: aws.String("publicKeyIdType"), // Required
		UserName:       aws.String("userNameType"),    // Required
	}
	resp, err := svc.DeleteSSHPublicKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteServerCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteServerCertificateInput{
		ServerCertificateName: aws.String("serverCertificateNameType"), // Required
	}
	resp, err := svc.DeleteServerCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteSigningCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteSigningCertificateInput{
		CertificateId: aws.String("certificateIdType"), // Required
		UserName:      aws.String("existingUserNameType"),
	}
	resp, err := svc.DeleteSigningCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteUser() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteUserInput{
		UserName: aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.DeleteUser(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteUserPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteUserPolicyInput{
		PolicyName: aws.String("policyNameType"),       // Required
		UserName:   aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.DeleteUserPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DeleteVirtualMFADevice() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DeleteVirtualMFADeviceInput{
		SerialNumber: aws.String("serialNumberType"), // Required
	}
	resp, err := svc.DeleteVirtualMFADevice(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DetachGroupPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DetachGroupPolicyInput{
		GroupName: aws.String("groupNameType"), // Required
		PolicyArn: aws.String("arnType"),       // Required
	}
	resp, err := svc.DetachGroupPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DetachRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DetachRolePolicyInput{
		PolicyArn: aws.String("arnType"),      // Required
		RoleName:  aws.String("roleNameType"), // Required
	}
	resp, err := svc.DetachRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_DetachUserPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.DetachUserPolicyInput{
		PolicyArn: aws.String("arnType"),      // Required
		UserName:  aws.String("userNameType"), // Required
	}
	resp, err := svc.DetachUserPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_EnableMFADevice() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.EnableMFADeviceInput{
		AuthenticationCode1: aws.String("authenticationCodeType"), // Required
		AuthenticationCode2: aws.String("authenticationCodeType"), // Required
		SerialNumber:        aws.String("serialNumberType"),       // Required
		UserName:            aws.String("existingUserNameType"),   // Required
	}
	resp, err := svc.EnableMFADevice(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GenerateCredentialReport() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.GenerateCredentialReportInput
	resp, err := svc.GenerateCredentialReport(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetAccessKeyLastUsed() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetAccessKeyLastUsedInput{
		AccessKeyId: aws.String("accessKeyIdType"), // Required
	}
	resp, err := svc.GetAccessKeyLastUsed(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetAccountAuthorizationDetails() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetAccountAuthorizationDetailsInput{
		Filter: []*string{
			aws.String("EntityType"), // Required
			// More values...
		},
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.GetAccountAuthorizationDetails(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetAccountPasswordPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.GetAccountPasswordPolicyInput
	resp, err := svc.GetAccountPasswordPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetAccountSummary() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.GetAccountSummaryInput
	resp, err := svc.GetAccountSummary(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetContextKeysForCustomPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetContextKeysForCustomPolicyInput{
		PolicyInputList: []*string{ // Required
			aws.String("policyDocumentType"), // Required
			// More values...
		},
	}
	resp, err := svc.GetContextKeysForCustomPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetContextKeysForPrincipalPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetContextKeysForPrincipalPolicyInput{
		PolicySourceArn: aws.String("arnType"), // Required
		PolicyInputList: []*string{
			aws.String("policyDocumentType"), // Required
			// More values...
		},
	}
	resp, err := svc.GetContextKeysForPrincipalPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetCredentialReport() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.GetCredentialReportInput
	resp, err := svc.GetCredentialReport(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetGroupInput{
		GroupName: aws.String("groupNameType"), // Required
		Marker:    aws.String("markerType"),
		MaxItems:  aws.Int64(1),
	}
	resp, err := svc.GetGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetGroupPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetGroupPolicyInput{
		GroupName:  aws.String("groupNameType"),  // Required
		PolicyName: aws.String("policyNameType"), // Required
	}
	resp, err := svc.GetGroupPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetInstanceProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetInstanceProfileInput{
		InstanceProfileName: aws.String("instanceProfileNameType"), // Required
	}
	resp, err := svc.GetInstanceProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetLoginProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetLoginProfileInput{
		UserName: aws.String("userNameType"), // Required
	}
	resp, err := svc.GetLoginProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetOpenIDConnectProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetOpenIDConnectProviderInput{
		OpenIDConnectProviderArn: aws.String("arnType"), // Required
	}
	resp, err := svc.GetOpenIDConnectProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetPolicyInput{
		PolicyArn: aws.String("arnType"), // Required
	}
	resp, err := svc.GetPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetPolicyVersion() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetPolicyVersionInput{
		PolicyArn: aws.String("arnType"),             // Required
		VersionId: aws.String("policyVersionIdType"), // Required
	}
	resp, err := svc.GetPolicyVersion(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetRole() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetRoleInput{
		RoleName: aws.String("roleNameType"), // Required
	}
	resp, err := svc.GetRole(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetRolePolicyInput{
		PolicyName: aws.String("policyNameType"), // Required
		RoleName:   aws.String("roleNameType"),   // Required
	}
	resp, err := svc.GetRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetSAMLProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetSAMLProviderInput{
		SAMLProviderArn: aws.String("arnType"), // Required
	}
	resp, err := svc.GetSAMLProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetSSHPublicKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetSSHPublicKeyInput{
		Encoding:       aws.String("encodingType"),    // Required
		SSHPublicKeyId: aws.String("publicKeyIdType"), // Required
		UserName:       aws.String("userNameType"),    // Required
	}
	resp, err := svc.GetSSHPublicKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetServerCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetServerCertificateInput{
		ServerCertificateName: aws.String("serverCertificateNameType"), // Required
	}
	resp, err := svc.GetServerCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetUser() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetUserInput{
		UserName: aws.String("existingUserNameType"),
	}
	resp, err := svc.GetUser(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_GetUserPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.GetUserPolicyInput{
		PolicyName: aws.String("policyNameType"),       // Required
		UserName:   aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.GetUserPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListAccessKeys() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListAccessKeysInput{
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		UserName: aws.String("existingUserNameType"),
	}
	resp, err := svc.ListAccessKeys(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListAccountAliases() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListAccountAliasesInput{
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.ListAccountAliases(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListAttachedGroupPolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListAttachedGroupPoliciesInput{
		GroupName:  aws.String("groupNameType"), // Required
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("policyPathType"),
	}
	resp, err := svc.ListAttachedGroupPolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListAttachedRolePolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListAttachedRolePoliciesInput{
		RoleName:   aws.String("roleNameType"), // Required
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("policyPathType"),
	}
	resp, err := svc.ListAttachedRolePolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListAttachedUserPolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListAttachedUserPoliciesInput{
		UserName:   aws.String("userNameType"), // Required
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("policyPathType"),
	}
	resp, err := svc.ListAttachedUserPolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListEntitiesForPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListEntitiesForPolicyInput{
		PolicyArn:    aws.String("arnType"), // Required
		EntityFilter: aws.String("EntityType"),
		Marker:       aws.String("markerType"),
		MaxItems:     aws.Int64(1),
		PathPrefix:   aws.String("pathType"),
	}
	resp, err := svc.ListEntitiesForPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListGroupPolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListGroupPoliciesInput{
		GroupName: aws.String("groupNameType"), // Required
		Marker:    aws.String("markerType"),
		MaxItems:  aws.Int64(1),
	}
	resp, err := svc.ListGroupPolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListGroups() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListGroupsInput{
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("pathPrefixType"),
	}
	resp, err := svc.ListGroups(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListGroupsForUser() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListGroupsForUserInput{
		UserName: aws.String("existingUserNameType"), // Required
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.ListGroupsForUser(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListInstanceProfiles() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListInstanceProfilesInput{
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("pathPrefixType"),
	}
	resp, err := svc.ListInstanceProfiles(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListInstanceProfilesForRole() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListInstanceProfilesForRoleInput{
		RoleName: aws.String("roleNameType"), // Required
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.ListInstanceProfilesForRole(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListMFADevices() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListMFADevicesInput{
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		UserName: aws.String("existingUserNameType"),
	}
	resp, err := svc.ListMFADevices(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListOpenIDConnectProviders() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.ListOpenIDConnectProvidersInput
	resp, err := svc.ListOpenIDConnectProviders(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListPolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListPoliciesInput{
		Marker:       aws.String("markerType"),
		MaxItems:     aws.Int64(1),
		OnlyAttached: aws.Bool(true),
		PathPrefix:   aws.String("policyPathType"),
		Scope:        aws.String("policyScopeType"),
	}
	resp, err := svc.ListPolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListPolicyVersions() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListPolicyVersionsInput{
		PolicyArn: aws.String("arnType"), // Required
		Marker:    aws.String("markerType"),
		MaxItems:  aws.Int64(1),
	}
	resp, err := svc.ListPolicyVersions(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListRolePolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListRolePoliciesInput{
		RoleName: aws.String("roleNameType"), // Required
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.ListRolePolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListRoles() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListRolesInput{
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("pathPrefixType"),
	}
	resp, err := svc.ListRoles(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListSAMLProviders() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	var params *iam.ListSAMLProvidersInput
	resp, err := svc.ListSAMLProviders(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListSSHPublicKeys() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListSSHPublicKeysInput{
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		UserName: aws.String("userNameType"),
	}
	resp, err := svc.ListSSHPublicKeys(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListServerCertificates() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListServerCertificatesInput{
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("pathPrefixType"),
	}
	resp, err := svc.ListServerCertificates(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListSigningCertificates() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListSigningCertificatesInput{
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		UserName: aws.String("existingUserNameType"),
	}
	resp, err := svc.ListSigningCertificates(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListUserPolicies() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListUserPoliciesInput{
		UserName: aws.String("existingUserNameType"), // Required
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
	}
	resp, err := svc.ListUserPolicies(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListUsers() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListUsersInput{
		Marker:     aws.String("markerType"),
		MaxItems:   aws.Int64(1),
		PathPrefix: aws.String("pathPrefixType"),
	}
	resp, err := svc.ListUsers(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ListVirtualMFADevices() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ListVirtualMFADevicesInput{
		AssignmentStatus: aws.String("assignmentStatusType"),
		Marker:           aws.String("markerType"),
		MaxItems:         aws.Int64(1),
	}
	resp, err := svc.ListVirtualMFADevices(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_PutGroupPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.PutGroupPolicyInput{
		GroupName:      aws.String("groupNameType"),      // Required
		PolicyDocument: aws.String("policyDocumentType"), // Required
		PolicyName:     aws.String("policyNameType"),     // Required
	}
	resp, err := svc.PutGroupPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_PutRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.PutRolePolicyInput{
		PolicyDocument: aws.String("policyDocumentType"), // Required
		PolicyName:     aws.String("policyNameType"),     // Required
		RoleName:       aws.String("roleNameType"),       // Required
	}
	resp, err := svc.PutRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_PutUserPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.PutUserPolicyInput{
		PolicyDocument: aws.String("policyDocumentType"),   // Required
		PolicyName:     aws.String("policyNameType"),       // Required
		UserName:       aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.PutUserPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_RemoveClientIDFromOpenIDConnectProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.RemoveClientIDFromOpenIDConnectProviderInput{
		ClientID:                 aws.String("clientIDType"), // Required
		OpenIDConnectProviderArn: aws.String("arnType"),      // Required
	}
	resp, err := svc.RemoveClientIDFromOpenIDConnectProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_RemoveRoleFromInstanceProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.RemoveRoleFromInstanceProfileInput{
		InstanceProfileName: aws.String("instanceProfileNameType"), // Required
		RoleName:            aws.String("roleNameType"),            // Required
	}
	resp, err := svc.RemoveRoleFromInstanceProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_RemoveUserFromGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.RemoveUserFromGroupInput{
		GroupName: aws.String("groupNameType"),        // Required
		UserName:  aws.String("existingUserNameType"), // Required
	}
	resp, err := svc.RemoveUserFromGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_ResyncMFADevice() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.ResyncMFADeviceInput{
		AuthenticationCode1: aws.String("authenticationCodeType"), // Required
		AuthenticationCode2: aws.String("authenticationCodeType"), // Required
		SerialNumber:        aws.String("serialNumberType"),       // Required
		UserName:            aws.String("existingUserNameType"),   // Required
	}
	resp, err := svc.ResyncMFADevice(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_SetDefaultPolicyVersion() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.SetDefaultPolicyVersionInput{
		PolicyArn: aws.String("arnType"),             // Required
		VersionId: aws.String("policyVersionIdType"), // Required
	}
	resp, err := svc.SetDefaultPolicyVersion(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_SimulateCustomPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.SimulateCustomPolicyInput{
		ActionNames: []*string{ // Required
			aws.String("ActionNameType"), // Required
			// More values...
		},
		PolicyInputList: []*string{ // Required
			aws.String("policyDocumentType"), // Required
			// More values...
		},
		CallerArn: aws.String("ResourceNameType"),
		ContextEntries: []*iam.ContextEntry{
			{ // Required
				ContextKeyName: aws.String("ContextKeyNameType"),
				ContextKeyType: aws.String("ContextKeyTypeEnum"),
				ContextKeyValues: []*string{
					aws.String("ContextKeyValueType"), // Required
					// More values...
				},
			},
			// More values...
		},
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		ResourceArns: []*string{
			aws.String("ResourceNameType"), // Required
			// More values...
		},
		ResourceHandlingOption: aws.String("ResourceHandlingOptionType"),
		ResourceOwner:          aws.String("ResourceNameType"),
		ResourcePolicy:         aws.String("policyDocumentType"),
	}
	resp, err := svc.SimulateCustomPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_SimulatePrincipalPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.SimulatePrincipalPolicyInput{
		ActionNames: []*string{ // Required
			aws.String("ActionNameType"), // Required
			// More values...
		},
		PolicySourceArn: aws.String("arnType"), // Required
		CallerArn:       aws.String("ResourceNameType"),
		ContextEntries: []*iam.ContextEntry{
			{ // Required
				ContextKeyName: aws.String("ContextKeyNameType"),
				ContextKeyType: aws.String("ContextKeyTypeEnum"),
				ContextKeyValues: []*string{
					aws.String("ContextKeyValueType"), // Required
					// More values...
				},
			},
			// More values...
		},
		Marker:   aws.String("markerType"),
		MaxItems: aws.Int64(1),
		PolicyInputList: []*string{
			aws.String("policyDocumentType"), // Required
			// More values...
		},
		ResourceArns: []*string{
			aws.String("ResourceNameType"), // Required
			// More values...
		},
		ResourceHandlingOption: aws.String("ResourceHandlingOptionType"),
		ResourceOwner:          aws.String("ResourceNameType"),
		ResourcePolicy:         aws.String("policyDocumentType"),
	}
	resp, err := svc.SimulatePrincipalPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateAccessKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateAccessKeyInput{
		AccessKeyId: aws.String("accessKeyIdType"), // Required
		Status:      aws.String("statusType"),      // Required
		UserName:    aws.String("existingUserNameType"),
	}
	resp, err := svc.UpdateAccessKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateAccountPasswordPolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateAccountPasswordPolicyInput{
		AllowUsersToChangePassword: aws.Bool(true),
		HardExpiry:                 aws.Bool(true),
		MaxPasswordAge:             aws.Int64(1),
		MinimumPasswordLength:      aws.Int64(1),
		PasswordReusePrevention:    aws.Int64(1),
		RequireLowercaseCharacters: aws.Bool(true),
		RequireNumbers:             aws.Bool(true),
		RequireSymbols:             aws.Bool(true),
		RequireUppercaseCharacters: aws.Bool(true),
	}
	resp, err := svc.UpdateAccountPasswordPolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateAssumeRolePolicy() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateAssumeRolePolicyInput{
		PolicyDocument: aws.String("policyDocumentType"), // Required
		RoleName:       aws.String("roleNameType"),       // Required
	}
	resp, err := svc.UpdateAssumeRolePolicy(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateGroup() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateGroupInput{
		GroupName:    aws.String("groupNameType"), // Required
		NewGroupName: aws.String("groupNameType"),
		NewPath:      aws.String("pathType"),
	}
	resp, err := svc.UpdateGroup(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateLoginProfile() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateLoginProfileInput{
		UserName:              aws.String("userNameType"), // Required
		Password:              aws.String("passwordType"),
		PasswordResetRequired: aws.Bool(true),
	}
	resp, err := svc.UpdateLoginProfile(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateOpenIDConnectProviderThumbprint() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateOpenIDConnectProviderThumbprintInput{
		OpenIDConnectProviderArn: aws.String("arnType"), // Required
		ThumbprintList: []*string{ // Required
			aws.String("thumbprintType"), // Required
			// More values...
		},
	}
	resp, err := svc.UpdateOpenIDConnectProviderThumbprint(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateSAMLProvider() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateSAMLProviderInput{
		SAMLMetadataDocument: aws.String("SAMLMetadataDocumentType"), // Required
		SAMLProviderArn:      aws.String("arnType"),                  // Required
	}
	resp, err := svc.UpdateSAMLProvider(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateSSHPublicKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateSSHPublicKeyInput{
		SSHPublicKeyId: aws.String("publicKeyIdType"), // Required
		Status:         aws.String("statusType"),      // Required
		UserName:       aws.String("userNameType"),    // Required
	}
	resp, err := svc.UpdateSSHPublicKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateServerCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateServerCertificateInput{
		ServerCertificateName:    aws.String("serverCertificateNameType"), // Required
		NewPath:                  aws.String("pathType"),
		NewServerCertificateName: aws.String("serverCertificateNameType"),
	}
	resp, err := svc.UpdateServerCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateSigningCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateSigningCertificateInput{
		CertificateId: aws.String("certificateIdType"), // Required
		Status:        aws.String("statusType"),        // Required
		UserName:      aws.String("existingUserNameType"),
	}
	resp, err := svc.UpdateSigningCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UpdateUser() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UpdateUserInput{
		UserName:    aws.String("existingUserNameType"), // Required
		NewPath:     aws.String("pathType"),
		NewUserName: aws.String("userNameType"),
	}
	resp, err := svc.UpdateUser(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UploadSSHPublicKey() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UploadSSHPublicKeyInput{
		SSHPublicKeyBody: aws.String("publicKeyMaterialType"), // Required
		UserName:         aws.String("userNameType"),          // Required
	}
	resp, err := svc.UploadSSHPublicKey(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UploadServerCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UploadServerCertificateInput{
		CertificateBody:       aws.String("certificateBodyType"),       // Required
		PrivateKey:            aws.String("privateKeyType"),            // Required
		ServerCertificateName: aws.String("serverCertificateNameType"), // Required
		CertificateChain:      aws.String("certificateChainType"),
		Path:                  aws.String("pathType"),
	}
	resp, err := svc.UploadServerCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}

func ExampleIAM_UploadSigningCertificate() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := iam.New(sess)

	params := &iam.UploadSigningCertificateInput{
		CertificateBody: aws.String("certificateBodyType"), // Required
		UserName:        aws.String("existingUserNameType"),
	}
	resp, err := svc.UploadSigningCertificate(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
