NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class InstanceProfileCredentialsException

Exception thrown when an error occurs with instance profile credentials

  Exception
  RuntimeException
  Aws\Common\Exception\RuntimeException implements Aws\Common\Exception\AwsExceptionInterface
  Aws\Common\Exception\InstanceProfileCredentialsException

Namespace: Aws\Common\Exception
Located at Aws/Common/Exception/InstanceProfileCredentialsException.php

## Methods summary

- `public` `setStatusCode ( string $code )`

  Set the error response code received from the instance metadata

- `public` `getStatusCode ( )`

  Get the error response code from the service

## Methods detail

# `public`
`setStatusCode( string $code )`

Set the error response code received from the instance metadata

#### Parameters

$code
  `string`
  $code Response code

# `public string|null`
`getStatusCode( )`

Get the error response code from the service

#### Returns

`string|null`

### Methods inherited from Exception

`__construct()`, `__toString()`, `__wakeup()`, `getCode()`, `getFile()`, `getLine()`, `getMessage()`, `getPrevious()`, `getTrace()`, `getTraceAsString()`

### Magic methods summary

## Properties summary

`protected string` | $statusCode | #

### Properties inherited from Exception

`$code`, `$file`, `$line`, `$message`