Skip to content

Commit

Permalink
[CloudFront] Added docs (async-aws#676)
Browse files Browse the repository at this point in the history
* [CloudFront] Added docs

* Added link
  • Loading branch information
Nyholm authored Jun 6, 2020
1 parent 9844a9e commit 1f6a617
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
3 changes: 3 additions & 0 deletions couscous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ menu:
cf:
text: Cloud Formation
url: /clients/cf.html
cloud-front:
text: CloudFront
url: /clients/cloud-front.html
cloud-watch-logs:
text: Cloud Watch Log
url: /clients/cloud-watch-logs.html
Expand Down
30 changes: 30 additions & 0 deletions docs/clients/cloud-front.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
layout: client
category: clients
name: CloudFront
package: async-aws/cloud-front
---

## Usage

### Invalidate paths

```php
use AsyncAws\CloudFront\CloudFrontClient;
use AsyncAws\CloudFront\ValueObject\InvalidationBatch;
use AsyncAws\CloudFront\ValueObject\Paths;

$cloudFront = new CloudFrontClient();

$paths = ['/assets/images/cat.jpg', '/image/*'];
$cloudFront->createInvalidation([
'DistributionId' => 'EQ44GEF5FAALL',
'InvalidationBatch' => new InvalidationBatch([
'Paths' => new Paths([
'Quantity' => count($paths),
'Items' => $paths,
]),
'CallerReference' => time(),
]),
]);
```
2 changes: 1 addition & 1 deletion docs/clients/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ for more information.
| Api Client | Package name
|---------------------------------------------|-------------
| [CloudFormation](./cf.md) | [async-aws/cloud-formation](https://packagist.org/packages/async-aws/cloud-formation)
| CloudFront | [async-aws/cloud-front](https://packagist.org/packages/async-aws/cloud-front)
| [CloudFront](./cloud-front.md) | [async-aws/cloud-front](https://packagist.org/packages/async-aws/cloud-front)
| [CloudWatchLogs](./cloud-watch-logs.md) | [async-aws/cloud-watch-logs](https://packagist.org/packages/async-aws/cloud-watch-logs)
| CodeDeploy | [async-aws/code-deploy](https://packagist.org/packages/async-aws/code-deploy)
| [CognitoIdentityProvider](./cognito-idp.md) | [async-aws/cognito-identity-provider](https://packagist.org/packages/async-aws/cognito-identity-provider)
Expand Down

0 comments on commit 1f6a617

Please sign in to comment.