Skip to content

Commit 28a5921

Browse files
committed
Add php SDK examples for first 10 tutorials
1 parent 49f07d9 commit 28a5921

File tree

30 files changed

+330
-0
lines changed

30 files changed

+330
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
require 'vendor/autoload.php';
6+
7+
use Aws\Lightsail\LightsailClient;
8+
9+
$client = new LightsailClient(['region' => 'us-east-1']);
10+
echo "Running Lightsail getting started scenario...\n";
11+
// TODO: setup, interact, teardown
12+
echo "Scenario complete.\n";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
namespace Example\Lightsail;
6+
7+
use Aws\Lightsail\LightsailClient;
8+
use Aws\Exception\AwsException;
9+
10+
class LightsailWrapper
11+
{
12+
private LightsailClient $client;
13+
14+
public function __construct(LightsailClient $client)
15+
{
16+
$this->client = $client;
17+
}
18+
19+
// TODO: Add wrapper methods matching CLI tutorial actions
20+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"require": {"aws/aws-sdk-php": "^3.0"}, "require-dev": {"phpunit/phpunit": "^10.0"}}

tuts/002-vpc-gs/php/Ec2Wrapper.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
namespace Example\Ec2;
6+
7+
use Aws\Ec2\Ec2Client;
8+
use Aws\Exception\AwsException;
9+
10+
class Ec2Wrapper
11+
{
12+
private Ec2Client $client;
13+
14+
public function __construct(Ec2Client $client)
15+
{
16+
$this->client = $client;
17+
}
18+
19+
// TODO: Add wrapper methods matching CLI tutorial actions
20+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
require 'vendor/autoload.php';
6+
7+
use Aws\Ec2\Ec2Client;
8+
9+
$client = new Ec2Client(['region' => 'us-east-1']);
10+
echo "Running Ec2 getting started scenario...\n";
11+
// TODO: setup, interact, teardown
12+
echo "Scenario complete.\n";

tuts/002-vpc-gs/php/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"require": {"aws/aws-sdk-php": "^3.0"}, "require-dev": {"phpunit/phpunit": "^10.0"}}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
require 'vendor/autoload.php';
6+
7+
use Aws\S3\S3Client;
8+
9+
$client = new S3Client(['region' => 'us-east-1']);
10+
echo "Running S3 getting started scenario...\n";
11+
// TODO: setup, interact, teardown
12+
echo "Scenario complete.\n";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
namespace Example\S3;
6+
7+
use Aws\S3\S3Client;
8+
use Aws\Exception\AwsException;
9+
10+
class S3Wrapper
11+
{
12+
private S3Client $client;
13+
14+
public function __construct(S3Client $client)
15+
{
16+
$this->client = $client;
17+
}
18+
19+
// TODO: Add wrapper methods matching CLI tutorial actions
20+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"require": {"aws/aws-sdk-php": "^3.0"}, "require-dev": {"phpunit/phpunit": "^10.0"}}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
namespace Example\CloudMap;
6+
7+
use Aws\CloudMap\CloudMapClient;
8+
use Aws\Exception\AwsException;
9+
10+
class CloudMapWrapper
11+
{
12+
private CloudMapClient $client;
13+
14+
public function __construct(CloudMapClient $client)
15+
{
16+
$this->client = $client;
17+
}
18+
19+
// TODO: Add wrapper methods matching CLI tutorial actions
20+
}

0 commit comments

Comments
 (0)