Skip to content

Commit

Permalink
Merge pull request #1 from beckandros/5x5-edit
Browse files Browse the repository at this point in the history
Added copyright and metadata block to examples
  • Loading branch information
David Huntsperger authored Jun 9, 2017
2 parents 9fc7aa9 + 5ffcd54 commit e5541f7
Show file tree
Hide file tree
Showing 31 changed files with 426 additions and 16 deletions.
16 changes: 15 additions & 1 deletion docs/examples/cw-examples-getting-metrics.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
======================================
Getting Metrics from Amazon CloudWatch
======================================

.. meta::
:description: List Amazon CloudWatch metrics, retrieve alarms for metrics, and get metric statistics.
:keywords: Amazon Cloudwatch, AWS SDK for PHP examples

Metrics are data about the performance of your systems. You can enable detailed monitoring of some resources, such as your Amazon EC2 instances, or your own application metrics.

The examples below show how to:
Expand Down Expand Up @@ -47,7 +61,7 @@ Retrieve Alarms for a Metric
require 'vendor/autoload.php';
use Aws\CloudWatch\CloudWatchClient;
use Aws\Exception\AwsException;
$client = new CloudWatchClient([
'profile' => 'default',
'region' => 'us-west-2',
Expand Down
22 changes: 18 additions & 4 deletions docs/examples/cw-examples-publishing-custom-metrics.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
=======================================
Publishing Custom Metrics in CloudWatch
=======================================
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
==============================================
Publishing Custom Metrics in Amazon CloudWatch
==============================================

.. meta::
:description: Publish metric data and create alarms for Amazon CloudWatch.
:keywords: Amazon CloudWatch, AWS SDK for PHP examples

Metrics are data about the performance of your systems. An alarm watches a single metric over a time period you specify, and performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods.

Expand Down Expand Up @@ -57,7 +71,7 @@ Create an Alarm
require 'vendor/autoload.php';
use Aws\CloudWatch\CloudWatchClient;
use Aws\Exception\AwsException;
$client = new CloudWatchClient([
'profile' => 'default',
'region' => 'us-west-2',
Expand Down
22 changes: 18 additions & 4 deletions docs/examples/cw-examples-sending-events.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
===================================
Sending Events to CloudWatch Events
===================================
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
==========================================
Sending Events to Amazon CloudWatch Events
==========================================

.. meta::
:description: Create rules and add targets to them, and send custom events to CloudWatch Events.
:keywords: Amazon Cloudwatch, AWS SDK for PHP examples

CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources to any of various targets. Using simple rules, you can match events and route them to one or more target functions or streams.

Expand Down Expand Up @@ -52,7 +66,7 @@ Add Targets to a Rule
require 'vendor/autoload.php';
use Aws\CloudWatchEvents\CloudWatchEventsClient;
use Aws\Exception\AwsException;
$client = new CloudWatchEventsClient([
'profile' => 'default',
'region' => 'us-west-2',
Expand Down
20 changes: 17 additions & 3 deletions docs/examples/cw-examples-using-alarm-actions.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
==============================
Working with CloudWatch Alarms
==============================
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=================================================
Using Alarm Actions with Amazon CloudWatch Alarms
=================================================

.. meta::
:description: Create CloudWatch alarms that automatically stop, terminate, reboot, or recover EC2 instances.
:keywords: Amazon Cloudwatch, AWS SDK for PHP examples

Using alarm actions, you can create alarms that automatically stop, terminate, reboot, or recover your Amazon EC2 instances. You can use the stop or terminate actions when you no longer need an instance to be running. You can use the reboot and recover actions to automatically reboot those instances.

Expand Down
14 changes: 14 additions & 0 deletions docs/examples/cw-examples-work-with-alarms.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=====================================
Working with Amazon CloudWatch Alarms
=====================================

.. meta::
:description: Create CloudWatch alarms that automatically stop, terminate, reboot, or recover EC2 instances.
:keywords: Amazon CloudWatch, AWS SDK for PHP examples

An Amazon CloudWatch alarm watches a single metric over a time period you specify, and performs one or more actions based on the value of the metric relative to a given threshold over a number of time periods.

The examples below show how to:
Expand Down
10 changes: 10 additions & 0 deletions docs/examples/cw-examples.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=================
Amazon CloudWatch
=================
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/ec2-examples-managing-instances.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=============================
Managing Amazon EC2 Instances
=============================

.. meta::
:description:
:keywords: Amazon EC2, AWS SDK for PHP examples

The examples below show how to:

* Describe EC2 instances using `DescribeInstances <http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-ec2-2016-11-15.html#describeinstances>`_.
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/ec2-examples-using-elastic-ip-addresses.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
==========================================
Using Elastic IP Addresses with Amazon EC2
==========================================

.. meta::
:description: Describe Amazon EC2 instances and acquire, associate, and release Elastic IP addresses.
:keywords: Amazon EC2, AWS SDK for PHP examples

An Elastic IP address is a static IP address designed for dynamic cloud computing. An Elastic IP address is associated with your AWS account. It is a public IP address, which is reachable from the Internet. If your instance does not have a public IP address, you can associate an Elastic IP address with your instance to enable communication with the Internet.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/ec2-examples-using-regions-and-zones.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
====================================
Using Regions and Availability Zones
====================================

.. meta::
:description: Describe AWS Regions and Availability Zones for Amazon EC2.
:keywords: Amazon EC2, AWS SDK for PHP examples

Amazon EC2 is hosted in multiple locations worldwide. These locations are composed of regions and Availability Zones. Each region is a separate geographic area. Each region has multiple, isolated locations known as Availability Zones. Amazon EC2 provides the ability to place instances and data in multiple locations.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/ec2-examples-using-security-groups.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
============================
Working with Security Groups
============================

.. meta::
:description: Create, describe, and delete security groups for Amazon EC2.
:keywords: Amazon EC2, AWS SDK for PHP examples

An Amazon EC2 security group acts as a virtual firewall that controls the traffic for one or more instances. You add rules to each security group to allow traffic to or from its associated instances. You can modify the rules for a security group at any time; the new rules are automatically applied to all instances that are associated with the security group.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/ec2-examples-working-with-key-pairs.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=================================
Working with Amazon EC2 Key Pairs
=================================

.. meta::
:description: Create and delete key pairs for Amazon EC2.
:keywords: Amazon EC2, AWS SDK for PHP examples

Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt data; then the recipient uses the private key to decrypt the data. The public and private keys are known as a key pair.

The examples below show how to:
Expand Down
12 changes: 11 additions & 1 deletion docs/examples/ec2-examples.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
==========
Amazon EC2
==========

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides virtual server hosting in the cloud. It's designed to make web-scale cloud computing easier for developers by providing resizeable compute capacity.
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides virtual server hosting in the cloud. It's designed to make web-scale cloud computing easier for developers by providing resizeable compute capacity.

.. toctree::
:maxdepth: 1
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/iam-examples-managing-access-keys.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
========================
Managing IAM Access Keys
========================

.. meta::
:description: Create, delete, and get information about IAM access keys.
:keywords: AWS Identity and Access Management, AWS SDK for PHP examples

Users need their own access keys to make programmatic calls to AWS. To fill this need, you can create, modify, view, or rotate access keys (access key IDs and secret access keys) for IAM users. By default, when you create an access key, its status is Active, which means the user can use the access key for API calls.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/iam-examples-managing-users.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
==================
Managing IAM Users
==================

.. meta::
:description: Create, list, update, or retrieve info about IAM users.
:keywords: AWS Identity and Access Management, AWS SDK for PHP examples

An IAM user is an entity that you create in AWS to represent the person or service that uses it to interact with AWS. A user in AWS consists of a name and credentials.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/iam-examples-using-account-aliases.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
=========================
Using IAM Account Aliases
=========================

.. meta::
:description: Create, list, and delete aliases for AWS accout IDs using IAM.
:keywords: AWS Identity and Access Management, AWS SDK for PHP examples

If you want the URL for your sign-in page to contain your company name or other friendly identifier instead of your AWS account ID, you can create an alias for your AWS account ID. If you create an AWS account alias, your sign-in page URL changes to incorporate the alias.

The examples below show how to:
Expand Down
14 changes: 14 additions & 0 deletions docs/examples/iam-examples-working-with-certs.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
.. Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License (the "License"). You may not use this file except in compliance with the
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/.
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific language governing permissions and
limitations under the License.
====================================
Working with IAM Server Certificates
====================================

.. meta::
:description: List, update, and get information about certificates using IAM.
:keywords: AWS Identity and Access Management, AWS SDK for PHP examples

To enable HTTPS connections to your website or application on AWS, you need an SSL/TLS server certificate. To use a certificate that you obtained from an external provider with your website or application on AWS, you must upload the certificate to IAM or import it into AWS Certificate Manager.

The examples below show how to:
Expand Down
Loading

0 comments on commit e5541f7

Please sign in to comment.