Class CloudFrontClient
- Aws\AwsClient implements Aws\AwsClientInterface uses Aws\AwsClientTrait
-
Aws\CloudFront\CloudFrontClient
- Namespace: Aws\CloudFront
- Located at CloudFront/CloudFrontClient.php
This client is used to interact with the Amazon CloudFront service.
Supported API Versions
This class uses a service description model that is associated at
runtime based on the version
option given when constructing the
client. The version
option will determine which API operations,
waiters, and paginators are available for a client. Creating a command or a
specific API operation can be done using magic methods (e.g.,
$client->commandName(/** parameters */)
, or using the
$\client->getCommand
method of the client.
Methods Summary
-
getSignedUrl ( array $options )
Create a signed Amazon CloudFront URL.
-
getSignedCookie ( array $options )
Create a signed Amazon CloudFront cookie.
Methods inherited from Aws\AwsClient
__construct()
,
__sleep()
,
applyDocFilters()
,
emitDeprecationWarning()
,
factory()
,
getApi()
,
getArguments()
,
getClientBuiltIns()
,
getClientContextParams()
,
getCommand()
,
getConfig()
,
getCredentials()
,
getEndpoint()
,
getEndpointProvider()
,
getEndpointProviderArgs()
,
getHandlerList()
,
getRegion()
,
getSignatureProvider()
Methods inherited from Aws\AwsClientInterface
Methods used from Aws\AwsClientTrait
Methods Details
string getSignedUrl ( array $options )
Create a signed Amazon CloudFront URL.
This method accepts an array of configuration options:
- url: (string) URL of the resource being signed (can include query string and wildcards). For example: rtmp://s5c39gqb8ow64r.cloudfront.net/videos/mp3_name.mp3 http://d111111abcdef8.cloudfront.net/images/horizon.jpg?size=large&license=yes
- policy: (string) JSON policy. Use this option when creating a signed URL for a custom policy.
- expires: (int) UTC Unix timestamp used when signing with a canned policy. Not required when passing a custom 'policy' option.
- key_pair_id: (string) The ID of the key pair used to sign CloudFront URLs for private distributions.
- private_key: (string) The filepath to the private key used to sign CloudFront URLs for private distributions.
Parameters
array | $options | Array of configuration options used when signing |
Returns
string Signed URL with authentication parameters |
Exceptions
InvalidArgumentException if url, key_pair_id, or private_key were not specified. |
Link
array getSignedCookie ( array $options )
Create a signed Amazon CloudFront cookie.
This method accepts an array of configuration options:
- url: (string) URL of the resource being signed (can include query string and wildcards). For example: http://d111111abcdef8.cloudfront.net/images/horizon.jpg?size=large&license=yes
- policy: (string) JSON policy. Use this option when creating a signed URL for a custom policy.
- expires: (int) UTC Unix timestamp used when signing with a canned policy. Not required when passing a custom 'policy' option.
- key_pair_id: (string) The ID of the key pair used to sign CloudFront URLs for private distributions.
- private_key: (string) The filepath ot the private key used to sign CloudFront URLs for private distributions.
Parameters
array | $options | Array of configuration options used when signing |
Returns
array Key => value pairs of signed cookies to set |
Exceptions
InvalidArgumentException if url, key_pair_id, or private_key were not specified. |