-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP: S3 Express Basics scenario #6975
base: main
Are you sure you want to change the base?
Conversation
583aef3
to
ec27158
Compare
ec27158
to
167e547
Compare
167e547
to
e9d24b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions about the EC2 file; the S3 content looks great.
/* Inline declaration example | ||
// snippet-start:[php.example_code.ec2.basics.createClient] | ||
$ec2Client = new Ec2Client(['region' => 'us-west-2', 'version' => 'latest', 'profile' => 'default']); | ||
// snippet-end:[php.example_code.ec2.basics.createClient] | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
public function createVpc($cidr) | ||
{ | ||
$result = $this->ec2Client->createVpc([ | ||
"CidrBlock" => $cidr, | ||
]); | ||
return $result['Vpc']; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we handle exceptions here?
public function deleteVpc(mixed $vpcId) | ||
{ | ||
$result = $this->ec2Client->deleteVpc([ | ||
"VpcId" => $vpcId, | ||
]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we handle exceptions here?
public function deleteVpcEndpoint(mixed $vpcEndpointId) | ||
{ | ||
$result = $this->ec2Client->deleteVpcEndpoints([ | ||
"VpcEndpointIds" => [$vpcEndpointId], | ||
]); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we handle exceptions here?
public function createVpcEndpoint(string $serviceName, string $vpcId, array $routeTableIds): array | ||
{ | ||
$result = $this->ec2Client->createVpcEndpoint([ | ||
'ServiceName' => $serviceName, | ||
'VpcId' => $vpcId, | ||
'RouteTableIds' => $routeTableIds, | ||
]); | ||
|
||
return $result["VpcEndpoint"]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we handle exceptions here?
@@ -0,0 +1,137 @@ | |||
<?php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there tests for this file?
<!-- <testsuites>--> | ||
<!-- <testsuite name="kms-basics">--> | ||
<!-- <file>kms/tests/KmsBasicsTests.php</file>--> | ||
<!-- </testsuite>--> | ||
<!-- <testsuite name="s3-express-basics">--> | ||
<!-- <file>s3/tests/S3ExpressBasicsTest.php</file>--> | ||
<!-- </testsuite>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete?
This pull request submits the Scout for S3 Express Basics scenario using AWS SDK for PHP v3.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.