Interface CredentialsInterface
Provides access to the AWS credentials used for accessing AWS services: AWS access key ID, secret access key, and security token. These credentials are used to securely sign requests to AWS services.
- Aws\Common\Credentials\CredentialsInterface implements Serializable
Direct known implementers
Aws\Common\Credentials\AbstractCredentialsDecorator
,
Aws\Common\Credentials\Credentials
,
Aws\Common\Credentials\NullCredentials
Indirect known implementers
Aws\Common\Credentials\AbstractRefreshableCredentials
,
Aws\Common\Credentials\CacheableCredentials
,
Aws\Common\Credentials\RefreshableInstanceProfileCredentials
Methods summary
-
public
getAccessKeyId ( )
Returns the AWS access key ID for this credentials object.
-
public
getSecretKey ( )
Returns the AWS secret access key for this credentials object.
-
public
getSecurityToken ( )
Get the associated security token if available
-
public
getExpiration ( )
Get the UNIX timestamp in which the credentials will expire
-
public
setAccessKeyId ( string $key )
Set the AWS access key ID for this credentials object.
-
public
setSecretKey ( string $secret )
Set the AWS secret access key for this credentials object.
-
public
setSecurityToken ( string $token )
Set the security token to use with this credentials object
-
public
setExpiration ( int $timestamp )
Set the UNIX timestamp in which the credentials will expire
-
public
isExpired ( )
Check if the credentials are expired
Methods detail
Returns the AWS access key ID for this credentials object.
Returns
string
Returns the AWS secret access key for this credentials object.
Returns
string
Get the associated security token if available
Returns
string|null
Get the UNIX timestamp in which the credentials will expire
Returns
integer|null
Set the AWS access key ID for this credentials object.
Parameters
- $key
string
$key AWS access key ID
Returns
Set the AWS secret access key for this credentials object.
Parameters
- $secret
string
$secret AWS secret access key
Returns
Set the security token to use with this credentials object
Parameters
- $token
string
$token Security token
Returns
Set the UNIX timestamp in which the credentials will expire
Parameters
- $timestamp
integer
$timestamp UNIX timestamp expiration
Returns
Check if the credentials are expired
Returns
boolean