MDL-80639 libs: upgrade AWS SDK for PHP to 3.318.0
Signed-off-by: Daniel Ziegenberg <[email protected]>
This commit is contained in:
+13
-8
@@ -12,20 +12,25 @@ get started in minutes by [installing the SDK through Composer][docs-installatio
|
||||
or by downloading a single zip or phar file from our [latest release][latest-release].
|
||||
|
||||
Jump To:
|
||||
* [Getting Started](#Getting-Started)
|
||||
* [Quick Examples](#Quick-Examples)
|
||||
* [Getting Help](#Getting-Help)
|
||||
* [Features](#Features)
|
||||
* [Contributing](#Contributing)
|
||||
* [More Resources](#Resources)
|
||||
* [Related AWS Projects](#Related-AWS-Projects)
|
||||
- [AWS SDK for PHP - Version 3](#aws-sdk-for-php---version-3)
|
||||
- [Getting Started](#getting-started)
|
||||
- [Quick Examples](#quick-examples)
|
||||
- [Create an Amazon S3 client](#create-an-amazon-s3-client)
|
||||
- [Upload a file to Amazon S3](#upload-a-file-to-amazon-s3)
|
||||
- [Getting Help](#getting-help)
|
||||
- [Maintenance and support for SDK major versions](#maintenance-and-support-for-sdk-major-versions)
|
||||
- [Opening Issues](#opening-issues)
|
||||
- [Features](#features)
|
||||
- [Contributing](#contributing)
|
||||
- [Resources](#resources)
|
||||
- [Related AWS Projects](#related-aws-projects)
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. **Sign up for AWS** – Before you begin, you need to
|
||||
sign up for an AWS account and retrieve your [AWS credentials][docs-signup].
|
||||
2. **Minimum requirements** – To run the SDK, your system will need to meet the
|
||||
[minimum requirements][docs-requirements], including having **PHP >= 5.5**.
|
||||
[minimum requirements][docs-requirements], including having **PHP >= 7.2.5**.
|
||||
We highly recommend having it compiled with the cURL extension and cURL
|
||||
7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
|
||||
3. **Install the SDK** – Using [Composer] is the recommended way to install the
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
The AWS SDK for PHP includes the following third-party software/licensing:
|
||||
|
||||
|
||||
** Guzzle - https://github.com/guzzle/guzzle
|
||||
|
||||
Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
----------------
|
||||
|
||||
** jmespath.php - https://github.com/mtdowling/jmespath.php
|
||||
|
||||
Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
----------------
|
||||
|
||||
** phpunit-mock-objects -- https://github.com/sebastianbergmann/phpunit-mock-objects
|
||||
|
||||
Copyright (c) 2002-2018, Sebastian Bergmann <[email protected]>.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of Sebastian Bergmann nor the names of his
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -7,14 +7,28 @@ use Aws\AwsClient;
|
||||
* This client is used to interact with the **AWS ARC - Zonal Shift** service.
|
||||
* @method \Aws\Result cancelZonalShift(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise cancelZonalShiftAsync(array $args = [])
|
||||
* @method \Aws\Result createPracticeRunConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPracticeRunConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deletePracticeRunConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePracticeRunConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getAutoshiftObserverNotificationStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAutoshiftObserverNotificationStatusAsync(array $args = [])
|
||||
* @method \Aws\Result getManagedResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getManagedResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listAutoshifts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAutoshiftsAsync(array $args = [])
|
||||
* @method \Aws\Result listManagedResources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listManagedResourcesAsync(array $args = [])
|
||||
* @method \Aws\Result listZonalShifts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listZonalShiftsAsync(array $args = [])
|
||||
* @method \Aws\Result startZonalShift(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startZonalShiftAsync(array $args = [])
|
||||
* @method \Aws\Result updateAutoshiftObserverNotificationStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAutoshiftObserverNotificationStatusAsync(array $args = [])
|
||||
* @method \Aws\Result updatePracticeRunConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePracticeRunConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateZonalAutoshiftConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateZonalAutoshiftConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateZonalShift(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateZonalShiftAsync(array $args = [])
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise applyArchiveRuleAsync(array $args = [])
|
||||
* @method \Aws\Result cancelPolicyGeneration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise cancelPolicyGenerationAsync(array $args = [])
|
||||
* @method \Aws\Result checkAccessNotGranted(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise checkAccessNotGrantedAsync(array $args = [])
|
||||
* @method \Aws\Result checkNoNewAccess(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise checkNoNewAccessAsync(array $args = [])
|
||||
* @method \Aws\Result checkNoPublicAccess(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise checkNoPublicAccessAsync(array $args = [])
|
||||
* @method \Aws\Result createAccessPreview(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAccessPreviewAsync(array $args = [])
|
||||
* @method \Aws\Result createAnalyzer(array $args = [])
|
||||
@@ -19,6 +25,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
|
||||
* @method \Aws\Result deleteArchiveRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
|
||||
* @method \Aws\Result generateFindingRecommendation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise generateFindingRecommendationAsync(array $args = [])
|
||||
* @method \Aws\Result getAccessPreview(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAccessPreviewAsync(array $args = [])
|
||||
* @method \Aws\Result getAnalyzedResource(array $args = [])
|
||||
@@ -29,6 +37,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getArchiveRuleAsync(array $args = [])
|
||||
* @method \Aws\Result getFinding(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFindingAsync(array $args = [])
|
||||
* @method \Aws\Result getFindingRecommendation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFindingRecommendationAsync(array $args = [])
|
||||
* @method \Aws\Result getFindingV2(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFindingV2Async(array $args = [])
|
||||
* @method \Aws\Result getGeneratedPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGeneratedPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result listAccessPreviewFindings(array $args = [])
|
||||
@@ -43,6 +55,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listArchiveRulesAsync(array $args = [])
|
||||
* @method \Aws\Result listFindings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFindingsAsync(array $args = [])
|
||||
* @method \Aws\Result listFindingsV2(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFindingsV2Async(array $args = [])
|
||||
* @method \Aws\Result listPolicyGenerations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
|
||||
@@ -5,6 +5,8 @@ use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Account** service.
|
||||
* @method \Aws\Result acceptPrimaryEmailUpdate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise acceptPrimaryEmailUpdateAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAlternateContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAlternateContactAsync(array $args = [])
|
||||
* @method \Aws\Result disableRegion(array $args = [])
|
||||
@@ -15,6 +17,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getAlternateContactAsync(array $args = [])
|
||||
* @method \Aws\Result getContactInformation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getContactInformationAsync(array $args = [])
|
||||
* @method \Aws\Result getPrimaryEmail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPrimaryEmailAsync(array $args = [])
|
||||
* @method \Aws\Result getRegionOptStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRegionOptStatusAsync(array $args = [])
|
||||
* @method \Aws\Result listRegions(array $args = [])
|
||||
@@ -23,5 +27,7 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise putAlternateContactAsync(array $args = [])
|
||||
* @method \Aws\Result putContactInformation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putContactInformationAsync(array $args = [])
|
||||
* @method \Aws\Result startPrimaryEmailUpdate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startPrimaryEmailUpdateAsync(array $args = [])
|
||||
*/
|
||||
class AccountClient extends AwsClient {}
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
<?php
|
||||
namespace Aws\AlexaForBusiness;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Alexa For Business** service.
|
||||
* @method \Aws\Result approveSkill(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise approveSkillAsync(array $args = [])
|
||||
* @method \Aws\Result associateContactWithAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateContactWithAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result associateDeviceWithNetworkProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateDeviceWithNetworkProfileAsync(array $args = [])
|
||||
* @method \Aws\Result associateDeviceWithRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateDeviceWithRoomAsync(array $args = [])
|
||||
* @method \Aws\Result associateSkillGroupWithRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateSkillGroupWithRoomAsync(array $args = [])
|
||||
* @method \Aws\Result associateSkillWithSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateSkillWithSkillGroupAsync(array $args = [])
|
||||
* @method \Aws\Result associateSkillWithUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateSkillWithUsersAsync(array $args = [])
|
||||
* @method \Aws\Result createAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result createBusinessReportSchedule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createBusinessReportScheduleAsync(array $args = [])
|
||||
* @method \Aws\Result createConferenceProvider(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConferenceProviderAsync(array $args = [])
|
||||
* @method \Aws\Result createContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createContactAsync(array $args = [])
|
||||
* @method \Aws\Result createGatewayGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createGatewayGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createNetworkProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createNetworkProfileAsync(array $args = [])
|
||||
* @method \Aws\Result createProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
|
||||
* @method \Aws\Result createRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRoomAsync(array $args = [])
|
||||
* @method \Aws\Result createSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createSkillGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createUser(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result deleteBusinessReportSchedule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteBusinessReportScheduleAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConferenceProvider(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConferenceProviderAsync(array $args = [])
|
||||
* @method \Aws\Result deleteContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteContactAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDevice(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeviceAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDeviceUsageData(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeviceUsageDataAsync(array $args = [])
|
||||
* @method \Aws\Result deleteGatewayGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteGatewayGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deleteNetworkProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteNetworkProfileAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRoomAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRoomSkillParameter(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRoomSkillParameterAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSkillAuthorization(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSkillAuthorizationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSkillGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deleteUser(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateContactFromAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateContactFromAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateDeviceFromRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateDeviceFromRoomAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateSkillFromSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateSkillFromSkillGroupAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateSkillFromUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateSkillFromUsersAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateSkillGroupFromRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateSkillGroupFromRoomAsync(array $args = [])
|
||||
* @method \Aws\Result forgetSmartHomeAppliances(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise forgetSmartHomeAppliancesAsync(array $args = [])
|
||||
* @method \Aws\Result getAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result getConferencePreference(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConferencePreferenceAsync(array $args = [])
|
||||
* @method \Aws\Result getConferenceProvider(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConferenceProviderAsync(array $args = [])
|
||||
* @method \Aws\Result getContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getContactAsync(array $args = [])
|
||||
* @method \Aws\Result getDevice(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDeviceAsync(array $args = [])
|
||||
* @method \Aws\Result getGateway(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGatewayAsync(array $args = [])
|
||||
* @method \Aws\Result getGatewayGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGatewayGroupAsync(array $args = [])
|
||||
* @method \Aws\Result getInvitationConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getInvitationConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getNetworkProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getNetworkProfileAsync(array $args = [])
|
||||
* @method \Aws\Result getProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProfileAsync(array $args = [])
|
||||
* @method \Aws\Result getRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRoomAsync(array $args = [])
|
||||
* @method \Aws\Result getRoomSkillParameter(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRoomSkillParameterAsync(array $args = [])
|
||||
* @method \Aws\Result getSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSkillGroupAsync(array $args = [])
|
||||
* @method \Aws\Result listBusinessReportSchedules(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBusinessReportSchedulesAsync(array $args = [])
|
||||
* @method \Aws\Result listConferenceProviders(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConferenceProvidersAsync(array $args = [])
|
||||
* @method \Aws\Result listDeviceEvents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listDeviceEventsAsync(array $args = [])
|
||||
* @method \Aws\Result listGatewayGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listGatewayGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listGateways(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listGatewaysAsync(array $args = [])
|
||||
* @method \Aws\Result listSkills(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSkillsAsync(array $args = [])
|
||||
* @method \Aws\Result listSkillsStoreCategories(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSkillsStoreCategoriesAsync(array $args = [])
|
||||
* @method \Aws\Result listSkillsStoreSkillsByCategory(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSkillsStoreSkillsByCategoryAsync(array $args = [])
|
||||
* @method \Aws\Result listSmartHomeAppliances(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSmartHomeAppliancesAsync(array $args = [])
|
||||
* @method \Aws\Result listTags(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
|
||||
* @method \Aws\Result putConferencePreference(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putConferencePreferenceAsync(array $args = [])
|
||||
* @method \Aws\Result putInvitationConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putInvitationConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result putRoomSkillParameter(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putRoomSkillParameterAsync(array $args = [])
|
||||
* @method \Aws\Result putSkillAuthorization(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putSkillAuthorizationAsync(array $args = [])
|
||||
* @method \Aws\Result registerAVSDevice(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise registerAVSDeviceAsync(array $args = [])
|
||||
* @method \Aws\Result rejectSkill(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise rejectSkillAsync(array $args = [])
|
||||
* @method \Aws\Result resolveRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise resolveRoomAsync(array $args = [])
|
||||
* @method \Aws\Result revokeInvitation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise revokeInvitationAsync(array $args = [])
|
||||
* @method \Aws\Result searchAddressBooks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchAddressBooksAsync(array $args = [])
|
||||
* @method \Aws\Result searchContacts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchContactsAsync(array $args = [])
|
||||
* @method \Aws\Result searchDevices(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchDevicesAsync(array $args = [])
|
||||
* @method \Aws\Result searchNetworkProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchNetworkProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result searchProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result searchRooms(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchRoomsAsync(array $args = [])
|
||||
* @method \Aws\Result searchSkillGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchSkillGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result searchUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchUsersAsync(array $args = [])
|
||||
* @method \Aws\Result sendAnnouncement(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise sendAnnouncementAsync(array $args = [])
|
||||
* @method \Aws\Result sendInvitation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise sendInvitationAsync(array $args = [])
|
||||
* @method \Aws\Result startDeviceSync(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startDeviceSyncAsync(array $args = [])
|
||||
* @method \Aws\Result startSmartHomeApplianceDiscovery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startSmartHomeApplianceDiscoveryAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateAddressBook(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAddressBookAsync(array $args = [])
|
||||
* @method \Aws\Result updateBusinessReportSchedule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateBusinessReportScheduleAsync(array $args = [])
|
||||
* @method \Aws\Result updateConferenceProvider(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConferenceProviderAsync(array $args = [])
|
||||
* @method \Aws\Result updateContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactAsync(array $args = [])
|
||||
* @method \Aws\Result updateDevice(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateDeviceAsync(array $args = [])
|
||||
* @method \Aws\Result updateGateway(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateGatewayAsync(array $args = [])
|
||||
* @method \Aws\Result updateGatewayGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateGatewayGroupAsync(array $args = [])
|
||||
* @method \Aws\Result updateNetworkProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateNetworkProfileAsync(array $args = [])
|
||||
* @method \Aws\Result updateProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateProfileAsync(array $args = [])
|
||||
* @method \Aws\Result updateRoom(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRoomAsync(array $args = [])
|
||||
* @method \Aws\Result updateSkillGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSkillGroupAsync(array $args = [])
|
||||
*/
|
||||
class AlexaForBusinessClient extends AwsClient {}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
namespace Aws\AlexaForBusiness\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Alexa For Business** service.
|
||||
*/
|
||||
class AlexaForBusinessException extends AwsException {}
|
||||
@@ -41,6 +41,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listComponentsAsync(array $args = [])
|
||||
* @method \Aws\Result listForms(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFormsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listThemes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listThemesAsync(array $args = [])
|
||||
* @method \Aws\Result putMetadataFlag(array $args = [])
|
||||
@@ -49,6 +51,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise refreshTokenAsync(array $args = [])
|
||||
* @method \Aws\Result startCodegenJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startCodegenJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateComponent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateComponentAsync(array $args = [])
|
||||
* @method \Aws\Result updateForm(array $args = [])
|
||||
|
||||
@@ -13,6 +13,8 @@ use Exception;
|
||||
*/
|
||||
class DateTimeResult extends \DateTime implements \JsonSerializable
|
||||
{
|
||||
private const ISO8601_NANOSECOND_REGEX = '/^(.*\.\d{6})(\d{1,3})(Z|[+-]\d{2}:\d{2})?$/';
|
||||
|
||||
/**
|
||||
* Create a new DateTimeResult from a unix timestamp.
|
||||
* The Unix epoch (or Unix time or POSIX time or Unix
|
||||
@@ -60,6 +62,14 @@ class DateTimeResult extends \DateTime implements \JsonSerializable
|
||||
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromISO8601');
|
||||
}
|
||||
|
||||
// Prior to 8.0.10, nanosecond precision is not supported
|
||||
// Reduces to microsecond precision if nanosecond precision is detected
|
||||
if (PHP_VERSION_ID < 80010
|
||||
&& preg_match(self::ISO8601_NANOSECOND_REGEX, $iso8601Timestamp, $matches)
|
||||
) {
|
||||
$iso8601Timestamp = $matches[1] . ($matches[3] ?? '');
|
||||
}
|
||||
|
||||
return new DateTimeResult($iso8601Timestamp);
|
||||
}
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ class DocModel
|
||||
|
||||
$result = '';
|
||||
$d = $this->docs['shapes'][$shapeName];
|
||||
if (isset($d['refs']["{$parentName}\$${ref}"])) {
|
||||
$result = $d['refs']["{$parentName}\$${ref}"];
|
||||
if (isset($d['refs']["{$parentName}\${$ref}"])) {
|
||||
$result = $d['refs']["{$parentName}\${$ref}"];
|
||||
} elseif (isset($d['base'])) {
|
||||
$result = $d['base'];
|
||||
}
|
||||
@@ -113,6 +113,7 @@ class DocModel
|
||||
return $this->clean($result);
|
||||
}
|
||||
|
||||
|
||||
private function clean($content)
|
||||
{
|
||||
if (!$content) {
|
||||
@@ -126,7 +127,7 @@ class DocModel
|
||||
'output-html' => true,
|
||||
'show-body-only' => true,
|
||||
'drop-empty-paras' => true,
|
||||
'drop-font-tags' => true,
|
||||
'clean' => true,
|
||||
'drop-proprietary-attributes' => true,
|
||||
'hide-comments' => true,
|
||||
'logical-emphasis' => true
|
||||
|
||||
@@ -52,19 +52,19 @@ class DecodingEventStreamIterator implements Iterator
|
||||
];
|
||||
|
||||
/** @var StreamInterface Stream of eventstream shape to parse. */
|
||||
private $stream;
|
||||
protected $stream;
|
||||
|
||||
/** @var array Currently parsed event. */
|
||||
private $currentEvent;
|
||||
protected $currentEvent;
|
||||
|
||||
/** @var int Current in-order event key. */
|
||||
private $key;
|
||||
protected $key;
|
||||
|
||||
/** @var resource|\HashContext CRC32 hash context for event validation */
|
||||
private $hashContext;
|
||||
protected $hashContext;
|
||||
|
||||
/** @var int $currentPosition */
|
||||
private $currentPosition;
|
||||
protected $currentPosition;
|
||||
|
||||
/**
|
||||
* DecodingEventStreamIterator constructor.
|
||||
@@ -77,7 +77,7 @@ class DecodingEventStreamIterator implements Iterator
|
||||
$this->rewind();
|
||||
}
|
||||
|
||||
private function parseHeaders($headerBytes)
|
||||
protected function parseHeaders($headerBytes)
|
||||
{
|
||||
$headers = [];
|
||||
$bytesRead = 0;
|
||||
@@ -102,7 +102,7 @@ class DecodingEventStreamIterator implements Iterator
|
||||
return [$headers, $bytesRead];
|
||||
}
|
||||
|
||||
private function parsePrelude()
|
||||
protected function parsePrelude()
|
||||
{
|
||||
$prelude = [];
|
||||
$bytesRead = 0;
|
||||
@@ -127,7 +127,12 @@ class DecodingEventStreamIterator implements Iterator
|
||||
return [$prelude, $bytesRead];
|
||||
}
|
||||
|
||||
private function parseEvent()
|
||||
/**
|
||||
* This method decodes an event from the stream.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseEvent()
|
||||
{
|
||||
$event = [];
|
||||
|
||||
@@ -217,7 +222,7 @@ class DecodingEventStreamIterator implements Iterator
|
||||
|
||||
// Decoding Utilities
|
||||
|
||||
private function readAndHashBytes($num)
|
||||
protected function readAndHashBytes($num)
|
||||
{
|
||||
$bytes = $this->stream->read($num);
|
||||
hash_update($this->hashContext, $bytes);
|
||||
|
||||
@@ -28,11 +28,28 @@ class EventParsingIterator implements Iterator
|
||||
StructureShape $shape,
|
||||
AbstractParser $parser
|
||||
) {
|
||||
$this->decodingIterator = new DecodingEventStreamIterator($stream);
|
||||
$this->decodingIterator = $this->chooseDecodingIterator($stream);
|
||||
$this->shape = $shape;
|
||||
$this->parser = $parser;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method choose a decoding iterator implementation based on if the stream
|
||||
* is seekable or not.
|
||||
*
|
||||
* @param $stream
|
||||
*
|
||||
* @return Iterator
|
||||
*/
|
||||
private function chooseDecodingIterator($stream)
|
||||
{
|
||||
if ($stream->isSeekable()) {
|
||||
return new DecodingEventStreamIterator($stream);
|
||||
} else {
|
||||
return new NonSeekableStreamDecodingEventStreamIterator($stream);
|
||||
}
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
@@ -69,37 +86,85 @@ class EventParsingIterator implements Iterator
|
||||
if ($event['headers'][':message-type'] === 'error') {
|
||||
return $this->parseError($event);
|
||||
}
|
||||
|
||||
if ($event['headers'][':message-type'] !== 'event') {
|
||||
throw new ParserException('Failed to parse unknown message type.');
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($event['headers'][':event-type'])) {
|
||||
$eventType = $event['headers'][':event-type'] ?? null;
|
||||
if (empty($eventType)) {
|
||||
throw new ParserException('Failed to parse without event type.');
|
||||
}
|
||||
$eventShape = $this->shape->getMember($event['headers'][':event-type']);
|
||||
|
||||
$parsedEvent = [];
|
||||
foreach ($eventShape['members'] as $shape => $details) {
|
||||
if (!empty($details['eventpayload'])) {
|
||||
$payloadShape = $eventShape->getMember($shape);
|
||||
if ($payloadShape['type'] === 'blob') {
|
||||
$parsedEvent[$shape] = $event['payload'];
|
||||
} else {
|
||||
$parsedEvent[$shape] = $this->parser->parseMemberFromStream(
|
||||
$event['payload'],
|
||||
$payloadShape,
|
||||
null
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$parsedEvent[$shape] = $event['headers'][$shape];
|
||||
$eventPayload = $event['payload'];
|
||||
if ($eventType === 'initial-response') {
|
||||
return $this->parseInitialResponseEvent($eventPayload);
|
||||
}
|
||||
|
||||
$eventShape = $this->shape->getMember($eventType);
|
||||
|
||||
return [
|
||||
$eventType => array_merge(
|
||||
$this->parseEventHeaders($event['headers'], $eventShape),
|
||||
$this->parseEventPayload($eventPayload, $eventShape)
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $headers
|
||||
* @param $eventShape
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function parseEventHeaders($headers, $eventShape): array
|
||||
{
|
||||
$parsedHeaders = [];
|
||||
foreach ($eventShape->getMembers() as $memberName => $memberProps) {
|
||||
if (isset($memberProps['eventheader'])) {
|
||||
$parsedHeaders[$memberName] = $headers[$memberName];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
$event['headers'][':event-type'] => $parsedEvent
|
||||
];
|
||||
return $parsedHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $payload
|
||||
* @param $eventShape
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function parseEventPayload($payload, $eventShape): array
|
||||
{
|
||||
$parsedPayload = [];
|
||||
foreach ($eventShape->getMembers() as $memberName => $memberProps) {
|
||||
$memberShape = $eventShape->getMember($memberName);
|
||||
if (isset($memberProps['eventpayload'])) {
|
||||
if ($memberShape->getType() === 'blob') {
|
||||
$parsedPayload[$memberName] = $payload;
|
||||
} else {
|
||||
$parsedPayload[$memberName] = $this->parser->parseMemberFromStream(
|
||||
$payload,
|
||||
$memberShape,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($parsedPayload) && !empty($payload->getContents())) {
|
||||
/**
|
||||
* If we did not find a member with an eventpayload trait, then we should deserialize the payload
|
||||
* using the event's shape.
|
||||
*/
|
||||
$parsedPayload = $this->parser->parseMemberFromStream($payload, $eventShape, null);
|
||||
}
|
||||
|
||||
return $parsedPayload;
|
||||
}
|
||||
|
||||
private function parseError(array $event)
|
||||
@@ -109,4 +174,9 @@ class EventParsingIterator implements Iterator
|
||||
$event['headers'][':error-message']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function parseInitialResponseEvent($payload): array
|
||||
{
|
||||
return ['initial-response' => json_decode($payload, true)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace Aws\Api\Parser;
|
||||
|
||||
use Aws\Api\Operation;
|
||||
use Aws\Api\StructureShape;
|
||||
use Aws\Api\Service;
|
||||
use Aws\Result;
|
||||
@@ -30,15 +31,45 @@ class JsonRpcParser extends AbstractParser
|
||||
ResponseInterface $response
|
||||
) {
|
||||
$operation = $this->api->getOperation($command->getName());
|
||||
$result = null === $operation['output']
|
||||
? null
|
||||
: $this->parseMemberFromStream(
|
||||
|
||||
return $this->parseResponse($response, $operation);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method parses a response based on JSON RPC protocol.
|
||||
*
|
||||
* @param ResponseInterface $response the response to parse.
|
||||
* @param Operation $operation the operation which holds information for
|
||||
* parsing the response.
|
||||
*
|
||||
* @return Result
|
||||
*/
|
||||
private function parseResponse(ResponseInterface $response, Operation $operation)
|
||||
{
|
||||
if (null === $operation['output']) {
|
||||
return new Result([]);
|
||||
}
|
||||
|
||||
$outputShape = $operation->getOutput();
|
||||
foreach ($outputShape->getMembers() as $memberName => $memberProps) {
|
||||
if (!empty($memberProps['eventstream'])) {
|
||||
return new Result([
|
||||
$memberName => new EventParsingIterator(
|
||||
$response->getBody(),
|
||||
$outputShape->getMember($memberName),
|
||||
$this
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->parseMemberFromStream(
|
||||
$response->getBody(),
|
||||
$operation->getOutput(),
|
||||
$response
|
||||
);
|
||||
|
||||
return new Result($result ?: []);
|
||||
return new Result(is_null($result) ? [] : $result);
|
||||
}
|
||||
|
||||
public function parseMemberFromStream(
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace Aws\Api\Parser;
|
||||
|
||||
use GuzzleHttp\Psr7;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Aws\Api\Parser\Exception\ParserException;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
class NonSeekableStreamDecodingEventStreamIterator extends DecodingEventStreamIterator
|
||||
{
|
||||
/** @var array $tempBuffer */
|
||||
private $tempBuffer;
|
||||
|
||||
/**
|
||||
* NonSeekableStreamDecodingEventStreamIterator constructor.
|
||||
*
|
||||
* @param StreamInterface $stream
|
||||
*/
|
||||
public function __construct(StreamInterface $stream)
|
||||
{
|
||||
$this->stream = $stream;
|
||||
if ($this->stream->isSeekable()) {
|
||||
throw new \InvalidArgumentException('The stream provided must be not seekable.');
|
||||
}
|
||||
|
||||
$this->tempBuffer = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseEvent(): array
|
||||
{
|
||||
$event = [];
|
||||
$this->hashContext = hash_init('crc32b');
|
||||
$prelude = $this->parsePrelude()[0];
|
||||
list(
|
||||
$event[self::HEADERS],
|
||||
$numBytes
|
||||
) = $this->parseHeaders($prelude[self::LENGTH_HEADERS]);
|
||||
$event[self::PAYLOAD] = Psr7\Utils::streamFor(
|
||||
$this->readAndHashBytes(
|
||||
$prelude[self::LENGTH_TOTAL] - self::BYTES_PRELUDE
|
||||
- $numBytes - self::BYTES_TRAILING
|
||||
)
|
||||
);
|
||||
$calculatedCrc = hash_final($this->hashContext, true);
|
||||
$messageCrc = $this->stream->read(4);
|
||||
if ($calculatedCrc !== $messageCrc) {
|
||||
throw new ParserException('Message checksum mismatch.');
|
||||
}
|
||||
|
||||
return $event;
|
||||
}
|
||||
|
||||
protected function readAndHashBytes($num): string
|
||||
{
|
||||
$bytes = '';
|
||||
while (!empty($this->tempBuffer) && $num > 0) {
|
||||
$byte = array_shift($this->tempBuffer);
|
||||
$bytes .= $byte;
|
||||
$num = $num - 1;
|
||||
}
|
||||
|
||||
$bytes = $bytes . $this->stream->read($num);
|
||||
hash_update($this->hashContext, $bytes);
|
||||
|
||||
return $bytes;
|
||||
}
|
||||
|
||||
// Iterator Functionality
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
$this->currentEvent = $this->parseEvent();
|
||||
}
|
||||
|
||||
public function next()
|
||||
{
|
||||
$this->tempBuffer[] = $this->stream->read(1);
|
||||
if ($this->valid()) {
|
||||
$this->key++;
|
||||
$this->currentEvent = $this->parseEvent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function valid()
|
||||
{
|
||||
return !$this->stream->eof();
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,7 @@ class Ec2ParamBuilder extends QueryParamBuilder
|
||||
&$query
|
||||
) {
|
||||
// Handle empty list serialization
|
||||
if (!$value) {
|
||||
$query[$prefix] = false;
|
||||
} else {
|
||||
if (!empty($value)) {
|
||||
$items = $shape->getMember();
|
||||
foreach ($value as $k => $v) {
|
||||
$this->format($items, $v, $prefix . '.' . ($k + 1), $query);
|
||||
|
||||
@@ -3,8 +3,8 @@ namespace Aws\Api\Serializer;
|
||||
|
||||
use Aws\Api\Service;
|
||||
use Aws\CommandInterface;
|
||||
use Aws\EndpointV2\EndpointProviderV2;
|
||||
use Aws\EndpointV2\EndpointV2SerializerTrait;
|
||||
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
@@ -56,8 +56,7 @@ class JsonRpcSerializer
|
||||
*/
|
||||
public function __invoke(
|
||||
CommandInterface $command,
|
||||
$endpointProvider = null,
|
||||
$clientArgs = null
|
||||
$endpoint = null
|
||||
)
|
||||
{
|
||||
$operationName = $command->getName();
|
||||
@@ -68,15 +67,8 @@ class JsonRpcSerializer
|
||||
'Content-Type' => $this->contentType
|
||||
];
|
||||
|
||||
if ($endpointProvider instanceof EndpointProviderV2) {
|
||||
$this->setRequestOptions(
|
||||
$endpointProvider,
|
||||
$command,
|
||||
$operation,
|
||||
$commandArgs,
|
||||
$clientArgs,
|
||||
$headers
|
||||
);
|
||||
if ($endpoint instanceof RulesetEndpoint) {
|
||||
$this->setEndpointV2RequestOptions($endpoint, $headers);
|
||||
}
|
||||
|
||||
return new Request(
|
||||
|
||||
@@ -5,6 +5,7 @@ use Aws\Api\Service;
|
||||
use Aws\CommandInterface;
|
||||
use Aws\EndpointV2\EndpointProviderV2;
|
||||
use Aws\EndpointV2\EndpointV2SerializerTrait;
|
||||
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
|
||||
@@ -42,8 +43,7 @@ class QuerySerializer
|
||||
*/
|
||||
public function __invoke(
|
||||
CommandInterface $command,
|
||||
$endpointProvider = null,
|
||||
$clientArgs = null
|
||||
$endpoint = null
|
||||
)
|
||||
{
|
||||
$operation = $this->api->getOperation($command->getName());
|
||||
@@ -67,15 +67,8 @@ class QuerySerializer
|
||||
'Content-Type' => 'application/x-www-form-urlencoded'
|
||||
];
|
||||
|
||||
if ($endpointProvider instanceof EndpointProviderV2) {
|
||||
$this->setRequestOptions(
|
||||
$endpointProvider,
|
||||
$command,
|
||||
$operation,
|
||||
$commandArgs,
|
||||
$clientArgs,
|
||||
$headers
|
||||
);
|
||||
if ($endpoint instanceof RulesetEndpoint) {
|
||||
$this->setEndpointV2RequestOptions($endpoint, $headers);
|
||||
}
|
||||
|
||||
return new Request(
|
||||
|
||||
@@ -10,6 +10,7 @@ use Aws\Api\TimestampShape;
|
||||
use Aws\CommandInterface;
|
||||
use Aws\EndpointV2\EndpointProviderV2;
|
||||
use Aws\EndpointV2\EndpointV2SerializerTrait;
|
||||
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||
use GuzzleHttp\Psr7;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
@@ -49,8 +50,7 @@ abstract class RestSerializer
|
||||
*/
|
||||
public function __invoke(
|
||||
CommandInterface $command,
|
||||
$endpointProvider = null,
|
||||
$clientArgs = null
|
||||
$endpoint = null
|
||||
)
|
||||
{
|
||||
$operation = $this->api->getOperation($command->getName());
|
||||
@@ -58,17 +58,10 @@ abstract class RestSerializer
|
||||
$opts = $this->serialize($operation, $commandArgs);
|
||||
$headers = isset($opts['headers']) ? $opts['headers'] : [];
|
||||
|
||||
if ($endpointProvider instanceof EndpointProviderV2) {
|
||||
$this->setRequestOptions(
|
||||
$endpointProvider,
|
||||
$command,
|
||||
$operation,
|
||||
$commandArgs,
|
||||
$clientArgs,
|
||||
$headers
|
||||
);
|
||||
$this->endpoint = new Uri($this->endpoint);
|
||||
if ($endpoint instanceof RulesetEndpoint) {
|
||||
$this->setEndpointV2RequestOptions($endpoint, $headers);
|
||||
}
|
||||
|
||||
$uri = $this->buildEndpoint($operation, $commandArgs, $opts);
|
||||
|
||||
return new Request(
|
||||
@@ -242,14 +235,24 @@ abstract class RestSerializer
|
||||
$path = rtrim($path, '/');
|
||||
}
|
||||
$relative = $path . $relative;
|
||||
|
||||
if (strpos($relative, '../') !== false
|
||||
|| substr($relative, -2) === '..'
|
||||
) {
|
||||
if ($relative[0] !== '/') {
|
||||
$relative = '/' . $relative;
|
||||
}
|
||||
|
||||
return new Uri($this->endpoint->withPath('') . $relative);
|
||||
}
|
||||
}
|
||||
// If endpoint has path, remove leading '/' to preserve URI resolution.
|
||||
if ($path && $relative[0] === '/') {
|
||||
$relative = substr($relative, 1);
|
||||
}
|
||||
|
||||
//Append path to endpoint when leading '//...' present
|
||||
// as uri cannot be properly resolved
|
||||
//Append path to endpoint when leading '//...'
|
||||
// present as uri cannot be properly resolved
|
||||
if ($this->api->isModifiedModel()
|
||||
&& strpos($relative, '//') === 0
|
||||
) {
|
||||
|
||||
@@ -5,18 +5,28 @@ use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon AppIntegrations Service** service.
|
||||
* @method \Aws\Result createApplication(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
|
||||
* @method \Aws\Result createDataIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createDataIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result createEventIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createEventIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteApplication(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteApplicationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDataIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDataIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteEventIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteEventIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result getApplication(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getApplicationAsync(array $args = [])
|
||||
* @method \Aws\Result getDataIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDataIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result getEventIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getEventIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result listApplicationAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listApplicationAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listApplications(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
|
||||
* @method \Aws\Result listDataIntegrationAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listDataIntegrationAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listDataIntegrations(array $args = [])
|
||||
@@ -31,6 +41,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateApplication(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
|
||||
* @method \Aws\Result updateDataIntegration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateDataIntegrationAsync(array $args = [])
|
||||
* @method \Aws\Result updateEventIntegration(array $args = [])
|
||||
|
||||
@@ -55,6 +55,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result listServices(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServicesAsync(array $args = [])
|
||||
* @method \Aws\Result listServicesForAutoScalingConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServicesForAutoScalingConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listVpcConnectors(array $args = [])
|
||||
@@ -71,6 +73,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateDefaultAutoScalingConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateDefaultAutoScalingConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateService(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateServiceAsync(array $args = [])
|
||||
* @method \Aws\Result updateVpcIngressConnection(array $args = [])
|
||||
|
||||
@@ -61,12 +61,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getApiCacheAsync(array $args = [])
|
||||
* @method \Aws\Result getDataSource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
|
||||
* @method \Aws\Result getDataSourceIntrospection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDataSourceIntrospectionAsync(array $args = [])
|
||||
* @method \Aws\Result getDomainName(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDomainNameAsync(array $args = [])
|
||||
* @method \Aws\Result getFunction(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFunctionAsync(array $args = [])
|
||||
* @method \Aws\Result getGraphqlApi(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGraphqlApiAsync(array $args = [])
|
||||
* @method \Aws\Result getGraphqlApiEnvironmentVariables(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGraphqlApiEnvironmentVariablesAsync(array $args = [])
|
||||
* @method \Aws\Result getIntrospectionSchema(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getIntrospectionSchemaAsync(array $args = [])
|
||||
* @method \Aws\Result getResolver(array $args = [])
|
||||
@@ -99,6 +103,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listTypesAsync(array $args = [])
|
||||
* @method \Aws\Result listTypesByAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTypesByAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result putGraphqlApiEnvironmentVariables(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putGraphqlApiEnvironmentVariablesAsync(array $args = [])
|
||||
* @method \Aws\Result startDataSourceIntrospection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startDataSourceIntrospectionAsync(array $args = [])
|
||||
* @method \Aws\Result startSchemaCreation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startSchemaCreationAsync(array $args = [])
|
||||
* @method \Aws\Result startSchemaMerge(array $args = [])
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
namespace Aws\AppTest;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Mainframe Modernization Application Testing** service.
|
||||
* @method \Aws\Result createTestCase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createTestCaseAsync(array $args = [])
|
||||
* @method \Aws\Result createTestConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createTestConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result createTestSuite(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createTestSuiteAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTestCase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTestCaseAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTestConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTestConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTestRun(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTestRunAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTestSuite(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTestSuiteAsync(array $args = [])
|
||||
* @method \Aws\Result getTestCase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTestCaseAsync(array $args = [])
|
||||
* @method \Aws\Result getTestConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTestConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getTestRunStep(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTestRunStepAsync(array $args = [])
|
||||
* @method \Aws\Result getTestSuite(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTestSuiteAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listTestCases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestCasesAsync(array $args = [])
|
||||
* @method \Aws\Result listTestConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listTestRunSteps(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestRunStepsAsync(array $args = [])
|
||||
* @method \Aws\Result listTestRunTestCases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestRunTestCasesAsync(array $args = [])
|
||||
* @method \Aws\Result listTestRuns(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestRunsAsync(array $args = [])
|
||||
* @method \Aws\Result listTestSuites(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTestSuitesAsync(array $args = [])
|
||||
* @method \Aws\Result startTestRun(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startTestRunAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateTestCase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateTestCaseAsync(array $args = [])
|
||||
* @method \Aws\Result updateTestConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateTestConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateTestSuite(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateTestSuiteAsync(array $args = [])
|
||||
*/
|
||||
class AppTestClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\AppTest\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS Mainframe Modernization Application Testing** service.
|
||||
*/
|
||||
class AppTestException extends AwsException {}
|
||||
@@ -7,6 +7,8 @@ use Aws\AwsClient;
|
||||
* This client is used to interact with the **AWS Application Discovery Service** service.
|
||||
* @method \Aws\Result associateConfigurationItemsToApplication(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateConfigurationItemsToApplicationAsync(array $args = [])
|
||||
* @method \Aws\Result batchDeleteAgents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchDeleteAgentsAsync(array $args = [])
|
||||
* @method \Aws\Result batchDeleteImportData(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchDeleteImportDataAsync(array $args = [])
|
||||
* @method \Aws\Result createApplication(array $args = [])
|
||||
@@ -19,6 +21,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTagsAsync(array $args = [])
|
||||
* @method \Aws\Result describeAgents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeAgentsAsync(array $args = [])
|
||||
* @method \Aws\Result describeBatchDeleteConfigurationTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeBatchDeleteConfigurationTaskAsync(array $args = [])
|
||||
* @method \Aws\Result describeConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result describeContinuousExports(array $args = [])
|
||||
@@ -41,6 +45,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listServerNeighbors(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServerNeighborsAsync(array $args = [])
|
||||
* @method \Aws\Result startBatchDeleteConfigurationTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startBatchDeleteConfigurationTaskAsync(array $args = [])
|
||||
* @method \Aws\Result startContinuousExport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startContinuousExportAsync(array $args = [])
|
||||
* @method \Aws\Result startDataCollectionByAgentIds(array $args = [])
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
namespace Aws\ApplicationSignals;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon CloudWatch Application Signals** service.
|
||||
* @method \Aws\Result batchGetServiceLevelObjectiveBudgetReport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetServiceLevelObjectiveBudgetReportAsync(array $args = [])
|
||||
* @method \Aws\Result createServiceLevelObjective(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createServiceLevelObjectiveAsync(array $args = [])
|
||||
* @method \Aws\Result deleteServiceLevelObjective(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteServiceLevelObjectiveAsync(array $args = [])
|
||||
* @method \Aws\Result getService(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getServiceAsync(array $args = [])
|
||||
* @method \Aws\Result getServiceLevelObjective(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getServiceLevelObjectiveAsync(array $args = [])
|
||||
* @method \Aws\Result listServiceDependencies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServiceDependenciesAsync(array $args = [])
|
||||
* @method \Aws\Result listServiceDependents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServiceDependentsAsync(array $args = [])
|
||||
* @method \Aws\Result listServiceLevelObjectives(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServiceLevelObjectivesAsync(array $args = [])
|
||||
* @method \Aws\Result listServiceOperations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServiceOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result listServices(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listServicesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result startDiscovery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startDiscoveryAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateServiceLevelObjective(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateServiceLevelObjectiveAsync(array $args = [])
|
||||
*/
|
||||
class ApplicationSignalsClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\ApplicationSignals\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Amazon CloudWatch Application Signals** service.
|
||||
*/
|
||||
class ApplicationSignalsException extends AwsException {}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Aws\Artifact;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Artifact** service.
|
||||
* @method \Aws\Result getAccountSettings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
|
||||
* @method \Aws\Result getReport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getReportAsync(array $args = [])
|
||||
* @method \Aws\Result getReportMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getReportMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result getTermForReport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTermForReportAsync(array $args = [])
|
||||
* @method \Aws\Result listReports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listReportsAsync(array $args = [])
|
||||
* @method \Aws\Result putAccountSettings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putAccountSettingsAsync(array $args = [])
|
||||
*/
|
||||
class ArtifactClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\Artifact\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS Artifact** service.
|
||||
*/
|
||||
class ArtifactException extends AwsException {}
|
||||
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
namespace Aws\Auth;
|
||||
|
||||
use Aws\Auth\Exception\UnresolvedAuthSchemeException;
|
||||
use Aws\Identity\AwsCredentialIdentity;
|
||||
use Aws\Identity\BearerTokenIdentity;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
|
||||
/**
|
||||
* Houses logic for selecting an auth scheme modeled in a service's `auth` trait.
|
||||
* The `auth` trait can be modeled either in a service's metadata, or at the operation level.
|
||||
*/
|
||||
class AuthSchemeResolver implements AuthSchemeResolverInterface
|
||||
{
|
||||
const UNSIGNED_BODY = '-unsigned-body';
|
||||
|
||||
/**
|
||||
* @var string[] Default mapping of modeled auth trait auth schemes
|
||||
* to the SDK's supported signature versions.
|
||||
*/
|
||||
private static $defaultAuthSchemeMap = [
|
||||
'aws.auth#sigv4' => 'v4',
|
||||
'aws.auth#sigv4a' => 'v4a',
|
||||
'smithy.api#httpBearerAuth' => 'bearer',
|
||||
'smithy.api#noAuth' => 'anonymous'
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array Mapping of auth schemes to signature versions used in
|
||||
* resolving a signature version.
|
||||
*/
|
||||
private $authSchemeMap;
|
||||
private $tokenProvider;
|
||||
private $credentialProvider;
|
||||
|
||||
|
||||
public function __construct(
|
||||
callable $credentialProvider,
|
||||
callable $tokenProvider = null,
|
||||
array $authSchemeMap = []
|
||||
){
|
||||
$this->credentialProvider = $credentialProvider;
|
||||
$this->tokenProvider = $tokenProvider;
|
||||
$this->authSchemeMap = empty($authSchemeMap)
|
||||
? self::$defaultAuthSchemeMap
|
||||
: $authSchemeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts a priority-ordered list of auth schemes and an Identity
|
||||
* and selects the first compatible auth schemes, returning a normalized
|
||||
* signature version. For example, based on the default auth scheme mapping,
|
||||
* if `aws.auth#sigv4` is selected, `v4` will be returned.
|
||||
*
|
||||
* @param array $authSchemes
|
||||
* @param $identity
|
||||
*
|
||||
* @return string
|
||||
* @throws UnresolvedAuthSchemeException
|
||||
*/
|
||||
public function selectAuthScheme(
|
||||
array $authSchemes,
|
||||
array $args = []
|
||||
): string
|
||||
{
|
||||
$failureReasons = [];
|
||||
|
||||
foreach($authSchemes as $authScheme) {
|
||||
$normalizedAuthScheme = $this->authSchemeMap[$authScheme] ?? $authScheme;
|
||||
|
||||
if ($this->isCompatibleAuthScheme($normalizedAuthScheme)) {
|
||||
if ($normalizedAuthScheme === 'v4' && !empty($args['unsigned_payload'])) {
|
||||
return $normalizedAuthScheme . self::UNSIGNED_BODY;
|
||||
}
|
||||
|
||||
return $normalizedAuthScheme;
|
||||
} else {
|
||||
$failureReasons[] = $this->getIncompatibilityMessage($normalizedAuthScheme);
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnresolvedAuthSchemeException(
|
||||
'Could not resolve an authentication scheme: '
|
||||
. implode('; ', $failureReasons)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines compatibility based on either Identity or the availability
|
||||
* of the CRT extension.
|
||||
*
|
||||
* @param $authScheme
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isCompatibleAuthScheme($authScheme): bool
|
||||
{
|
||||
switch ($authScheme) {
|
||||
case 'v4':
|
||||
case 'anonymous':
|
||||
return $this->hasAwsCredentialIdentity();
|
||||
case 'v4a':
|
||||
return extension_loaded('awscrt') && $this->hasAwsCredentialIdentity();
|
||||
case 'bearer':
|
||||
return $this->hasBearerTokenIdentity();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides incompatibility messages in the event an incompatible auth scheme
|
||||
* is encountered.
|
||||
*
|
||||
* @param $authScheme
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getIncompatibilityMessage($authScheme): string
|
||||
{
|
||||
switch ($authScheme) {
|
||||
case 'v4':
|
||||
return 'Signature V4 requires AWS credentials for request signing';
|
||||
case 'anonymous':
|
||||
return 'Anonymous signatures require AWS credentials for request signing';
|
||||
case 'v4a':
|
||||
return 'The aws-crt-php extension and AWS credentials are required to use Signature V4A';
|
||||
case 'bearer':
|
||||
return 'Bearer token credentials must be provided to use Bearer authentication';
|
||||
default:
|
||||
return "The service does not support `{$authScheme}` authentication.";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
private function hasAwsCredentialIdentity(): bool
|
||||
{
|
||||
$fn = $this->credentialProvider;
|
||||
$result = $fn();
|
||||
|
||||
if ($result instanceof PromiseInterface) {
|
||||
return $result->wait() instanceof AwsCredentialIdentity;
|
||||
}
|
||||
|
||||
return $result instanceof AwsCredentialIdentity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
private function hasBearerTokenIdentity(): bool
|
||||
{
|
||||
if ($this->tokenProvider) {
|
||||
$fn = $this->tokenProvider;
|
||||
$result = $fn();
|
||||
|
||||
if ($result instanceof PromiseInterface) {
|
||||
return $result->wait() instanceof BearerTokenIdentity;
|
||||
}
|
||||
|
||||
return $result instanceof BearerTokenIdentity;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace Aws\Auth;
|
||||
|
||||
use Aws\Identity\IdentityInterface;
|
||||
|
||||
/**
|
||||
* An AuthSchemeResolver object determines which auth scheme will be used for request signing.
|
||||
*/
|
||||
interface AuthSchemeResolverInterface
|
||||
{
|
||||
/**
|
||||
* Selects an auth scheme for request signing.
|
||||
*
|
||||
* @param array $authSchemes a priority-ordered list of authentication schemes.
|
||||
* @param IdentityInterface $identity Credentials to be used in request signing.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function selectAuthScheme(
|
||||
array $authSchemes,
|
||||
array $args
|
||||
): ?string;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
namespace Aws\Auth;
|
||||
|
||||
use Aws\Api\Service;
|
||||
use Aws\CommandInterface;
|
||||
use Closure;
|
||||
use GuzzleHttp\Promise\Promise;
|
||||
|
||||
/**
|
||||
* Handles auth scheme resolution. If a service models and auth scheme using
|
||||
* the `auth` trait and the operation or metadata levels, this middleware will
|
||||
* attempt to select the first compatible auth scheme it encounters and apply its
|
||||
* signature version to the command's `@context` property bag.
|
||||
*
|
||||
* IMPORTANT: this middleware must be added to the "build" step.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
class AuthSelectionMiddleware
|
||||
{
|
||||
/** @var callable */
|
||||
private $nextHandler;
|
||||
|
||||
/** @var AuthSchemeResolverInterface */
|
||||
private $authResolver;
|
||||
|
||||
/** @var Service */
|
||||
private $api;
|
||||
|
||||
/**
|
||||
* Create a middleware wrapper function
|
||||
*
|
||||
* @param AuthSchemeResolverInterface $authResolver
|
||||
* @param Service $api
|
||||
* @return Closure
|
||||
*/
|
||||
public static function wrap(
|
||||
AuthSchemeResolverInterface $authResolver,
|
||||
Service $api
|
||||
): Closure
|
||||
{
|
||||
return function (callable $handler) use ($authResolver, $api) {
|
||||
return new self($handler, $authResolver, $api);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param callable $nextHandler
|
||||
* @param $authResolver
|
||||
* @param callable $identityProvider
|
||||
* @param Service $api
|
||||
*/
|
||||
public function __construct(
|
||||
callable $nextHandler,
|
||||
AuthSchemeResolverInterface $authResolver,
|
||||
Service $api
|
||||
)
|
||||
{
|
||||
$this->nextHandler = $nextHandler;
|
||||
$this->authResolver = $authResolver;
|
||||
$this->api = $api;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandInterface $command
|
||||
*
|
||||
* @return Promise
|
||||
*/
|
||||
public function __invoke(CommandInterface $command)
|
||||
{
|
||||
$nextHandler = $this->nextHandler;
|
||||
$serviceAuth = $this->api->getMetadata('auth') ?: [];
|
||||
$operation = $this->api->getOperation($command->getName());
|
||||
$operationAuth = $operation['auth'] ?? [];
|
||||
$unsignedPayload = $operation['unsignedpayload'] ?? false;
|
||||
$resolvableAuth = $operationAuth ?: $serviceAuth;
|
||||
|
||||
if (!empty($resolvableAuth)) {
|
||||
if (isset($command['@context']['auth_scheme_resolver'])
|
||||
&& $command['@context']['auth_scheme_resolver'] instanceof AuthSchemeResolverInterface
|
||||
){
|
||||
$resolver = $command['@context']['auth_scheme_resolver'];
|
||||
} else {
|
||||
$resolver = $this->authResolver;
|
||||
}
|
||||
|
||||
$selectedAuthScheme = $resolver->selectAuthScheme(
|
||||
$resolvableAuth,
|
||||
['unsigned_payload' => $unsignedPayload]
|
||||
);
|
||||
|
||||
if (!empty($selectedAuthScheme)) {
|
||||
$command['@context']['signature_version'] = $selectedAuthScheme;
|
||||
}
|
||||
}
|
||||
|
||||
return $nextHandler($command);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Aws\Auth\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
/**
|
||||
* Represents an error when attempting to resolve authentication.
|
||||
*/
|
||||
class UnresolvedAuthSchemeException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
+138
-60
@@ -4,8 +4,11 @@ namespace Aws;
|
||||
use Aws\Api\ApiProvider;
|
||||
use Aws\Api\DocModel;
|
||||
use Aws\Api\Service;
|
||||
use Aws\Auth\AuthSelectionMiddleware;
|
||||
use Aws\Auth\AuthSchemeResolverInterface;
|
||||
use Aws\EndpointDiscovery\EndpointDiscoveryMiddleware;
|
||||
use Aws\EndpointV2\EndpointProviderV2;
|
||||
use Aws\EndpointV2\EndpointV2Middleware;
|
||||
use Aws\Exception\AwsException;
|
||||
use Aws\Signature\SignatureProvider;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
@@ -26,6 +29,9 @@ class AwsClient implements AwsClientInterface
|
||||
/** @var string */
|
||||
private $region;
|
||||
|
||||
/** @var string */
|
||||
private $signingRegionSet;
|
||||
|
||||
/** @var string */
|
||||
private $endpoint;
|
||||
|
||||
@@ -35,6 +41,9 @@ class AwsClient implements AwsClientInterface
|
||||
/** @var callable */
|
||||
private $signatureProvider;
|
||||
|
||||
/** @var AuthSchemeResolverInterface */
|
||||
private $authSchemeResolver;
|
||||
|
||||
/** @var callable */
|
||||
private $credentialProvider;
|
||||
|
||||
@@ -202,6 +211,23 @@ class AwsClient implements AwsClientInterface
|
||||
* client-side parameter validation.
|
||||
* - version: (string, required) The version of the webservice to
|
||||
* utilize (e.g., 2006-03-01).
|
||||
* - account_id_endpoint_mode: (string, default(preferred)) this option
|
||||
* decides whether credentials should resolve an accountId value,
|
||||
* which is going to be used as part of the endpoint resolution.
|
||||
* The valid values for this option are:
|
||||
* - preferred: when this value is set then, a warning is logged when
|
||||
* accountId is empty in the resolved identity.
|
||||
* - required: when this value is set then, an exception is thrown when
|
||||
* accountId is empty in the resolved identity.
|
||||
* - disabled: when this value is set then, the validation for if accountId
|
||||
* was resolved or not, is ignored.
|
||||
* - ua_append: (string, array) To pass custom user agent parameters.
|
||||
* - app_id: (string) an optional application specific identifier that can be set.
|
||||
* When set it will be appended to the User-Agent header of every request
|
||||
* in the form of App/{AppId}. This variable is sourced from environment
|
||||
* variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
||||
* See https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for
|
||||
* more information on environment variables and shared config settings.
|
||||
*
|
||||
* @param array $args Client configuration arguments.
|
||||
*
|
||||
@@ -222,17 +248,19 @@ class AwsClient implements AwsClientInterface
|
||||
$config = $resolver->resolve($args, $this->handlerList);
|
||||
$this->api = $config['api'];
|
||||
$this->signatureProvider = $config['signature_provider'];
|
||||
$this->authSchemeResolver = $config['auth_scheme_resolver'];
|
||||
$this->endpoint = new Uri($config['endpoint']);
|
||||
$this->credentialProvider = $config['credentials'];
|
||||
$this->tokenProvider = $config['token'];
|
||||
$this->region = isset($config['region']) ? $config['region'] : null;
|
||||
$this->region = $config['region'] ?? null;
|
||||
$this->signingRegionSet = $config['sigv4a_signing_region_set'] ?? null;
|
||||
$this->config = $config['config'];
|
||||
$this->setClientBuiltIns($args);
|
||||
$this->setClientBuiltIns($args, $config);
|
||||
$this->clientContextParams = $this->setClientContextParams($args);
|
||||
$this->defaultRequestOptions = $config['http'];
|
||||
$this->endpointProvider = $config['endpoint_provider'];
|
||||
$this->serializer = $config['serializer'];
|
||||
$this->addSignatureMiddleware();
|
||||
$this->addSignatureMiddleware($args);
|
||||
$this->addInvocationId();
|
||||
$this->addEndpointParameterMiddleware($args);
|
||||
$this->addEndpointDiscoveryMiddleware($config, $args);
|
||||
@@ -240,10 +268,13 @@ class AwsClient implements AwsClientInterface
|
||||
$this->loadAliases();
|
||||
$this->addStreamRequestPayload();
|
||||
$this->addRecursionDetection();
|
||||
$this->addRequestBuilder();
|
||||
if ($this->isUseEndpointV2()) {
|
||||
$this->addEndpointV2Middleware();
|
||||
}
|
||||
$this->addAuthSelectionMiddleware();
|
||||
|
||||
if (!$config['suppress_php_deprecation_warning']) {
|
||||
$this->emitDeprecationWarning();
|
||||
if (!is_null($this->api->getMetadata('awsQueryCompatible'))) {
|
||||
$this->addQueryCompatibleInputMiddleware($this->api);
|
||||
}
|
||||
|
||||
if (isset($args['with_resolved'])) {
|
||||
@@ -260,9 +291,7 @@ class AwsClient implements AwsClientInterface
|
||||
{
|
||||
return $option === null
|
||||
? $this->config
|
||||
: (isset($this->config[$option])
|
||||
? $this->config[$option]
|
||||
: null);
|
||||
: $this->config[$option] ?? null;
|
||||
}
|
||||
|
||||
public function getCredentials()
|
||||
@@ -400,52 +429,77 @@ class AwsClient implements AwsClientInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function addSignatureMiddleware()
|
||||
private function addSignatureMiddleware(array $args)
|
||||
{
|
||||
$api = $this->getApi();
|
||||
$provider = $this->signatureProvider;
|
||||
$version = $this->config['signature_version'];
|
||||
$signatureVersion = $this->config['signature_version'];
|
||||
$name = $this->config['signing_name'];
|
||||
$region = $this->config['signing_region'];
|
||||
$signingRegionSet = $this->signingRegionSet;
|
||||
|
||||
if (isset($args['signature_version'])
|
||||
|| isset($this->config['configured_signature_version'])
|
||||
) {
|
||||
$configuredSignatureVersion = true;
|
||||
} else {
|
||||
$configuredSignatureVersion = false;
|
||||
}
|
||||
|
||||
$resolver = static function (
|
||||
CommandInterface $c
|
||||
) use ($api, $provider, $name, $region, $version) {
|
||||
if (!empty($c['@context']['signing_region'])) {
|
||||
$region = $c['@context']['signing_region'];
|
||||
}
|
||||
if (!empty($c['@context']['signing_service'])) {
|
||||
$name = $c['@context']['signing_service'];
|
||||
}
|
||||
) use (
|
||||
$api,
|
||||
$provider,
|
||||
$name,
|
||||
$region,
|
||||
$signatureVersion,
|
||||
$configuredSignatureVersion,
|
||||
$signingRegionSet
|
||||
) {
|
||||
if (!$configuredSignatureVersion) {
|
||||
if (!empty($c['@context']['signing_region'])) {
|
||||
$region = $c['@context']['signing_region'];
|
||||
}
|
||||
if (!empty($c['@context']['signing_service'])) {
|
||||
$name = $c['@context']['signing_service'];
|
||||
}
|
||||
if (!empty($c['@context']['signature_version'])) {
|
||||
$signatureVersion = $c['@context']['signature_version'];
|
||||
}
|
||||
|
||||
$authType = $api->getOperation($c->getName())['authtype'];
|
||||
switch ($authType){
|
||||
case 'none':
|
||||
$version = 'anonymous';
|
||||
break;
|
||||
case 'v4-unsigned-body':
|
||||
$version = 'v4-unsigned-body';
|
||||
break;
|
||||
case 'bearer':
|
||||
$version = 'bearer';
|
||||
break;
|
||||
}
|
||||
if (isset($c['@context']['signature_version'])) {
|
||||
if ($c['@context']['signature_version'] == 'v4a') {
|
||||
$version = 'v4a';
|
||||
$authType = $api->getOperation($c->getName())['authtype'];
|
||||
switch ($authType){
|
||||
case 'none':
|
||||
$signatureVersion = 'anonymous';
|
||||
break;
|
||||
case 'v4-unsigned-body':
|
||||
$signatureVersion = 'v4-unsigned-body';
|
||||
break;
|
||||
case 'bearer':
|
||||
$signatureVersion = 'bearer';
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!empty($endpointAuthSchemes = $c->getAuthSchemes())) {
|
||||
$version = $endpointAuthSchemes['version'];
|
||||
$name = isset($endpointAuthSchemes['name']) ?
|
||||
$endpointAuthSchemes['name'] : $name;
|
||||
$region = isset($endpointAuthSchemes['region']) ?
|
||||
$endpointAuthSchemes['region'] : $region;
|
||||
|
||||
if ($signatureVersion === 'v4a') {
|
||||
$commandSigningRegionSet = !empty($c['@context']['signing_region_set'])
|
||||
? implode(', ', $c['@context']['signing_region_set'])
|
||||
: null;
|
||||
|
||||
$region = $signingRegionSet
|
||||
?? $commandSigningRegionSet
|
||||
?? $region;
|
||||
}
|
||||
return SignatureProvider::resolve($provider, $version, $name, $region);
|
||||
|
||||
return SignatureProvider::resolve($provider, $signatureVersion, $name, $region);
|
||||
};
|
||||
$this->handlerList->appendSign(
|
||||
Middleware::signer($this->credentialProvider, $resolver, $this->tokenProvider),
|
||||
Middleware::signer($this->credentialProvider,
|
||||
$resolver,
|
||||
$this->tokenProvider,
|
||||
$this->getConfig()
|
||||
),
|
||||
'signer'
|
||||
);
|
||||
}
|
||||
@@ -461,6 +515,15 @@ class AwsClient implements AwsClientInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function addQueryCompatibleInputMiddleware(Service $api)
|
||||
{
|
||||
$list = $this->getHandlerList();
|
||||
$list->appendValidate(
|
||||
QueryCompatibleInputMiddleware::wrap($api),
|
||||
'query-compatible-input'
|
||||
);
|
||||
}
|
||||
|
||||
private function addInvocationId()
|
||||
{
|
||||
// Add invocation id to each request
|
||||
@@ -503,24 +566,32 @@ class AwsClient implements AwsClientInterface
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the `builder` middleware such that a client's endpoint
|
||||
* provider and endpoint resolution arguments can be passed.
|
||||
*/
|
||||
private function addRequestBuilder()
|
||||
private function addAuthSelectionMiddleware()
|
||||
{
|
||||
$handlerList = $this->getHandlerList();
|
||||
$serializer = $this->serializer;
|
||||
$endpointProvider = $this->endpointProvider;
|
||||
$list = $this->getHandlerList();
|
||||
|
||||
$list->prependBuild(
|
||||
AuthSelectionMiddleware::wrap(
|
||||
$this->authSchemeResolver,
|
||||
$this->getApi()
|
||||
),
|
||||
'auth-selection'
|
||||
);
|
||||
}
|
||||
|
||||
private function addEndpointV2Middleware()
|
||||
{
|
||||
$list = $this->getHandlerList();
|
||||
$endpointArgs = $this->getEndpointProviderArgs();
|
||||
|
||||
$handlerList->prependBuild(
|
||||
Middleware::requestBuilder(
|
||||
$serializer,
|
||||
$endpointProvider,
|
||||
$endpointArgs
|
||||
$list->prependBuild(
|
||||
EndpointV2Middleware::wrap(
|
||||
$this->endpointProvider,
|
||||
$this->getApi(),
|
||||
$endpointArgs,
|
||||
$this->credentialProvider
|
||||
),
|
||||
'builderV2'
|
||||
'endpoint-resolution'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -538,7 +609,7 @@ class AwsClient implements AwsClientInterface
|
||||
if (!empty($paramDefinitions = $api->getClientContextParams())) {
|
||||
foreach($paramDefinitions as $paramName => $paramValue) {
|
||||
if (isset($args[$paramName])) {
|
||||
$result[$paramName] = $args[$paramName];
|
||||
$resolvedParams[$paramName] = $args[$paramName];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -548,13 +619,18 @@ class AwsClient implements AwsClientInterface
|
||||
/**
|
||||
* Retrieves and sets default values used for endpoint resolution.
|
||||
*/
|
||||
private function setClientBuiltIns($args)
|
||||
private function setClientBuiltIns($args, $resolvedConfig)
|
||||
{
|
||||
$builtIns = [];
|
||||
$config = $this->getConfig();
|
||||
$config = $resolvedConfig['config'];
|
||||
$service = $args['service'];
|
||||
|
||||
$builtIns['SDK::Endpoint'] = isset($args['endpoint']) ? $args['endpoint'] : null;
|
||||
$builtIns['SDK::Endpoint'] = null;
|
||||
if (!empty($args['endpoint'])) {
|
||||
$builtIns['SDK::Endpoint'] = $args['endpoint'];
|
||||
} elseif (isset($config['configured_endpoint_url'])) {
|
||||
$builtIns['SDK::Endpoint'] = (string) $this->getEndpoint();
|
||||
}
|
||||
$builtIns['AWS::Region'] = $this->getRegion();
|
||||
$builtIns['AWS::UseFIPS'] = $config['use_fips_endpoint']->isUseFipsEndpoint();
|
||||
$builtIns['AWS::UseDualStack'] = $config['use_dual_stack_endpoint']->isUseDualstackEndpoint();
|
||||
@@ -567,6 +643,8 @@ class AwsClient implements AwsClientInterface
|
||||
$builtIns['AWS::S3::ForcePathStyle'] = $config['use_path_style_endpoint'];
|
||||
$builtIns['AWS::S3::DisableMultiRegionAccessPoints'] = $config['disable_multiregion_access_points'];
|
||||
}
|
||||
$builtIns['AWS::Auth::AccountIdEndpointMode'] = $resolvedConfig['account_id_endpoint_mode'];
|
||||
|
||||
$this->clientBuiltIns += $builtIns;
|
||||
}
|
||||
|
||||
@@ -639,7 +717,7 @@ class AwsClient implements AwsClientInterface
|
||||
public static function applyDocFilters(array $api, array $docs)
|
||||
{
|
||||
$aliases = \Aws\load_compiled_json(__DIR__ . '/data/aliases.json');
|
||||
$serviceId = $api['metadata']['serviceId'];
|
||||
$serviceId = $api['metadata']['serviceId'] ?? '';
|
||||
$version = $api['metadata']['apiVersion'];
|
||||
|
||||
// Replace names for any operations with SDK aliases
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace Aws\B2bi;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS B2B Data Interchange** service.
|
||||
* @method \Aws\Result createCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result createPartnership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPartnershipAsync(array $args = [])
|
||||
* @method \Aws\Result createProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
|
||||
* @method \Aws\Result createTransformer(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createTransformerAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result deletePartnership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePartnershipAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTransformer(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTransformerAsync(array $args = [])
|
||||
* @method \Aws\Result getCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result getPartnership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPartnershipAsync(array $args = [])
|
||||
* @method \Aws\Result getProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProfileAsync(array $args = [])
|
||||
* @method \Aws\Result getTransformer(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTransformerAsync(array $args = [])
|
||||
* @method \Aws\Result getTransformerJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTransformerJobAsync(array $args = [])
|
||||
* @method \Aws\Result listCapabilities(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCapabilitiesAsync(array $args = [])
|
||||
* @method \Aws\Result listPartnerships(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPartnershipsAsync(array $args = [])
|
||||
* @method \Aws\Result listProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listTransformers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTransformersAsync(array $args = [])
|
||||
* @method \Aws\Result startTransformerJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startTransformerJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result testMapping(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise testMappingAsync(array $args = [])
|
||||
* @method \Aws\Result testParsing(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise testParsingAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result updatePartnership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePartnershipAsync(array $args = [])
|
||||
* @method \Aws\Result updateProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateProfileAsync(array $args = [])
|
||||
* @method \Aws\Result updateTransformer(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateTransformerAsync(array $args = [])
|
||||
*/
|
||||
class B2biClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\B2bi\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS B2B Data Interchange** service.
|
||||
*/
|
||||
class B2biException extends AwsException {}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
namespace Aws\BCMDataExports;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Billing and Cost Management Data Exports** service.
|
||||
* @method \Aws\Result createExport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createExportAsync(array $args = [])
|
||||
* @method \Aws\Result deleteExport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteExportAsync(array $args = [])
|
||||
* @method \Aws\Result getExecution(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getExecutionAsync(array $args = [])
|
||||
* @method \Aws\Result getExport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getExportAsync(array $args = [])
|
||||
* @method \Aws\Result getTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTableAsync(array $args = [])
|
||||
* @method \Aws\Result listExecutions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listExecutionsAsync(array $args = [])
|
||||
* @method \Aws\Result listExports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listExportsAsync(array $args = [])
|
||||
* @method \Aws\Result listTables(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTablesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateExport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateExportAsync(array $args = [])
|
||||
*/
|
||||
class BCMDataExportsClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\BCMDataExports\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS Billing and Cost Management Data Exports** service.
|
||||
*/
|
||||
class BCMDataExportsException extends AwsException {}
|
||||
@@ -21,6 +21,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createLogicallyAirGappedBackupVaultAsync(array $args = [])
|
||||
* @method \Aws\Result createReportPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createReportPlanAsync(array $args = [])
|
||||
* @method \Aws\Result createRestoreTestingPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRestoreTestingPlanAsync(array $args = [])
|
||||
* @method \Aws\Result createRestoreTestingSelection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRestoreTestingSelectionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteBackupPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteBackupPlanAsync(array $args = [])
|
||||
* @method \Aws\Result deleteBackupSelection(array $args = [])
|
||||
@@ -39,6 +43,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRecoveryPointAsync(array $args = [])
|
||||
* @method \Aws\Result deleteReportPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteReportPlanAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRestoreTestingPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRestoreTestingPlanAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRestoreTestingSelection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRestoreTestingSelectionAsync(array $args = [])
|
||||
* @method \Aws\Result describeBackupJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeBackupJobAsync(array $args = [])
|
||||
* @method \Aws\Result describeBackupVault(array $args = [])
|
||||
@@ -83,8 +91,18 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getLegalHoldAsync(array $args = [])
|
||||
* @method \Aws\Result getRecoveryPointRestoreMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRecoveryPointRestoreMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result getRestoreJobMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRestoreJobMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result getRestoreTestingInferredMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRestoreTestingInferredMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result getRestoreTestingPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRestoreTestingPlanAsync(array $args = [])
|
||||
* @method \Aws\Result getRestoreTestingSelection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRestoreTestingSelectionAsync(array $args = [])
|
||||
* @method \Aws\Result getSupportedResourceTypes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSupportedResourceTypesAsync(array $args = [])
|
||||
* @method \Aws\Result listBackupJobSummaries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBackupJobSummariesAsync(array $args = [])
|
||||
* @method \Aws\Result listBackupJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBackupJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listBackupPlanTemplates(array $args = [])
|
||||
@@ -97,6 +115,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listBackupSelectionsAsync(array $args = [])
|
||||
* @method \Aws\Result listBackupVaults(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBackupVaultsAsync(array $args = [])
|
||||
* @method \Aws\Result listCopyJobSummaries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCopyJobSummariesAsync(array $args = [])
|
||||
* @method \Aws\Result listCopyJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCopyJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listFrameworks(array $args = [])
|
||||
@@ -117,8 +137,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listReportJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listReportPlans(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listReportPlansAsync(array $args = [])
|
||||
* @method \Aws\Result listRestoreJobSummaries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRestoreJobSummariesAsync(array $args = [])
|
||||
* @method \Aws\Result listRestoreJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRestoreJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listRestoreJobsByProtectedResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRestoreJobsByProtectedResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listRestoreTestingPlans(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRestoreTestingPlansAsync(array $args = [])
|
||||
* @method \Aws\Result listRestoreTestingSelections(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRestoreTestingSelectionsAsync(array $args = [])
|
||||
* @method \Aws\Result listTags(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
|
||||
* @method \Aws\Result putBackupVaultAccessPolicy(array $args = [])
|
||||
@@ -127,6 +155,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise putBackupVaultLockConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result putBackupVaultNotifications(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putBackupVaultNotificationsAsync(array $args = [])
|
||||
* @method \Aws\Result putRestoreValidationResult(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putRestoreValidationResultAsync(array $args = [])
|
||||
* @method \Aws\Result startBackupJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startBackupJobAsync(array $args = [])
|
||||
* @method \Aws\Result startCopyJob(array $args = [])
|
||||
@@ -153,5 +183,9 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateRegionSettingsAsync(array $args = [])
|
||||
* @method \Aws\Result updateReportPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateReportPlanAsync(array $args = [])
|
||||
* @method \Aws\Result updateRestoreTestingPlan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRestoreTestingPlanAsync(array $args = [])
|
||||
* @method \Aws\Result updateRestoreTestingSelection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRestoreTestingSelectionAsync(array $args = [])
|
||||
*/
|
||||
class BackupClient extends AwsClient {}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
namespace Aws\BackupStorage;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Backup Storage** service.
|
||||
* @method \Aws\Result deleteObject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteObjectAsync(array $args = [])
|
||||
* @method \Aws\Result getChunk(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getChunkAsync(array $args = [])
|
||||
* @method \Aws\Result getObjectMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getObjectMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result listChunks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listChunksAsync(array $args = [])
|
||||
* @method \Aws\Result listObjects(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listObjectsAsync(array $args = [])
|
||||
* @method \Aws\Result notifyObjectComplete(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise notifyObjectCompleteAsync(array $args = [])
|
||||
* @method \Aws\Result putChunk(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putChunkAsync(array $args = [])
|
||||
* @method \Aws\Result putObject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putObjectAsync(array $args = [])
|
||||
* @method \Aws\Result startObject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startObjectAsync(array $args = [])
|
||||
*/
|
||||
class BackupStorageClient extends AwsClient {}
|
||||
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
namespace Aws\BackupStorage\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS Backup Storage** service.
|
||||
*/
|
||||
class BackupStorageException extends AwsException {}
|
||||
@@ -31,6 +31,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeJobsAsync(array $args = [])
|
||||
* @method \Aws\Result describeSchedulingPolicies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = [])
|
||||
* @method \Aws\Result getJobQueueSnapshot(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getJobQueueSnapshotAsync(array $args = [])
|
||||
* @method \Aws\Result listJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listSchedulingPolicies(array $args = [])
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
namespace Aws\Bedrock;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon Bedrock** service.
|
||||
* @method \Aws\Result createEvaluationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createEvaluationJobAsync(array $args = [])
|
||||
* @method \Aws\Result createGuardrail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createGuardrailAsync(array $args = [])
|
||||
* @method \Aws\Result createGuardrailVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createGuardrailVersionAsync(array $args = [])
|
||||
* @method \Aws\Result createModelCopyJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createModelCopyJobAsync(array $args = [])
|
||||
* @method \Aws\Result createModelCustomizationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createModelCustomizationJobAsync(array $args = [])
|
||||
* @method \Aws\Result createProvisionedModelThroughput(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createProvisionedModelThroughputAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCustomModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteCustomModelAsync(array $args = [])
|
||||
* @method \Aws\Result deleteGuardrail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteGuardrailAsync(array $args = [])
|
||||
* @method \Aws\Result deleteModelInvocationLoggingConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteModelInvocationLoggingConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
|
||||
* @method \Aws\Result getCustomModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCustomModelAsync(array $args = [])
|
||||
* @method \Aws\Result getEvaluationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getEvaluationJobAsync(array $args = [])
|
||||
* @method \Aws\Result getFoundationModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFoundationModelAsync(array $args = [])
|
||||
* @method \Aws\Result getGuardrail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGuardrailAsync(array $args = [])
|
||||
* @method \Aws\Result getModelCopyJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getModelCopyJobAsync(array $args = [])
|
||||
* @method \Aws\Result getModelCustomizationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getModelCustomizationJobAsync(array $args = [])
|
||||
* @method \Aws\Result getModelInvocationLoggingConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getModelInvocationLoggingConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getProvisionedModelThroughput(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProvisionedModelThroughputAsync(array $args = [])
|
||||
* @method \Aws\Result listCustomModels(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCustomModelsAsync(array $args = [])
|
||||
* @method \Aws\Result listEvaluationJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEvaluationJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listFoundationModels(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFoundationModelsAsync(array $args = [])
|
||||
* @method \Aws\Result listGuardrails(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listGuardrailsAsync(array $args = [])
|
||||
* @method \Aws\Result listModelCopyJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listModelCopyJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listModelCustomizationJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listModelCustomizationJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listProvisionedModelThroughputs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listProvisionedModelThroughputsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result putModelInvocationLoggingConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putModelInvocationLoggingConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result stopEvaluationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopEvaluationJobAsync(array $args = [])
|
||||
* @method \Aws\Result stopModelCustomizationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopModelCustomizationJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateGuardrail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateGuardrailAsync(array $args = [])
|
||||
* @method \Aws\Result updateProvisionedModelThroughput(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateProvisionedModelThroughputAsync(array $args = [])
|
||||
*/
|
||||
class BedrockClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\Bedrock\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Amazon Bedrock** service.
|
||||
*/
|
||||
class BedrockException extends AwsException {}
|
||||
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
namespace Aws\BedrockAgent;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Agents for Amazon Bedrock** service.
|
||||
* @method \Aws\Result associateAgentKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateAgentKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result createAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAgentAsync(array $args = [])
|
||||
* @method \Aws\Result createAgentActionGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAgentActionGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createAgentAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAgentAliasAsync(array $args = [])
|
||||
* @method \Aws\Result createDataSource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createDataSourceAsync(array $args = [])
|
||||
* @method \Aws\Result createFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createFlowAsync(array $args = [])
|
||||
* @method \Aws\Result createFlowAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createFlowAliasAsync(array $args = [])
|
||||
* @method \Aws\Result createFlowVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createFlowVersionAsync(array $args = [])
|
||||
* @method \Aws\Result createKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result createPrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPromptAsync(array $args = [])
|
||||
* @method \Aws\Result createPromptVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPromptVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAgentAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAgentActionGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAgentActionGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAgentAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAgentAliasAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAgentVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAgentVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDataSource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDataSourceAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFlowAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFlowAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFlowAliasAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFlowVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFlowVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result deletePrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePromptAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateAgentKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateAgentKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result getAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentAsync(array $args = [])
|
||||
* @method \Aws\Result getAgentActionGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentActionGroupAsync(array $args = [])
|
||||
* @method \Aws\Result getAgentAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentAliasAsync(array $args = [])
|
||||
* @method \Aws\Result getAgentKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result getAgentVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentVersionAsync(array $args = [])
|
||||
* @method \Aws\Result getDataSource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
|
||||
* @method \Aws\Result getFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFlowAsync(array $args = [])
|
||||
* @method \Aws\Result getFlowAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFlowAliasAsync(array $args = [])
|
||||
* @method \Aws\Result getFlowVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFlowVersionAsync(array $args = [])
|
||||
* @method \Aws\Result getIngestionJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getIngestionJobAsync(array $args = [])
|
||||
* @method \Aws\Result getKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result getPrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPromptAsync(array $args = [])
|
||||
* @method \Aws\Result listAgentActionGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentActionGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listAgentAliases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentAliasesAsync(array $args = [])
|
||||
* @method \Aws\Result listAgentKnowledgeBases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentKnowledgeBasesAsync(array $args = [])
|
||||
* @method \Aws\Result listAgentVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listAgents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentsAsync(array $args = [])
|
||||
* @method \Aws\Result listDataSources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listDataSourcesAsync(array $args = [])
|
||||
* @method \Aws\Result listFlowAliases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFlowAliasesAsync(array $args = [])
|
||||
* @method \Aws\Result listFlowVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFlowVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listFlows(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFlowsAsync(array $args = [])
|
||||
* @method \Aws\Result listIngestionJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listIngestionJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listKnowledgeBases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listKnowledgeBasesAsync(array $args = [])
|
||||
* @method \Aws\Result listPrompts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPromptsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result prepareAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise prepareAgentAsync(array $args = [])
|
||||
* @method \Aws\Result prepareFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise prepareFlowAsync(array $args = [])
|
||||
* @method \Aws\Result startIngestionJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startIngestionJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAgentAsync(array $args = [])
|
||||
* @method \Aws\Result updateAgentActionGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAgentActionGroupAsync(array $args = [])
|
||||
* @method \Aws\Result updateAgentAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAgentAliasAsync(array $args = [])
|
||||
* @method \Aws\Result updateAgentKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAgentKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result updateDataSource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateFlowAsync(array $args = [])
|
||||
* @method \Aws\Result updateFlowAlias(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateFlowAliasAsync(array $args = [])
|
||||
* @method \Aws\Result updateKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result updatePrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePromptAsync(array $args = [])
|
||||
*/
|
||||
class BedrockAgentClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\BedrockAgent\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Agents for Amazon Bedrock** service.
|
||||
*/
|
||||
class BedrockAgentException extends AwsException {}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Aws\BedrockAgentRuntime;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Agents for Amazon Bedrock Runtime** service.
|
||||
* @method \Aws\Result deleteAgentMemory(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAgentMemoryAsync(array $args = [])
|
||||
* @method \Aws\Result getAgentMemory(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAgentMemoryAsync(array $args = [])
|
||||
* @method \Aws\Result invokeAgent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise invokeAgentAsync(array $args = [])
|
||||
* @method \Aws\Result invokeFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise invokeFlowAsync(array $args = [])
|
||||
* @method \Aws\Result retrieve(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise retrieveAsync(array $args = [])
|
||||
* @method \Aws\Result retrieveAndGenerate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise retrieveAndGenerateAsync(array $args = [])
|
||||
*/
|
||||
class BedrockAgentRuntimeClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\BedrockAgentRuntime\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Agents for Amazon Bedrock Runtime** service.
|
||||
*/
|
||||
class BedrockAgentRuntimeException extends AwsException {}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace Aws\BedrockRuntime;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon Bedrock Runtime** service.
|
||||
* @method \Aws\Result applyGuardrail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise applyGuardrailAsync(array $args = [])
|
||||
* @method \Aws\Result converse(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise converseAsync(array $args = [])
|
||||
* @method \Aws\Result converseStream(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise converseStreamAsync(array $args = [])
|
||||
* @method \Aws\Result invokeModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise invokeModelAsync(array $args = [])
|
||||
* @method \Aws\Result invokeModelWithResponseStream(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise invokeModelWithResponseStreamAsync(array $args = [])
|
||||
*/
|
||||
class BedrockRuntimeClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\BedrockRuntime\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Amazon Bedrock Runtime** service.
|
||||
*/
|
||||
class BedrockRuntimeException extends AwsException {}
|
||||
@@ -33,6 +33,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateAccountsAsync(array $args = [])
|
||||
* @method \Aws\Result disassociatePricingRules(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociatePricingRulesAsync(array $args = [])
|
||||
* @method \Aws\Result getBillingGroupCostReport(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getBillingGroupCostReportAsync(array $args = [])
|
||||
* @method \Aws\Result listAccountAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAccountAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listBillingGroupCostReports(array $args = [])
|
||||
|
||||
@@ -43,6 +43,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeSubscribersForNotificationAsync(array $args = [])
|
||||
* @method \Aws\Result executeBudgetAction(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise executeBudgetActionAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateBudget(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateBudgetAsync(array $args = [])
|
||||
* @method \Aws\Result updateBudgetAction(array $args = [])
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
namespace Aws\Chatbot;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **chatbot** service.
|
||||
* @method \Aws\Result createChimeWebhookConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createChimeWebhookConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result createMicrosoftTeamsChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createMicrosoftTeamsChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result createSlackChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createSlackChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteChimeWebhookConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteChimeWebhookConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMicrosoftTeamsChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMicrosoftTeamsChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMicrosoftTeamsConfiguredTeam(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMicrosoftTeamsConfiguredTeamAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMicrosoftTeamsUserIdentity(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMicrosoftTeamsUserIdentityAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSlackChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSlackChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSlackUserIdentity(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSlackUserIdentityAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSlackWorkspaceAuthorization(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSlackWorkspaceAuthorizationAsync(array $args = [])
|
||||
* @method \Aws\Result describeChimeWebhookConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeChimeWebhookConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result describeSlackChannelConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeSlackChannelConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result describeSlackUserIdentities(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeSlackUserIdentitiesAsync(array $args = [])
|
||||
* @method \Aws\Result describeSlackWorkspaces(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeSlackWorkspacesAsync(array $args = [])
|
||||
* @method \Aws\Result getAccountPreferences(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAccountPreferencesAsync(array $args = [])
|
||||
* @method \Aws\Result getMicrosoftTeamsChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMicrosoftTeamsChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result listMicrosoftTeamsChannelConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMicrosoftTeamsChannelConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listMicrosoftTeamsConfiguredTeams(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMicrosoftTeamsConfiguredTeamsAsync(array $args = [])
|
||||
* @method \Aws\Result listMicrosoftTeamsUserIdentities(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMicrosoftTeamsUserIdentitiesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateAccountPreferences(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAccountPreferencesAsync(array $args = [])
|
||||
* @method \Aws\Result updateChimeWebhookConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateChimeWebhookConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateMicrosoftTeamsChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateMicrosoftTeamsChannelConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateSlackChannelConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSlackChannelConfigurationAsync(array $args = [])
|
||||
*/
|
||||
class ChatbotClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\Chatbot\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **chatbot** service.
|
||||
*/
|
||||
class ChatbotException extends AwsException {}
|
||||
@@ -15,26 +15,48 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createMediaInsightsPipelineConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result createMediaLiveConnectorPipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createMediaLiveConnectorPipelineAsync(array $args = [])
|
||||
* @method \Aws\Result createMediaPipelineKinesisVideoStreamPool(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createMediaPipelineKinesisVideoStreamPoolAsync(array $args = [])
|
||||
* @method \Aws\Result createMediaStreamPipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createMediaStreamPipelineAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMediaCapturePipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMediaCapturePipelineAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMediaInsightsPipelineConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMediaInsightsPipelineConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMediaPipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMediaPipelineAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMediaPipelineKinesisVideoStreamPool(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMediaPipelineKinesisVideoStreamPoolAsync(array $args = [])
|
||||
* @method \Aws\Result getMediaCapturePipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMediaCapturePipelineAsync(array $args = [])
|
||||
* @method \Aws\Result getMediaInsightsPipelineConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMediaInsightsPipelineConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getMediaPipeline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMediaPipelineAsync(array $args = [])
|
||||
* @method \Aws\Result getMediaPipelineKinesisVideoStreamPool(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMediaPipelineKinesisVideoStreamPoolAsync(array $args = [])
|
||||
* @method \Aws\Result getSpeakerSearchTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSpeakerSearchTaskAsync(array $args = [])
|
||||
* @method \Aws\Result getVoiceToneAnalysisTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getVoiceToneAnalysisTaskAsync(array $args = [])
|
||||
* @method \Aws\Result listMediaCapturePipelines(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMediaCapturePipelinesAsync(array $args = [])
|
||||
* @method \Aws\Result listMediaInsightsPipelineConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMediaInsightsPipelineConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listMediaPipelineKinesisVideoStreamPools(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMediaPipelineKinesisVideoStreamPoolsAsync(array $args = [])
|
||||
* @method \Aws\Result listMediaPipelines(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMediaPipelinesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result startSpeakerSearchTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startSpeakerSearchTaskAsync(array $args = [])
|
||||
* @method \Aws\Result startVoiceToneAnalysisTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startVoiceToneAnalysisTaskAsync(array $args = [])
|
||||
* @method \Aws\Result stopSpeakerSearchTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopSpeakerSearchTaskAsync(array $args = [])
|
||||
* @method \Aws\Result stopVoiceToneAnalysisTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopVoiceToneAnalysisTaskAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
@@ -43,5 +65,7 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateMediaInsightsPipelineConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updateMediaInsightsPipelineStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateMediaInsightsPipelineStatusAsync(array $args = [])
|
||||
* @method \Aws\Result updateMediaPipelineKinesisVideoStreamPool(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateMediaPipelineKinesisVideoStreamPoolAsync(array $args = [])
|
||||
*/
|
||||
class ChimeSDKMediaPipelinesClient extends AwsClient {}
|
||||
|
||||
@@ -9,46 +9,84 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetCollaborationAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetSchema(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetSchemaAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetSchemaAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetSchemaAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result createAnalysisTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result createCollaboration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createCollaborationAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredAudienceModelAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredAudienceModelAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredTableAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredTableAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredTableAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredTableAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredTableAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredTableAssociationAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredTableAssociationAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result createIdMappingTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createIdMappingTableAsync(array $args = [])
|
||||
* @method \Aws\Result createIdNamespaceAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createIdNamespaceAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result createMembership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createMembershipAsync(array $args = [])
|
||||
* @method \Aws\Result createPrivacyBudgetTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPrivacyBudgetTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAnalysisTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCollaboration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteCollaborationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredAudienceModelAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredAudienceModelAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredTableAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredTableAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredTableAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredTableAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredTableAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredTableAssociationAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredTableAssociationAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result deleteIdMappingTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteIdMappingTableAsync(array $args = [])
|
||||
* @method \Aws\Result deleteIdNamespaceAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteIdNamespaceAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMember(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMemberAsync(array $args = [])
|
||||
* @method \Aws\Result deleteMembership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMembershipAsync(array $args = [])
|
||||
* @method \Aws\Result deletePrivacyBudgetTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePrivacyBudgetTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getAnalysisTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getCollaboration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCollaborationAsync(array $args = [])
|
||||
* @method \Aws\Result getCollaborationAnalysisTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCollaborationAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getCollaborationConfiguredAudienceModelAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCollaborationConfiguredAudienceModelAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getCollaborationIdNamespaceAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCollaborationIdNamespaceAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getCollaborationPrivacyBudgetTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCollaborationPrivacyBudgetTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredAudienceModelAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredAudienceModelAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredTableAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredTableAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredTableAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredTableAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredTableAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredTableAssociationAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredTableAssociationAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result getIdMappingTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getIdMappingTableAsync(array $args = [])
|
||||
* @method \Aws\Result getIdNamespaceAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getIdNamespaceAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getMembership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMembershipAsync(array $args = [])
|
||||
* @method \Aws\Result getPrivacyBudgetTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPrivacyBudgetTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getProtectedQuery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProtectedQueryAsync(array $args = [])
|
||||
* @method \Aws\Result getSchema(array $args = [])
|
||||
@@ -59,22 +97,44 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listAnalysisTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborationAnalysisTemplates(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationAnalysisTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborationConfiguredAudienceModelAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationConfiguredAudienceModelAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborationIdNamespaceAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationIdNamespaceAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborationPrivacyBudgetTemplates(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationPrivacyBudgetTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborationPrivacyBudgets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationPrivacyBudgetsAsync(array $args = [])
|
||||
* @method \Aws\Result listCollaborations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCollaborationsAsync(array $args = [])
|
||||
* @method \Aws\Result listConfiguredAudienceModelAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConfiguredAudienceModelAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listConfiguredTableAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConfiguredTableAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listConfiguredTables(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConfiguredTablesAsync(array $args = [])
|
||||
* @method \Aws\Result listIdMappingTables(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listIdMappingTablesAsync(array $args = [])
|
||||
* @method \Aws\Result listIdNamespaceAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listIdNamespaceAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listMembers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMembersAsync(array $args = [])
|
||||
* @method \Aws\Result listMemberships(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listMembershipsAsync(array $args = [])
|
||||
* @method \Aws\Result listPrivacyBudgetTemplates(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPrivacyBudgetTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listPrivacyBudgets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPrivacyBudgetsAsync(array $args = [])
|
||||
* @method \Aws\Result listProtectedQueries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listProtectedQueriesAsync(array $args = [])
|
||||
* @method \Aws\Result listSchemas(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSchemasAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result populateIdMappingTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise populateIdMappingTableAsync(array $args = [])
|
||||
* @method \Aws\Result previewPrivacyImpact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise previewPrivacyImpactAsync(array $args = [])
|
||||
* @method \Aws\Result startProtectedQuery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startProtectedQueryAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
@@ -85,14 +145,24 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateAnalysisTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result updateCollaboration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateCollaborationAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredAudienceModelAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredAudienceModelAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredTableAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredTableAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredTableAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredTableAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredTableAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredTableAssociationAnalysisRule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredTableAssociationAnalysisRuleAsync(array $args = [])
|
||||
* @method \Aws\Result updateIdMappingTable(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateIdMappingTableAsync(array $args = [])
|
||||
* @method \Aws\Result updateIdNamespaceAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateIdNamespaceAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result updateMembership(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateMembershipAsync(array $args = [])
|
||||
* @method \Aws\Result updatePrivacyBudgetTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePrivacyBudgetTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result updateProtectedQuery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateProtectedQueryAsync(array $args = [])
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
namespace Aws\CleanRoomsML;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **cleanrooms-ml** service.
|
||||
* @method \Aws\Result createAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result createConfiguredAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConfiguredAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result createTrainingDataset(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createTrainingDatasetAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAudienceGenerationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAudienceGenerationJobAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConfiguredAudienceModelPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConfiguredAudienceModelPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTrainingDataset(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTrainingDatasetAsync(array $args = [])
|
||||
* @method \Aws\Result getAudienceGenerationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAudienceGenerationJobAsync(array $args = [])
|
||||
* @method \Aws\Result getAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredAudienceModelAsync(array $args = [])
|
||||
* @method \Aws\Result getConfiguredAudienceModelPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConfiguredAudienceModelPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getTrainingDataset(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTrainingDatasetAsync(array $args = [])
|
||||
* @method \Aws\Result listAudienceExportJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAudienceExportJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listAudienceGenerationJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAudienceGenerationJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listAudienceModels(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAudienceModelsAsync(array $args = [])
|
||||
* @method \Aws\Result listConfiguredAudienceModels(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConfiguredAudienceModelsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listTrainingDatasets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTrainingDatasetsAsync(array $args = [])
|
||||
* @method \Aws\Result putConfiguredAudienceModelPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putConfiguredAudienceModelPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result startAudienceExportJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startAudienceExportJobAsync(array $args = [])
|
||||
* @method \Aws\Result startAudienceGenerationJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startAudienceGenerationJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateConfiguredAudienceModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateConfiguredAudienceModelAsync(array $args = [])
|
||||
*/
|
||||
class CleanRoomsMLClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\CleanRoomsML\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **cleanrooms-ml** service.
|
||||
*/
|
||||
class CleanRoomsMLException extends AwsException {}
|
||||
@@ -4,6 +4,9 @@ namespace Aws;
|
||||
use Aws\Api\ApiProvider;
|
||||
use Aws\Api\Service;
|
||||
use Aws\Api\Validator;
|
||||
use Aws\Auth\AuthResolver;
|
||||
use Aws\Auth\AuthSchemeResolver;
|
||||
use Aws\Auth\AuthSchemeResolverInterface;
|
||||
use Aws\ClientSideMonitoring\ApiCallAttemptMonitoringMiddleware;
|
||||
use Aws\ClientSideMonitoring\ApiCallMonitoringMiddleware;
|
||||
use Aws\ClientSideMonitoring\Configuration;
|
||||
@@ -83,17 +86,26 @@ class ClientResolver
|
||||
'doc' => 'Set to true to disable host prefix injection logic for services that use it. This disables the entire prefix injection, including the portions supplied by user-defined parameters. Setting this flag will have no effect on services that do not use host prefix injection.',
|
||||
'default' => false,
|
||||
],
|
||||
'ignore_configured_endpoint_urls' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['bool'],
|
||||
'doc' => 'Set to true to disable endpoint urls configured using `AWS_ENDPOINT_URL` and `endpoint_url` shared config option.',
|
||||
'fn' => [__CLASS__, '_apply_ignore_configured_endpoint_urls'],
|
||||
'default' => [__CLASS__, '_default_ignore_configured_endpoint_urls'],
|
||||
],
|
||||
'endpoint' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['string'],
|
||||
'doc' => 'The full URI of the webservice. This is only required when connecting to a custom endpoint (e.g., a local version of S3).',
|
||||
'fn' => [__CLASS__, '_apply_endpoint'],
|
||||
'default' => [__CLASS__, '_default_endpoint']
|
||||
],
|
||||
'region' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['string'],
|
||||
'required' => [__CLASS__, '_missing_region'],
|
||||
'doc' => 'Region to connect to. See http://docs.aws.amazon.com/general/latest/gr/rande.html for a list of available regions.',
|
||||
'fn' => [__CLASS__, '_apply_region'],
|
||||
'default' => [__CLASS__, '_default_region']
|
||||
],
|
||||
'version' => [
|
||||
'type' => 'value',
|
||||
@@ -144,6 +156,7 @@ class ClientResolver
|
||||
],
|
||||
'serializer' => [
|
||||
'default' => [__CLASS__, '_default_serializer'],
|
||||
'fn' => [__CLASS__, '_apply_serializer'],
|
||||
'internal' => true,
|
||||
'type' => 'value',
|
||||
'valid' => ['callable'],
|
||||
@@ -186,6 +199,12 @@ class ClientResolver
|
||||
'fn' => [__CLASS__, '_apply_token'],
|
||||
'default' => [__CLASS__, '_default_token_provider'],
|
||||
],
|
||||
'auth_scheme_resolver' => [
|
||||
'type' => 'value',
|
||||
'valid' => [AuthSchemeResolverInterface::class],
|
||||
'doc' => 'An instance of Aws\Auth\AuthSchemeResolverInterface which selects a modeled auth scheme and returns a signature version',
|
||||
'default' => [__CLASS__, '_default_auth_scheme_resolver'],
|
||||
],
|
||||
'endpoint_discovery' => [
|
||||
'type' => 'value',
|
||||
'valid' => [ConfigurationInterface::class, CacheInterface::class, 'array', 'callable'],
|
||||
@@ -260,6 +279,15 @@ class ClientResolver
|
||||
'fn' => [__CLASS__, '_apply_handler'],
|
||||
'default' => [__CLASS__, '_default_handler']
|
||||
],
|
||||
'app_id' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['string'],
|
||||
'doc' => 'app_id(AppId) is an optional application specific identifier that can be set.
|
||||
When set it will be appended to the User-Agent header of every request in the form of App/{AppId}.
|
||||
This value is also sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.',
|
||||
'fn' => [__CLASS__, '_apply_app_id'],
|
||||
'default' => [__CLASS__, '_default_app_id']
|
||||
],
|
||||
'ua_append' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['string', 'array'],
|
||||
@@ -280,13 +308,20 @@ class ClientResolver
|
||||
'doc' => 'Set to false to disable checking for shared aws config files usually located in \'~/.aws/config\' and \'~/.aws/credentials\'. This will be ignored if you set the \'profile\' setting.',
|
||||
'default' => true,
|
||||
],
|
||||
'suppress_php_deprecation_warning' => [
|
||||
'account_id_endpoint_mode' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['bool'],
|
||||
'doc' => 'Set to false to disable the deprecation warning of PHP versions 7.2.4 and below',
|
||||
'default' => false,
|
||||
'fn' => [__CLASS__, '_apply_suppress_php_deprecation_warning']
|
||||
'valid' => ['string'],
|
||||
'doc' => 'Decides whether account_id must a be a required resolved credentials property. If this configuration is set to disabled, then account_id is not required. If set to preferred a warning will be logged when account_id is not resolved, and when set to required an exception will be thrown if account_id is not resolved.',
|
||||
'default' => [__CLASS__, '_default_account_id_endpoint_mode'],
|
||||
'fn' => [__CLASS__, '_apply_account_id_endpoint_mode']
|
||||
],
|
||||
'sigv4a_signing_region_set' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['array', 'string'],
|
||||
'doc' => 'A comma-delimited list of supported regions sent in sigv4a requests.',
|
||||
'fn' => [__CLASS__, '_apply_sigv4a_signing_region_set'],
|
||||
'default' => [__CLASS__, '_default_sigv4a_signing_region_set']
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -540,10 +575,10 @@ class ClientResolver
|
||||
$value = $value();
|
||||
}
|
||||
if (!is_bool($value)) {
|
||||
throw new IAE(
|
||||
"Invalid configuration value provided for 'disable_request_compression'."
|
||||
. " value must be a bool."
|
||||
);
|
||||
throw new IAE(
|
||||
"Invalid configuration value provided for 'disable_request_compression'."
|
||||
. " value must be a bool."
|
||||
);
|
||||
}
|
||||
$args['config']['disable_request_compression'] = $value;
|
||||
}
|
||||
@@ -563,10 +598,10 @@ class ClientResolver
|
||||
}
|
||||
if (!is_int($value)
|
||||
|| (is_int($value)
|
||||
&& ($value < 0 || $value > 10485760))
|
||||
&& ($value < 0 || $value > 10485760))
|
||||
) {
|
||||
throw new IAE(" Invalid configuration value provided for 'min_compression_size_bytes'."
|
||||
. " value must be an integer between 0 and 10485760, inclusive.");
|
||||
. " value must be an integer between 0 and 10485760, inclusive.");
|
||||
}
|
||||
$args['config']['request_min_compression_size_bytes'] = $value;
|
||||
}
|
||||
@@ -596,8 +631,9 @@ class ClientResolver
|
||||
new Credentials(
|
||||
$value['key'],
|
||||
$value['secret'],
|
||||
isset($value['token']) ? $value['token'] : null,
|
||||
isset($value['expires']) ? $value['expires'] : null
|
||||
$value['token'] ?? null,
|
||||
$value['expires'] ?? null,
|
||||
$value['accountId'] ?? null
|
||||
)
|
||||
);
|
||||
} elseif ($value === false) {
|
||||
@@ -605,6 +641,7 @@ class ClientResolver
|
||||
new Credentials('', '')
|
||||
);
|
||||
$args['config']['signature_version'] = 'anonymous';
|
||||
$args['config']['configured_signature_version'] = true;
|
||||
} elseif ($value instanceof CacheInterface) {
|
||||
$args['credentials'] = CredentialProvider::defaultProvider($args);
|
||||
} else {
|
||||
@@ -634,7 +671,7 @@ class ClientResolver
|
||||
$args['token'] = TokenProvider::fromToken(
|
||||
new Token(
|
||||
$value['token'],
|
||||
isset($value['expires']) ? $value['expires'] : null
|
||||
$value['expires'] ?? null
|
||||
)
|
||||
);
|
||||
} elseif ($value instanceof CacheInterface) {
|
||||
@@ -718,9 +755,7 @@ class ClientResolver
|
||||
->getPartition($args['region'], $args['service']);
|
||||
}
|
||||
|
||||
$endpointPrefix = isset($args['api']['metadata']['endpointPrefix'])
|
||||
? $args['api']['metadata']['endpointPrefix']
|
||||
: $args['service'];
|
||||
$endpointPrefix = $args['api']['metadata']['endpointPrefix'] ?? $args['service'];
|
||||
|
||||
// Check region is a valid host label when it is being used to
|
||||
// generate an endpoint
|
||||
@@ -832,6 +867,11 @@ class ClientResolver
|
||||
return UseDualStackConfigProvider::defaultProvider($args);
|
||||
}
|
||||
|
||||
public static function _apply_serializer($value, array &$args, HandlerList $list)
|
||||
{
|
||||
$list->prependBuild(Middleware::requestBuilder($value), 'builder');
|
||||
}
|
||||
|
||||
public static function _apply_debug($value, array &$args, HandlerList $list)
|
||||
{
|
||||
if ($value !== false) {
|
||||
@@ -908,17 +948,43 @@ class ClientResolver
|
||||
);
|
||||
}
|
||||
|
||||
public static function _apply_app_id($value, array &$args)
|
||||
{
|
||||
// AppId should not be longer than 50 chars
|
||||
static $MAX_APP_ID_LENGTH = 50;
|
||||
if (strlen($value) > $MAX_APP_ID_LENGTH) {
|
||||
trigger_error("The provided or configured value for `AppId`, "
|
||||
."which is an user agent parameter, exceeds the maximum length of "
|
||||
."$MAX_APP_ID_LENGTH characters.", E_USER_WARNING);
|
||||
}
|
||||
|
||||
$args['app_id'] = $value;
|
||||
}
|
||||
|
||||
public static function _default_app_id(array $args)
|
||||
{
|
||||
return ConfigurationResolver::resolve(
|
||||
'sdk_ua_app_id',
|
||||
'',
|
||||
'string',
|
||||
$args
|
||||
);
|
||||
}
|
||||
|
||||
public static function _apply_user_agent($inputUserAgent, array &$args, HandlerList $list)
|
||||
{
|
||||
//Add SDK version
|
||||
// Add SDK version
|
||||
$userAgent = ['aws-sdk-php/' . Sdk::VERSION];
|
||||
|
||||
//If on HHVM add the HHVM version
|
||||
// User Agent Metadata
|
||||
$userAgent[] = 'ua/2.0';
|
||||
|
||||
// If on HHVM add the HHVM version
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$userAgent []= 'HHVM/' . HHVM_VERSION;
|
||||
}
|
||||
|
||||
//Add OS version
|
||||
// Add OS version
|
||||
$disabledFunctions = explode(',', ini_get('disable_functions'));
|
||||
if (function_exists('php_uname')
|
||||
&& !in_array('php_uname', $disabledFunctions, true)
|
||||
@@ -929,15 +995,15 @@ class ClientResolver
|
||||
}
|
||||
}
|
||||
|
||||
//Add the language version
|
||||
// Add the language version
|
||||
$userAgent []= 'lang/php#' . phpversion();
|
||||
|
||||
//Add exec environment if present
|
||||
// Add exec environment if present
|
||||
if ($executionEnvironment = getenv('AWS_EXECUTION_ENV')) {
|
||||
$userAgent []= $executionEnvironment;
|
||||
}
|
||||
|
||||
//Add endpoint discovery if set
|
||||
// Add endpoint discovery if set
|
||||
if (isset($args['endpoint_discovery'])) {
|
||||
if (($args['endpoint_discovery'] instanceof \Aws\EndpointDiscovery\Configuration
|
||||
&& $args['endpoint_discovery']->isEnabled())
|
||||
@@ -951,7 +1017,7 @@ class ClientResolver
|
||||
}
|
||||
}
|
||||
|
||||
//Add retry mode if set
|
||||
// Add retry mode if set
|
||||
if (isset($args['retries'])) {
|
||||
if ($args['retries'] instanceof \Aws\Retry\Configuration) {
|
||||
$userAgent []= 'cfg/retry-mode#' . $args["retries"]->getMode();
|
||||
@@ -961,7 +1027,13 @@ class ClientResolver
|
||||
$userAgent []= 'cfg/retry-mode#' . $args["retries"]["mode"];
|
||||
}
|
||||
}
|
||||
//Add the input to the end
|
||||
|
||||
// AppID Metadata
|
||||
if (!empty($args['app_id'])) {
|
||||
$userAgent[] = 'app/' . $args['app_id'];
|
||||
}
|
||||
|
||||
// Add the input to the end
|
||||
if ($inputUserAgent){
|
||||
if (!is_array($inputUserAgent)) {
|
||||
$inputUserAgent = [$inputUserAgent];
|
||||
@@ -999,6 +1071,11 @@ class ClientResolver
|
||||
|
||||
public static function _apply_endpoint($value, array &$args, HandlerList $list)
|
||||
{
|
||||
if (empty($value)) {
|
||||
unset($args['endpoint']);
|
||||
return;
|
||||
}
|
||||
|
||||
$args['endpoint'] = $value;
|
||||
}
|
||||
|
||||
@@ -1026,24 +1103,32 @@ class ClientResolver
|
||||
}
|
||||
}
|
||||
|
||||
public static function _apply_suppress_php_deprecation_warning($suppressWarning, array &$args) {
|
||||
if ($suppressWarning) {
|
||||
$args['suppress_php_deprecation_warning'] = true;
|
||||
} elseif (!empty($_ENV["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"])) {
|
||||
$args['suppress_php_deprecation_warning'] =
|
||||
$_ENV["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"];
|
||||
} elseif (!empty($_SERVER["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"])) {
|
||||
$args['suppress_php_deprecation_warning'] =
|
||||
$_SERVER["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"];
|
||||
} elseif (!empty(getenv("AWS_SUPPRESS_PHP_DEPRECATION_WARNING"))) {
|
||||
$args['suppress_php_deprecation_warning']
|
||||
= getenv("AWS_SUPPRESS_PHP_DEPRECATION_WARNING");
|
||||
public static function _default_account_id_endpoint_mode($args)
|
||||
{
|
||||
return ConfigurationResolver::resolve(
|
||||
'account_id_endpoint_mode',
|
||||
'preferred',
|
||||
'string',
|
||||
$args
|
||||
);
|
||||
}
|
||||
|
||||
public static function _apply_account_id_endpoint_mode($value, array &$args)
|
||||
{
|
||||
static $accountIdEndpointModes = ['disabled', 'required', 'preferred'];
|
||||
if (!in_array($value, $accountIdEndpointModes)) {
|
||||
throw new IAE(
|
||||
"The value provided for the config account_id_endpoint_mode is invalid."
|
||||
."Valid values are: " . implode(", ", $accountIdEndpointModes)
|
||||
);
|
||||
}
|
||||
|
||||
$args['account_id_endpoint_mode'] = $value;
|
||||
}
|
||||
|
||||
public static function _default_endpoint_provider(array $args)
|
||||
{
|
||||
$service = isset($args['api']) ? $args['api'] : null;
|
||||
$service = $args['api'] ?? null;
|
||||
$serviceName = isset($service) ? $service->getServiceName() : null;
|
||||
$apiVersion = isset($service) ? $service->getApiVersion() : null;
|
||||
|
||||
@@ -1077,6 +1162,11 @@ class ClientResolver
|
||||
return SignatureProvider::defaultProvider();
|
||||
}
|
||||
|
||||
public static function _default_auth_scheme_resolver(array $args)
|
||||
{
|
||||
return new AuthSchemeResolver($args['credentials'], $args['token']);
|
||||
}
|
||||
|
||||
public static function _default_signature_version(array &$args)
|
||||
{
|
||||
if (isset($args['config']['signature_version'])) {
|
||||
@@ -1132,20 +1222,109 @@ class ClientResolver
|
||||
'region' => $args['region'],
|
||||
]);
|
||||
|
||||
return isset($args['__partition_result']['signingRegion'])
|
||||
? $args['__partition_result']['signingRegion']
|
||||
: $args['region'];
|
||||
return $args['__partition_result']['signingRegion'] ?? $args['region'];
|
||||
}
|
||||
|
||||
public static function _apply_ignore_configured_endpoint_urls($value, array &$args)
|
||||
{
|
||||
$args['config']['ignore_configured_endpoint_urls'] = $value;
|
||||
}
|
||||
|
||||
public static function _default_ignore_configured_endpoint_urls(array &$args)
|
||||
{
|
||||
return ConfigurationResolver::resolve(
|
||||
'ignore_configured_endpoint_urls',
|
||||
false,
|
||||
'bool',
|
||||
$args
|
||||
);
|
||||
}
|
||||
|
||||
public static function _default_endpoint(array &$args)
|
||||
{
|
||||
if ($args['config']['ignore_configured_endpoint_urls']
|
||||
|| !self::isValidService($args['service'])
|
||||
) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$serviceIdentifier = \Aws\manifest($args['service'])['serviceIdentifier'];
|
||||
$value = ConfigurationResolver::resolve(
|
||||
'endpoint_url_' . $serviceIdentifier,
|
||||
'',
|
||||
'string',
|
||||
$args + [
|
||||
'ini_resolver_options' => [
|
||||
'section' => 'services',
|
||||
'subsection' => $serviceIdentifier,
|
||||
'key' => 'endpoint_url'
|
||||
]
|
||||
]
|
||||
);
|
||||
|
||||
if (empty($value)) {
|
||||
$value = ConfigurationResolver::resolve(
|
||||
'endpoint_url',
|
||||
'',
|
||||
'string',
|
||||
$args
|
||||
);
|
||||
}
|
||||
|
||||
if (!empty($value)) {
|
||||
$args['config']['configured_endpoint_url'] = true;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function _apply_sigv4a_signing_region_set($value, array &$args)
|
||||
{
|
||||
if (empty($value)) {
|
||||
$args['sigv4a_signing_region_set'] = null;
|
||||
} elseif (is_array($value)) {
|
||||
$args['sigv4a_signing_region_set'] = implode(', ', $value);
|
||||
} else {
|
||||
$args['sigv4a_signing_region_set'] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
public static function _default_sigv4a_signing_region_set(array &$args)
|
||||
{
|
||||
return ConfigurationResolver::resolve(
|
||||
'sigv4a_signing_region_set',
|
||||
'',
|
||||
'string'
|
||||
);
|
||||
}
|
||||
|
||||
public static function _apply_region($value, array &$args)
|
||||
{
|
||||
if (empty($value)) {
|
||||
self::_missing_region($args);
|
||||
}
|
||||
$args['region'] = $value;
|
||||
}
|
||||
|
||||
public static function _default_region(&$args)
|
||||
{
|
||||
return ConfigurationResolver::resolve('region', '', 'string');
|
||||
}
|
||||
|
||||
public static function _missing_region(array $args)
|
||||
{
|
||||
$service = isset($args['service']) ? $args['service'] : '';
|
||||
$service = $args['service'] ?? '';
|
||||
|
||||
$msg = <<<EOT
|
||||
Missing required client configuration options:
|
||||
|
||||
region: (string)
|
||||
|
||||
return <<<EOT
|
||||
A "region" configuration value is required for the "{$service}" service
|
||||
(e.g., "us-west-2"). A list of available public regions and endpoints can be
|
||||
found at http://docs.aws.amazon.com/general/latest/gr/rande.html.
|
||||
EOT;
|
||||
throw new IAE($msg);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1160,7 +1339,7 @@ EOT;
|
||||
$optionKeys = [
|
||||
'sts_regional_endpoints',
|
||||
's3_us_east_1_regional_endpoint',
|
||||
];
|
||||
];
|
||||
$configKeys = [
|
||||
'use_dual_stack_endpoint',
|
||||
'use_fips_endpoint',
|
||||
@@ -1192,15 +1371,14 @@ EOT;
|
||||
private function _apply_client_context_params(array $args)
|
||||
{
|
||||
if (isset($args['api'])
|
||||
&& !empty($args['api']->getClientContextParams()))
|
||||
&& !empty($args['api']->getClientContextParams()))
|
||||
{
|
||||
$clientContextParams = $args['api']->getClientContextParams();
|
||||
foreach($clientContextParams as $paramName => $paramDefinition) {
|
||||
$definition = [
|
||||
'type' => 'value',
|
||||
'valid' => [$paramDefinition['type']],
|
||||
'doc' => isset($paramDefinition['documentation']) ?
|
||||
$paramDefinition['documentation'] : null
|
||||
'doc' => $paramDefinition['documentation'] ?? null
|
||||
];
|
||||
$this->argDefinitions[$paramName] = $definition;
|
||||
|
||||
@@ -1227,7 +1405,7 @@ EOT;
|
||||
return false;
|
||||
}
|
||||
return is_dir(
|
||||
__DIR__ . "/data/{$service}/$apiVersion"
|
||||
__DIR__ . "/data/{$service}/$apiVersion"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,6 +224,26 @@ abstract class AbstractMonitoringMiddleware
|
||||
return $event;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the socket is created. If PHP version is greater or equals to 8 then,
|
||||
* it will check if the var is instance of \Socket otherwise it will check if is
|
||||
* a resource.
|
||||
*
|
||||
* @return bool Returns true if the socket is created, false otherwise.
|
||||
*/
|
||||
private function isSocketCreated(): bool
|
||||
{
|
||||
// Before version 8, sockets are resources
|
||||
// After version 8, sockets are instances of Socket
|
||||
if (PHP_MAJOR_VERSION >= 8) {
|
||||
$socketClass = '\Socket';
|
||||
return self::$socket instanceof $socketClass;
|
||||
} else {
|
||||
return is_resource(self::$socket);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a UDP socket resource and stores it with the class, or retrieves
|
||||
* it if already instantiated and connected. Handles error-checking and
|
||||
@@ -235,7 +255,7 @@ abstract class AbstractMonitoringMiddleware
|
||||
*/
|
||||
private function prepareSocket($forceNewConnection = false)
|
||||
{
|
||||
if (!is_resource(self::$socket)
|
||||
if (!$this->isSocketCreated()
|
||||
|| $forceNewConnection
|
||||
|| socket_last_error(self::$socket)
|
||||
) {
|
||||
@@ -286,4 +306,4 @@ abstract class AbstractMonitoringMiddleware
|
||||
}
|
||||
return $this->options;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise continueUpdateRollbackAsync(array $args = [])
|
||||
* @method \Aws\Result createChangeSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result createGeneratedTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createGeneratedTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result createStack(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
|
||||
* @method \Aws\Result createStackInstances(array $args = [])
|
||||
@@ -30,6 +32,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deactivateTypeAsync(array $args = [])
|
||||
* @method \Aws\Result deleteChangeSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result deleteGeneratedTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteGeneratedTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result deleteStack(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteStackAsync(array $args = [])
|
||||
* @method \Aws\Result deleteStackInstances(array $args = [])
|
||||
@@ -44,10 +48,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result describeChangeSetHooks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeChangeSetHooksAsync(array $args = [])
|
||||
* @method \Aws\Result describeGeneratedTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeGeneratedTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result describeOrganizationsAccess(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeOrganizationsAccessAsync(array $args = [])
|
||||
* @method \Aws\Result describePublisher(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePublisherAsync(array $args = [])
|
||||
* @method \Aws\Result describeResourceScan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeResourceScanAsync(array $args = [])
|
||||
* @method \Aws\Result describeStackDriftDetectionStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeStackDriftDetectionStatusAsync(array $args = [])
|
||||
* @method \Aws\Result describeStackEvents(array $args = [])
|
||||
@@ -80,6 +88,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise estimateTemplateCostAsync(array $args = [])
|
||||
* @method \Aws\Result executeChangeSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise executeChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result getGeneratedTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getGeneratedTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getStackPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getStackPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getTemplate(array $args = [])
|
||||
@@ -92,14 +102,24 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listChangeSetsAsync(array $args = [])
|
||||
* @method \Aws\Result listExports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listExportsAsync(array $args = [])
|
||||
* @method \Aws\Result listGeneratedTemplates(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listGeneratedTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listImports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listImportsAsync(array $args = [])
|
||||
* @method \Aws\Result listResourceScanRelatedResources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listResourceScanRelatedResourcesAsync(array $args = [])
|
||||
* @method \Aws\Result listResourceScanResources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listResourceScanResourcesAsync(array $args = [])
|
||||
* @method \Aws\Result listResourceScans(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listResourceScansAsync(array $args = [])
|
||||
* @method \Aws\Result listStackInstanceResourceDrifts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listStackInstanceResourceDriftsAsync(array $args = [])
|
||||
* @method \Aws\Result listStackInstances(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listStackInstancesAsync(array $args = [])
|
||||
* @method \Aws\Result listStackResources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listStackResourcesAsync(array $args = [])
|
||||
* @method \Aws\Result listStackSetAutoDeploymentTargets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listStackSetAutoDeploymentTargetsAsync(array $args = [])
|
||||
* @method \Aws\Result listStackSetOperationResults(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listStackSetOperationResultsAsync(array $args = [])
|
||||
* @method \Aws\Result listStackSetOperations(array $args = [])
|
||||
@@ -132,10 +152,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise setTypeDefaultVersionAsync(array $args = [])
|
||||
* @method \Aws\Result signalResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise signalResourceAsync(array $args = [])
|
||||
* @method \Aws\Result startResourceScan(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startResourceScanAsync(array $args = [])
|
||||
* @method \Aws\Result stopStackSetOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopStackSetOperationAsync(array $args = [])
|
||||
* @method \Aws\Result testType(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise testTypeAsync(array $args = [])
|
||||
* @method \Aws\Result updateGeneratedTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateGeneratedTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result updateStack(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateStackAsync(array $args = [])
|
||||
* @method \Aws\Result updateStackInstances(array $args = [])
|
||||
|
||||
@@ -110,6 +110,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createFunctionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result createKeyGroup(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise createKeyGroupAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result createKeyValueStore(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise createKeyValueStoreAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result createMonitoringSubscription(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise createMonitoringSubscriptionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result createOriginAccessControl(array $args = []) (supported in versions 2020-05-31)
|
||||
@@ -128,6 +130,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFunctionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result deleteKeyGroup(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise deleteKeyGroupAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result deleteKeyValueStore(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise deleteKeyValueStoreAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result deleteMonitoringSubscription(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise deleteMonitoringSubscriptionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result deleteOriginAccessControl(array $args = []) (supported in versions 2020-05-31)
|
||||
@@ -140,6 +144,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteResponseHeadersPolicyAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result describeFunction(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise describeFunctionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result describeKeyValueStore(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise describeKeyValueStoreAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result getCachePolicy(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise getCachePolicyAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result getCachePolicyConfig(array $args = []) (supported in versions 2020-05-31)
|
||||
@@ -190,6 +196,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listFunctionsAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result listKeyGroups(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise listKeyGroupsAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result listKeyValueStores(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise listKeyValueStoresAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result listOriginAccessControls(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise listOriginAccessControlsAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result listOriginRequestPolicies(array $args = []) (supported in versions 2020-05-31)
|
||||
@@ -212,6 +220,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateFunctionAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result updateKeyGroup(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise updateKeyGroupAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result updateKeyValueStore(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise updateKeyValueStoreAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result updateOriginAccessControl(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \GuzzleHttp\Promise\Promise updateOriginAccessControlAsync(array $args = []) (supported in versions 2020-05-31)
|
||||
* @method \Aws\Result updateOriginRequestPolicy(array $args = []) (supported in versions 2020-05-31)
|
||||
|
||||
@@ -72,6 +72,7 @@ class Signer
|
||||
* @return array The values needed to construct a signed URL or cookie
|
||||
* @throws \InvalidArgumentException when not provided either a policy or a
|
||||
* resource and a expires
|
||||
* @throws \RuntimeException when generated signature is empty
|
||||
*
|
||||
* @link http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-cookies.html
|
||||
*/
|
||||
@@ -113,7 +114,20 @@ class Signer
|
||||
private function sign($policy)
|
||||
{
|
||||
$signature = '';
|
||||
openssl_sign($policy, $signature, $this->pkHandle);
|
||||
|
||||
if(!openssl_sign($policy, $signature, $this->pkHandle)) {
|
||||
$errorMessages = [];
|
||||
while(($newMessage = openssl_error_string()) !== false) {
|
||||
$errorMessages[] = $newMessage;
|
||||
}
|
||||
|
||||
$exceptionMessage = "An error has occurred when signing the policy";
|
||||
if (count($errorMessages) > 0) {
|
||||
$exceptionMessage = implode("\n", $errorMessages);
|
||||
}
|
||||
|
||||
throw new \RuntimeException($exceptionMessage);
|
||||
}
|
||||
|
||||
return $signature;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
namespace Aws\CloudFrontKeyValueStore;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon CloudFront KeyValueStore** service.
|
||||
* @method \Aws\Result deleteKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteKeyAsync(array $args = [])
|
||||
* @method \Aws\Result describeKeyValueStore(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeKeyValueStoreAsync(array $args = [])
|
||||
* @method \Aws\Result getKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getKeyAsync(array $args = [])
|
||||
* @method \Aws\Result listKeys(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listKeysAsync(array $args = [])
|
||||
* @method \Aws\Result putKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putKeyAsync(array $args = [])
|
||||
* @method \Aws\Result updateKeys(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateKeysAsync(array $args = [])
|
||||
*/
|
||||
class CloudFrontKeyValueStoreClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\CloudFrontKeyValueStore\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Amazon CloudFront KeyValueStore** service.
|
||||
*/
|
||||
class CloudFrontKeyValueStoreException extends AwsException {}
|
||||
@@ -17,10 +17,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
||||
* @method \Aws\Result deleteHsm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteHsmAsync(array $args = [])
|
||||
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result describeBackups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeBackupsAsync(array $args = [])
|
||||
* @method \Aws\Result describeClusters(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
|
||||
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result initializeCluster(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise initializeClusterAsync(array $args = [])
|
||||
* @method \Aws\Result listTags(array $args = [])
|
||||
@@ -29,6 +33,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise modifyBackupAttributesAsync(array $args = [])
|
||||
* @method \Aws\Result modifyCluster(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise modifyClusterAsync(array $args = [])
|
||||
* @method \Aws\Result putResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result restoreBackup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise restoreBackupAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
|
||||
@@ -3,6 +3,7 @@ namespace Aws\CloudSearchDomain;
|
||||
|
||||
use Aws\AwsClient;
|
||||
use Aws\CommandInterface;
|
||||
use Aws\HandlerList;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use GuzzleHttp\Psr7;
|
||||
@@ -35,6 +36,7 @@ class CloudSearchDomainClient extends AwsClient
|
||||
// (e.g. http://search-blah.{region}.cloudsearch.amazonaws.com)
|
||||
return explode('.', new Uri($args['endpoint']))[1];
|
||||
};
|
||||
unset($args['endpoint']['default']);
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeQueryAsync(array $args = [])
|
||||
* @method \Aws\Result describeTrails(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeTrailsAsync(array $args = [])
|
||||
* @method \Aws\Result disableFederation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disableFederationAsync(array $args = [])
|
||||
* @method \Aws\Result enableFederation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise enableFederationAsync(array $args = [])
|
||||
* @method \Aws\Result getChannel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getChannelAsync(array $args = [])
|
||||
* @method \Aws\Result getEventDataStore(array $args = [])
|
||||
@@ -56,6 +60,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listImportFailuresAsync(array $args = [])
|
||||
* @method \Aws\Result listImports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listImportsAsync(array $args = [])
|
||||
* @method \Aws\Result listInsightsMetricData(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listInsightsMetricDataAsync(array $args = [])
|
||||
* @method \Aws\Result listPublicKeys(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPublicKeysAsync(array $args = [])
|
||||
* @method \Aws\Result listQueries(array $args = [])
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
namespace Aws\CloudWatchLogs;
|
||||
|
||||
use Aws\AwsClient;
|
||||
use Aws\CommandInterface;
|
||||
use Generator;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon CloudWatch Logs** service.
|
||||
@@ -10,8 +12,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise associateKmsKeyAsync(array $args = [])
|
||||
* @method \Aws\Result cancelExportTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise cancelExportTaskAsync(array $args = [])
|
||||
* @method \Aws\Result createDelivery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createDeliveryAsync(array $args = [])
|
||||
* @method \Aws\Result createExportTask(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createExportTaskAsync(array $args = [])
|
||||
* @method \Aws\Result createLogAnomalyDetector(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createLogAnomalyDetectorAsync(array $args = [])
|
||||
* @method \Aws\Result createLogGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createLogGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createLogStream(array $args = [])
|
||||
@@ -20,8 +26,18 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAccountPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDataProtectionPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDataProtectionPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDelivery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeliveryAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDeliveryDestination(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeliveryDestinationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDeliveryDestinationPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeliveryDestinationPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDeliverySource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDeliverySourceAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDestination(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDestinationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLogAnomalyDetector(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteLogAnomalyDetectorAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLogGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteLogGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLogStream(array $args = [])
|
||||
@@ -38,6 +54,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSubscriptionFilterAsync(array $args = [])
|
||||
* @method \Aws\Result describeAccountPolicies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeAccountPoliciesAsync(array $args = [])
|
||||
* @method \Aws\Result describeDeliveries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeDeliveriesAsync(array $args = [])
|
||||
* @method \Aws\Result describeDeliveryDestinations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeDeliveryDestinationsAsync(array $args = [])
|
||||
* @method \Aws\Result describeDeliverySources(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeDeliverySourcesAsync(array $args = [])
|
||||
* @method \Aws\Result describeDestinations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeDestinationsAsync(array $args = [])
|
||||
* @method \Aws\Result describeExportTasks(array $args = [])
|
||||
@@ -62,6 +84,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise filterLogEventsAsync(array $args = [])
|
||||
* @method \Aws\Result getDataProtectionPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDataProtectionPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getDelivery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDeliveryAsync(array $args = [])
|
||||
* @method \Aws\Result getDeliveryDestination(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDeliveryDestinationAsync(array $args = [])
|
||||
* @method \Aws\Result getDeliveryDestinationPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDeliveryDestinationPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getDeliverySource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getDeliverySourceAsync(array $args = [])
|
||||
* @method \Aws\Result getLogAnomalyDetector(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLogAnomalyDetectorAsync(array $args = [])
|
||||
* @method \Aws\Result getLogEvents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLogEventsAsync(array $args = [])
|
||||
* @method \Aws\Result getLogGroupFields(array $args = [])
|
||||
@@ -70,6 +102,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getLogRecordAsync(array $args = [])
|
||||
* @method \Aws\Result getQueryResults(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getQueryResultsAsync(array $args = [])
|
||||
* @method \Aws\Result listAnomalies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAnomaliesAsync(array $args = [])
|
||||
* @method \Aws\Result listLogAnomalyDetectors(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listLogAnomalyDetectorsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsLogGroup(array $args = [])
|
||||
@@ -78,6 +114,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise putAccountPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result putDataProtectionPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putDataProtectionPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result putDeliveryDestination(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putDeliveryDestinationAsync(array $args = [])
|
||||
* @method \Aws\Result putDeliveryDestinationPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putDeliveryDestinationPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result putDeliverySource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putDeliverySourceAsync(array $args = [])
|
||||
* @method \Aws\Result putDestination(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putDestinationAsync(array $args = [])
|
||||
* @method \Aws\Result putDestinationPolicy(array $args = [])
|
||||
@@ -94,6 +136,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise putRetentionPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result putSubscriptionFilter(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putSubscriptionFilterAsync(array $args = [])
|
||||
* @method \Aws\Result startLiveTail(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startLiveTailAsync(array $args = [])
|
||||
* @method \Aws\Result startQuery(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startQueryAsync(array $args = [])
|
||||
* @method \Aws\Result stopQuery(array $args = [])
|
||||
@@ -108,5 +152,69 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise untagLogGroupAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateAnomaly(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAnomalyAsync(array $args = [])
|
||||
* @method \Aws\Result updateLogAnomalyDetector(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateLogAnomalyDetectorAsync(array $args = [])
|
||||
*/
|
||||
class CloudWatchLogsClient extends AwsClient {}
|
||||
class CloudWatchLogsClient extends AwsClient {
|
||||
static $streamingCommands = [
|
||||
'StartLiveTail' => true
|
||||
];
|
||||
|
||||
public function __construct(array $args)
|
||||
{
|
||||
parent::__construct($args);
|
||||
$this->addStreamingFlagMiddleware();
|
||||
}
|
||||
|
||||
private function addStreamingFlagMiddleware()
|
||||
{
|
||||
$this->getHandlerList()
|
||||
-> appendInit(
|
||||
$this->getStreamingFlagMiddleware(),
|
||||
'streaming-flag-middleware'
|
||||
);
|
||||
}
|
||||
|
||||
private function getStreamingFlagMiddleware(): callable
|
||||
{
|
||||
return function (callable $handler) {
|
||||
return function (CommandInterface $command, $request = null) use ($handler) {
|
||||
if (!empty(self::$streamingCommands[$command->getName()])) {
|
||||
$command['@http']['stream'] = true;
|
||||
}
|
||||
|
||||
return $handler($command, $request);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method for 'startLiveTail' operation that checks for results.
|
||||
*
|
||||
* Initiates 'startLiveTail' operation with given arguments, and continuously
|
||||
* checks response stream for session updates or results, yielding each
|
||||
* stream chunk when results are not empty. This method abstracts from users
|
||||
* the need of checking if there are logs entry available to be watched, which means
|
||||
* that users will always get a next item to be iterated when more log entries are
|
||||
* available.
|
||||
*
|
||||
* @param array $args Command arguments.
|
||||
*
|
||||
* @return Generator Yields session update or result stream chunks.
|
||||
*/
|
||||
public function startLiveTailCheckingForResults(array $args): Generator
|
||||
{
|
||||
$response = $this->startLiveTail($args);
|
||||
foreach ($response['responseStream'] as $streamChunk) {
|
||||
if (isset($streamChunk['sessionUpdate'])) {
|
||||
if (!empty($streamChunk['sessionUpdate']['sessionResults'])) {
|
||||
yield $streamChunk;
|
||||
}
|
||||
} else {
|
||||
yield $streamChunk;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise copyPackageVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result createDomain(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
|
||||
* @method \Aws\Result createPackageGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPackageGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createRepository(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRepositoryAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDomain(array $args = [])
|
||||
@@ -19,6 +21,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDomainPermissionsPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result deletePackage(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePackageAsync(array $args = [])
|
||||
* @method \Aws\Result deletePackageGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePackageGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deletePackageVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePackageVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRepository(array $args = [])
|
||||
@@ -29,6 +33,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeDomainAsync(array $args = [])
|
||||
* @method \Aws\Result describePackage(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePackageAsync(array $args = [])
|
||||
* @method \Aws\Result describePackageGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePackageGroupAsync(array $args = [])
|
||||
* @method \Aws\Result describePackageVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePackageVersionAsync(array $args = [])
|
||||
* @method \Aws\Result describeRepository(array $args = [])
|
||||
@@ -37,6 +43,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateExternalConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result disposePackageVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disposePackageVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result getAssociatedPackageGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAssociatedPackageGroupAsync(array $args = [])
|
||||
* @method \Aws\Result getAuthorizationToken(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAuthorizationTokenAsync(array $args = [])
|
||||
* @method \Aws\Result getDomainPermissionsPolicy(array $args = [])
|
||||
@@ -49,8 +57,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositoryEndpointAsync(array $args = [])
|
||||
* @method \Aws\Result getRepositoryPermissionsPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositoryPermissionsPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result listAllowedRepositoriesForGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAllowedRepositoriesForGroupAsync(array $args = [])
|
||||
* @method \Aws\Result listAssociatedPackages(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAssociatedPackagesAsync(array $args = [])
|
||||
* @method \Aws\Result listDomains(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
|
||||
* @method \Aws\Result listPackageGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPackageGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listPackageVersionAssets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPackageVersionAssetsAsync(array $args = [])
|
||||
* @method \Aws\Result listPackageVersionDependencies(array $args = [])
|
||||
@@ -63,6 +77,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositoriesAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositoriesInDomain(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositoriesInDomainAsync(array $args = [])
|
||||
* @method \Aws\Result listSubPackageGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSubPackageGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result publishPackageVersion(array $args = [])
|
||||
@@ -77,6 +93,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updatePackageGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePackageGroupAsync(array $args = [])
|
||||
* @method \Aws\Result updatePackageGroupOriginConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePackageGroupOriginConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result updatePackageVersionsStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePackageVersionsStatusAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepository(array $args = [])
|
||||
|
||||
@@ -11,12 +11,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetBuildBatchesAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetBuilds(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetBuildsAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetFleets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetFleetsAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetProjects(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetProjectsAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetReportGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetReportGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetReports(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetReportsAsync(array $args = [])
|
||||
* @method \Aws\Result createFleet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createFleetAsync(array $args = [])
|
||||
* @method \Aws\Result createProject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
|
||||
* @method \Aws\Result createReportGroup(array $args = [])
|
||||
@@ -25,6 +29,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createWebhookAsync(array $args = [])
|
||||
* @method \Aws\Result deleteBuildBatch(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteBuildBatchAsync(array $args = [])
|
||||
* @method \Aws\Result deleteFleet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFleetAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
|
||||
* @method \Aws\Result deleteReport(array $args = [])
|
||||
@@ -59,6 +65,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listBuildsForProjectAsync(array $args = [])
|
||||
* @method \Aws\Result listCuratedEnvironmentImages(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCuratedEnvironmentImagesAsync(array $args = [])
|
||||
* @method \Aws\Result listFleets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFleetsAsync(array $args = [])
|
||||
* @method \Aws\Result listProjects(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listProjectsAsync(array $args = [])
|
||||
* @method \Aws\Result listReportGroups(array $args = [])
|
||||
@@ -87,6 +95,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise stopBuildAsync(array $args = [])
|
||||
* @method \Aws\Result stopBuildBatch(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopBuildBatchAsync(array $args = [])
|
||||
* @method \Aws\Result updateFleet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateFleetAsync(array $args = [])
|
||||
* @method \Aws\Result updateProject(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
|
||||
* @method \Aws\Result updateProjectVisibility(array $args = [])
|
||||
|
||||
@@ -39,6 +39,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getSubscriptionAsync(array $args = [])
|
||||
* @method \Aws\Result getUserDetails(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getUserDetailsAsync(array $args = [])
|
||||
* @method \Aws\Result getWorkflow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getWorkflowAsync(array $args = [])
|
||||
* @method \Aws\Result getWorkflowRun(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getWorkflowRunAsync(array $args = [])
|
||||
* @method \Aws\Result listAccessTokens(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAccessTokensAsync(array $args = [])
|
||||
* @method \Aws\Result listDevEnvironmentSessions(array $args = [])
|
||||
@@ -55,10 +59,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listSourceRepositoryBranchesAsync(array $args = [])
|
||||
* @method \Aws\Result listSpaces(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSpacesAsync(array $args = [])
|
||||
* @method \Aws\Result listWorkflowRuns(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listWorkflowRunsAsync(array $args = [])
|
||||
* @method \Aws\Result listWorkflows(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listWorkflowsAsync(array $args = [])
|
||||
* @method \Aws\Result startDevEnvironment(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startDevEnvironmentAsync(array $args = [])
|
||||
* @method \Aws\Result startDevEnvironmentSession(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startDevEnvironmentSessionAsync(array $args = [])
|
||||
* @method \Aws\Result startWorkflowRun(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startWorkflowRunAsync(array $args = [])
|
||||
* @method \Aws\Result stopDevEnvironment(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopDevEnvironmentAsync(array $args = [])
|
||||
* @method \Aws\Result stopDevEnvironmentSession(array $args = [])
|
||||
|
||||
@@ -96,6 +96,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listAssociatedApprovalRuleTemplatesForRepositoryAsync(array $args = [])
|
||||
* @method \Aws\Result listBranches(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBranchesAsync(array $args = [])
|
||||
* @method \Aws\Result listFileCommitHistory(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFileCommitHistoryAsync(array $args = [])
|
||||
* @method \Aws\Result listPullRequests(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPullRequestsAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositories(array $args = [])
|
||||
@@ -158,6 +160,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updatePullRequestTitleAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepositoryDescription(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRepositoryDescriptionAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepositoryEncryptionKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRepositoryEncryptionKeyAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepositoryName(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRepositoryNameAsync(array $args = [])
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
namespace Aws\CodeConnections;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS CodeConnections** service.
|
||||
* @method \Aws\Result createConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result createHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createHostAsync(array $args = [])
|
||||
* @method \Aws\Result createRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result createSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteHostAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result getHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getHostAsync(array $args = [])
|
||||
* @method \Aws\Result getRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result getRepositorySyncStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositorySyncStatusAsync(array $args = [])
|
||||
* @method \Aws\Result getResourceSyncStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getResourceSyncStatusAsync(array $args = [])
|
||||
* @method \Aws\Result getSyncBlockerSummary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSyncBlockerSummaryAsync(array $args = [])
|
||||
* @method \Aws\Result getSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result listConnections(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConnectionsAsync(array $args = [])
|
||||
* @method \Aws\Result listHosts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listHostsAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositoryLinks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositoryLinksAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositorySyncDefinitions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositorySyncDefinitionsAsync(array $args = [])
|
||||
* @method \Aws\Result listSyncConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSyncConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateHostAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result updateSyncBlocker(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSyncBlockerAsync(array $args = [])
|
||||
* @method \Aws\Result updateSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSyncConfigurationAsync(array $args = [])
|
||||
*/
|
||||
class CodeConnectionsClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\CodeConnections\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS CodeConnections** service.
|
||||
*/
|
||||
class CodeConnectionsException extends AwsException {}
|
||||
@@ -46,10 +46,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listPipelineExecutionsAsync(array $args = [])
|
||||
* @method \Aws\Result listPipelines(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPipelinesAsync(array $args = [])
|
||||
* @method \Aws\Result listRuleExecutions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRuleExecutionsAsync(array $args = [])
|
||||
* @method \Aws\Result listRuleTypes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRuleTypesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listWebhooks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listWebhooksAsync(array $args = [])
|
||||
* @method \Aws\Result overrideStageCondition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise overrideStageConditionAsync(array $args = [])
|
||||
* @method \Aws\Result pollForJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise pollForJobsAsync(array $args = [])
|
||||
* @method \Aws\Result pollForThirdPartyJobs(array $args = [])
|
||||
@@ -72,6 +78,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise registerWebhookWithThirdPartyAsync(array $args = [])
|
||||
* @method \Aws\Result retryStageExecution(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise retryStageExecutionAsync(array $args = [])
|
||||
* @method \Aws\Result rollbackStage(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise rollbackStageAsync(array $args = [])
|
||||
* @method \Aws\Result startPipelineExecution(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startPipelineExecutionAsync(array $args = [])
|
||||
* @method \Aws\Result stopPipelineExecution(array $args = [])
|
||||
|
||||
@@ -9,18 +9,42 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result createHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createHostAsync(array $args = [])
|
||||
* @method \Aws\Result createRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result createSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteHostAsync(array $args = [])
|
||||
* @method \Aws\Result deleteRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result deleteSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result getHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getHostAsync(array $args = [])
|
||||
* @method \Aws\Result getRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result getRepositorySyncStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRepositorySyncStatusAsync(array $args = [])
|
||||
* @method \Aws\Result getResourceSyncStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getResourceSyncStatusAsync(array $args = [])
|
||||
* @method \Aws\Result getSyncBlockerSummary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSyncBlockerSummaryAsync(array $args = [])
|
||||
* @method \Aws\Result getSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getSyncConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result listConnections(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listConnectionsAsync(array $args = [])
|
||||
* @method \Aws\Result listHosts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listHostsAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositoryLinks(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositoryLinksAsync(array $args = [])
|
||||
* @method \Aws\Result listRepositorySyncDefinitions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRepositorySyncDefinitionsAsync(array $args = [])
|
||||
* @method \Aws\Result listSyncConfigurations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSyncConfigurationsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
@@ -29,5 +53,11 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateHost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateHostAsync(array $args = [])
|
||||
* @method \Aws\Result updateRepositoryLink(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateRepositoryLinkAsync(array $args = [])
|
||||
* @method \Aws\Result updateSyncBlocker(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSyncBlockerAsync(array $args = [])
|
||||
* @method \Aws\Result updateSyncConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateSyncConfigurationAsync(array $args = [])
|
||||
*/
|
||||
class CodeStarconnectionsClient extends AwsClient {}
|
||||
|
||||
@@ -66,10 +66,21 @@ class Command implements CommandInterface
|
||||
*
|
||||
* @param array $authSchemes
|
||||
*
|
||||
* @deprecated In favor of using the @context property bag.
|
||||
* Auth Schemes are now accessible via the `signature_version` key
|
||||
* in a Command's context, if applicable. Auth Schemes set using
|
||||
* This method are no longer consumed.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public function setAuthSchemes(array $authSchemes)
|
||||
{
|
||||
trigger_error(__METHOD__ . ' is deprecated. Auth schemes '
|
||||
. 'resolved using the service `auth` trait or via endpoint resolution '
|
||||
. 'are now set in the command `@context` property.`'
|
||||
, E_USER_WARNING
|
||||
);
|
||||
|
||||
$this->authSchemes = $authSchemes;
|
||||
}
|
||||
|
||||
@@ -77,11 +88,21 @@ class Command implements CommandInterface
|
||||
* Get auth schemes added to command as required
|
||||
* for endpoint resolution
|
||||
*
|
||||
* @returns array | null
|
||||
* @returns array
|
||||
*
|
||||
* @deprecated In favor of using the @context property bag.
|
||||
* Auth schemes are now accessible via the `signature_version` key
|
||||
* in a Command's context, if applicable.
|
||||
*/
|
||||
public function getAuthSchemes()
|
||||
{
|
||||
return $this->authSchemes;
|
||||
trigger_error(__METHOD__ . ' is deprecated. Auth schemes '
|
||||
. 'resolved using the service `auth` trait or via endpoint resolution '
|
||||
. 'can now be found in the command `@context` property.`'
|
||||
, E_USER_WARNING
|
||||
);
|
||||
|
||||
return $this->authSchemes ?: [];
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
|
||||
@@ -75,7 +75,7 @@ class CommandPool implements PromisorInterface
|
||||
/**
|
||||
* @return PromiseInterface
|
||||
*/
|
||||
public function promise()
|
||||
public function promise(): PromiseInterface
|
||||
{
|
||||
return $this->each->promise();
|
||||
}
|
||||
|
||||
@@ -87,6 +87,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise detectSyntaxAsync(array $args = [])
|
||||
* @method \Aws\Result detectTargetedSentiment(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise detectTargetedSentimentAsync(array $args = [])
|
||||
* @method \Aws\Result detectToxicContent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise detectToxicContentAsync(array $args = [])
|
||||
* @method \Aws\Result importModel(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise importModelAsync(array $args = [])
|
||||
* @method \Aws\Result listDatasets(array $args = [])
|
||||
|
||||
@@ -19,6 +19,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise exportECSServiceRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result exportLambdaFunctionRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise exportLambdaFunctionRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result exportLicenseRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise exportLicenseRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result exportRDSDatabaseRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise exportRDSDatabaseRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getAutoScalingGroupRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAutoScalingGroupRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getEBSVolumeRecommendations(array $args = [])
|
||||
@@ -39,6 +43,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getEnrollmentStatusesForOrganizationAsync(array $args = [])
|
||||
* @method \Aws\Result getLambdaFunctionRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLambdaFunctionRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getLicenseRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLicenseRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getRDSDatabaseRecommendationProjectedMetrics(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRDSDatabaseRecommendationProjectedMetricsAsync(array $args = [])
|
||||
* @method \Aws\Result getRDSDatabaseRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRDSDatabaseRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getRecommendationPreferences(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRecommendationPreferencesAsync(array $args = [])
|
||||
* @method \Aws\Result getRecommendationSummaries(array $args = [])
|
||||
|
||||
@@ -21,8 +21,7 @@ class ConfigurationResolver
|
||||
* to retrieve value from the environment or ini file.
|
||||
* @param mixed $defaultValue
|
||||
* @param string $expectedType The expected type of the retrieved value.
|
||||
* @param array $config
|
||||
* @param array $additionalArgs
|
||||
* @param array $config additional configuration options.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -33,6 +32,10 @@ class ConfigurationResolver
|
||||
$config = []
|
||||
)
|
||||
{
|
||||
$iniOptions = isset($config['ini_resolver_options'])
|
||||
? $config['ini_resolver_options']
|
||||
: [];
|
||||
|
||||
$envValue = self::env($key, $expectedType);
|
||||
if (!is_null($envValue)) {
|
||||
return $envValue;
|
||||
@@ -41,7 +44,13 @@ class ConfigurationResolver
|
||||
if (!isset($config['use_aws_shared_config_files'])
|
||||
|| $config['use_aws_shared_config_files'] != false
|
||||
) {
|
||||
$iniValue = self::ini($key, $expectedType);
|
||||
$iniValue = self::ini(
|
||||
$key,
|
||||
$expectedType,
|
||||
null,
|
||||
null,
|
||||
$iniOptions
|
||||
);
|
||||
if(!is_null($iniValue)) {
|
||||
return $iniValue;
|
||||
}
|
||||
@@ -89,8 +98,13 @@ class ConfigurationResolver
|
||||
*
|
||||
* @return null | mixed
|
||||
*/
|
||||
public static function ini($key, $expectedType, $profile = null, $filename = null)
|
||||
{
|
||||
public static function ini(
|
||||
$key,
|
||||
$expectedType,
|
||||
$profile = null,
|
||||
$filename = null,
|
||||
$options = []
|
||||
){
|
||||
$filename = $filename ?: (self::getDefaultConfigFilename());
|
||||
$profile = $profile ?: (getenv(self::ENV_PROFILE) ?: 'default');
|
||||
|
||||
@@ -100,6 +114,20 @@ class ConfigurationResolver
|
||||
// Use INI_SCANNER_NORMAL instead of INI_SCANNER_TYPED for PHP 5.5 compatibility
|
||||
//TODO change after deprecation
|
||||
$data = @\Aws\parse_ini_file($filename, true, INI_SCANNER_NORMAL);
|
||||
|
||||
if (isset($options['section'])
|
||||
&& isset($options['subsection'])
|
||||
&& isset($options['key']))
|
||||
{
|
||||
return self::retrieveValueFromIniSubsection(
|
||||
$data,
|
||||
$profile,
|
||||
$filename,
|
||||
$expectedType,
|
||||
$options
|
||||
);
|
||||
}
|
||||
|
||||
if ($data === false
|
||||
|| !isset($data[$profile])
|
||||
|| !isset($data[$profile][$key])
|
||||
@@ -177,4 +205,46 @@ class ConfigurationResolver
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes string values pulled out of ini files and
|
||||
* environment variables.
|
||||
*
|
||||
* @param array $data The data retrieved the ini file
|
||||
* @param string $profile The specified ini profile
|
||||
* @param string $filename The full path to the ini file
|
||||
* @param array $options Additional arguments passed to the configuration resolver
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private static function retrieveValueFromIniSubsection(
|
||||
$data,
|
||||
$profile,
|
||||
$filename,
|
||||
$expectedType,
|
||||
$options
|
||||
){
|
||||
$section = $options['section'];
|
||||
if ($data === false
|
||||
|| !isset($data[$profile][$section])
|
||||
|| !isset($data["{$section} {$data[$profile][$section]}"])
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$services_section = \Aws\parse_ini_section_with_subsections(
|
||||
$filename,
|
||||
"services {$data[$profile]['services']}"
|
||||
);
|
||||
|
||||
if (!isset($services_section[$options['subsection']][$options['key']])
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return self::convertType(
|
||||
$services_section[$options['subsection']][$options['key']],
|
||||
$expectedType
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,16 @@ use Aws\AwsClient;
|
||||
* This client is used to interact with the **Amazon Connect Service** service.
|
||||
* @method \Aws\Result activateEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise activateEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result associateAnalyticsDataSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateAnalyticsDataSetAsync(array $args = [])
|
||||
* @method \Aws\Result associateApprovedOrigin(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateApprovedOriginAsync(array $args = [])
|
||||
* @method \Aws\Result associateBot(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateBotAsync(array $args = [])
|
||||
* @method \Aws\Result associateDefaultVocabulary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateDefaultVocabularyAsync(array $args = [])
|
||||
* @method \Aws\Result associateFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateFlowAsync(array $args = [])
|
||||
* @method \Aws\Result associateInstanceStorageConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateInstanceStorageConfigAsync(array $args = [])
|
||||
* @method \Aws\Result associateLambdaFunction(array $args = [])
|
||||
@@ -27,8 +31,24 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise associateRoutingProfileQueuesAsync(array $args = [])
|
||||
* @method \Aws\Result associateSecurityKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateSecurityKeyAsync(array $args = [])
|
||||
* @method \Aws\Result associateTrafficDistributionGroupUser(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateTrafficDistributionGroupUserAsync(array $args = [])
|
||||
* @method \Aws\Result associateUserProficiencies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateUserProficienciesAsync(array $args = [])
|
||||
* @method \Aws\Result batchAssociateAnalyticsDataSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchAssociateAnalyticsDataSetAsync(array $args = [])
|
||||
* @method \Aws\Result batchDisassociateAnalyticsDataSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchDisassociateAnalyticsDataSetAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetAttachedFileMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetAttachedFileMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result batchGetFlowAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchGetFlowAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result batchPutContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise batchPutContactAsync(array $args = [])
|
||||
* @method \Aws\Result claimPhoneNumber(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise claimPhoneNumberAsync(array $args = [])
|
||||
* @method \Aws\Result completeAttachedFileUpload(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise completeAttachedFileUploadAsync(array $args = [])
|
||||
* @method \Aws\Result createAgentStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createAgentStatusAsync(array $args = [])
|
||||
* @method \Aws\Result createContactFlow(array $args = [])
|
||||
@@ -45,6 +65,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createIntegrationAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result createParticipant(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createParticipantAsync(array $args = [])
|
||||
* @method \Aws\Result createPersistentContactAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPersistentContactAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result createPredefinedAttribute(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPredefinedAttributeAsync(array $args = [])
|
||||
* @method \Aws\Result createPrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPromptAsync(array $args = [])
|
||||
* @method \Aws\Result createQueue(array $args = [])
|
||||
@@ -67,10 +91,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
|
||||
* @method \Aws\Result createUserHierarchyGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createUserHierarchyGroupAsync(array $args = [])
|
||||
* @method \Aws\Result createView(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createViewAsync(array $args = [])
|
||||
* @method \Aws\Result createViewVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createViewVersionAsync(array $args = [])
|
||||
* @method \Aws\Result createVocabulary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createVocabularyAsync(array $args = [])
|
||||
* @method \Aws\Result deactivateEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deactivateEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAttachedFile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAttachedFileAsync(array $args = [])
|
||||
* @method \Aws\Result deleteContactEvaluation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteContactEvaluationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteContactFlow(array $args = [])
|
||||
@@ -85,6 +115,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteInstanceAsync(array $args = [])
|
||||
* @method \Aws\Result deleteIntegrationAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteIntegrationAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result deletePredefinedAttribute(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePredefinedAttributeAsync(array $args = [])
|
||||
* @method \Aws\Result deletePrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deletePromptAsync(array $args = [])
|
||||
* @method \Aws\Result deleteQueue(array $args = [])
|
||||
@@ -107,10 +139,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
|
||||
* @method \Aws\Result deleteUserHierarchyGroup(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteUserHierarchyGroupAsync(array $args = [])
|
||||
* @method \Aws\Result deleteView(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteViewAsync(array $args = [])
|
||||
* @method \Aws\Result deleteViewVersion(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteViewVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteVocabulary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteVocabularyAsync(array $args = [])
|
||||
* @method \Aws\Result describeAgentStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeAgentStatusAsync(array $args = [])
|
||||
* @method \Aws\Result describeAuthenticationProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeAuthenticationProfileAsync(array $args = [])
|
||||
* @method \Aws\Result describeContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeContactAsync(array $args = [])
|
||||
* @method \Aws\Result describeContactEvaluation(array $args = [])
|
||||
@@ -131,6 +169,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeInstanceStorageConfigAsync(array $args = [])
|
||||
* @method \Aws\Result describePhoneNumber(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePhoneNumberAsync(array $args = [])
|
||||
* @method \Aws\Result describePredefinedAttribute(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePredefinedAttributeAsync(array $args = [])
|
||||
* @method \Aws\Result describePrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describePromptAsync(array $args = [])
|
||||
* @method \Aws\Result describeQueue(array $args = [])
|
||||
@@ -151,12 +191,18 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise describeUserHierarchyGroupAsync(array $args = [])
|
||||
* @method \Aws\Result describeUserHierarchyStructure(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeUserHierarchyStructureAsync(array $args = [])
|
||||
* @method \Aws\Result describeView(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeViewAsync(array $args = [])
|
||||
* @method \Aws\Result describeVocabulary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeVocabularyAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateAnalyticsDataSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateAnalyticsDataSetAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateApprovedOrigin(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateApprovedOriginAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateBot(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateBotAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateFlow(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateFlowAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateInstanceStorageConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateInstanceStorageConfigAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateLambdaFunction(array $args = [])
|
||||
@@ -171,8 +217,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateRoutingProfileQueuesAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateSecurityKey(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateSecurityKeyAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateTrafficDistributionGroupUser(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateTrafficDistributionGroupUserAsync(array $args = [])
|
||||
* @method \Aws\Result disassociateUserProficiencies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disassociateUserProficienciesAsync(array $args = [])
|
||||
* @method \Aws\Result dismissUserContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise dismissUserContactAsync(array $args = [])
|
||||
* @method \Aws\Result getAttachedFile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAttachedFileAsync(array $args = [])
|
||||
* @method \Aws\Result getContactAttributes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getContactAttributesAsync(array $args = [])
|
||||
* @method \Aws\Result getCurrentMetricData(array $args = [])
|
||||
@@ -181,6 +233,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getCurrentUserDataAsync(array $args = [])
|
||||
* @method \Aws\Result getFederationToken(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFederationTokenAsync(array $args = [])
|
||||
* @method \Aws\Result getFlowAssociation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getFlowAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result getMetricData(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getMetricDataAsync(array $args = [])
|
||||
* @method \Aws\Result getMetricDataV2(array $args = [])
|
||||
@@ -191,10 +245,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getTaskTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getTrafficDistribution(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getTrafficDistributionAsync(array $args = [])
|
||||
* @method \Aws\Result importPhoneNumber(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise importPhoneNumberAsync(array $args = [])
|
||||
* @method \Aws\Result listAgentStatuses(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAgentStatusesAsync(array $args = [])
|
||||
* @method \Aws\Result listAnalyticsDataAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAnalyticsDataAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listApprovedOrigins(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = [])
|
||||
* @method \Aws\Result listAuthenticationProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAuthenticationProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result listBots(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBotsAsync(array $args = [])
|
||||
* @method \Aws\Result listContactEvaluations(array $args = [])
|
||||
@@ -211,6 +271,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listEvaluationFormVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listEvaluationForms(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEvaluationFormsAsync(array $args = [])
|
||||
* @method \Aws\Result listFlowAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFlowAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listHoursOfOperations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listHoursOfOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result listInstanceAttributes(array $args = [])
|
||||
@@ -229,6 +291,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listPhoneNumbersAsync(array $args = [])
|
||||
* @method \Aws\Result listPhoneNumbersV2(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPhoneNumbersV2Async(array $args = [])
|
||||
* @method \Aws\Result listPredefinedAttributes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPredefinedAttributesAsync(array $args = [])
|
||||
* @method \Aws\Result listPrompts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listPromptsAsync(array $args = [])
|
||||
* @method \Aws\Result listQueueQuickConnects(array $args = [])
|
||||
@@ -237,6 +301,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listQueuesAsync(array $args = [])
|
||||
* @method \Aws\Result listQuickConnects(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listQuickConnectsAsync(array $args = [])
|
||||
* @method \Aws\Result listRealtimeContactAnalysisSegmentsV2(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRealtimeContactAnalysisSegmentsV2Async(array $args = [])
|
||||
* @method \Aws\Result listRoutingProfileQueues(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRoutingProfileQueuesAsync(array $args = [])
|
||||
* @method \Aws\Result listRoutingProfiles(array $args = [])
|
||||
@@ -245,6 +311,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listRulesAsync(array $args = [])
|
||||
* @method \Aws\Result listSecurityKeys(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSecurityKeysAsync(array $args = [])
|
||||
* @method \Aws\Result listSecurityProfileApplications(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSecurityProfileApplicationsAsync(array $args = [])
|
||||
* @method \Aws\Result listSecurityProfilePermissions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listSecurityProfilePermissionsAsync(array $args = [])
|
||||
* @method \Aws\Result listSecurityProfiles(array $args = [])
|
||||
@@ -253,28 +321,50 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result listTaskTemplates(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTaskTemplatesAsync(array $args = [])
|
||||
* @method \Aws\Result listTrafficDistributionGroupUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTrafficDistributionGroupUsersAsync(array $args = [])
|
||||
* @method \Aws\Result listTrafficDistributionGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTrafficDistributionGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listUseCases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listUseCasesAsync(array $args = [])
|
||||
* @method \Aws\Result listUserHierarchyGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listUserHierarchyGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result listUserProficiencies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listUserProficienciesAsync(array $args = [])
|
||||
* @method \Aws\Result listUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
|
||||
* @method \Aws\Result listViewVersions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listViewVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listViews(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listViewsAsync(array $args = [])
|
||||
* @method \Aws\Result monitorContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise monitorContactAsync(array $args = [])
|
||||
* @method \Aws\Result pauseContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise pauseContactAsync(array $args = [])
|
||||
* @method \Aws\Result putUserStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putUserStatusAsync(array $args = [])
|
||||
* @method \Aws\Result releasePhoneNumber(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise releasePhoneNumberAsync(array $args = [])
|
||||
* @method \Aws\Result replicateInstance(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise replicateInstanceAsync(array $args = [])
|
||||
* @method \Aws\Result resumeContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise resumeContactAsync(array $args = [])
|
||||
* @method \Aws\Result resumeContactRecording(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise resumeContactRecordingAsync(array $args = [])
|
||||
* @method \Aws\Result searchAgentStatuses(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchAgentStatusesAsync(array $args = [])
|
||||
* @method \Aws\Result searchAvailablePhoneNumbers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = [])
|
||||
* @method \Aws\Result searchContactFlowModules(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchContactFlowModulesAsync(array $args = [])
|
||||
* @method \Aws\Result searchContactFlows(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchContactFlowsAsync(array $args = [])
|
||||
* @method \Aws\Result searchContacts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchContactsAsync(array $args = [])
|
||||
* @method \Aws\Result searchHoursOfOperations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchHoursOfOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result searchPredefinedAttributes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchPredefinedAttributesAsync(array $args = [])
|
||||
* @method \Aws\Result searchPrompts(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchPromptsAsync(array $args = [])
|
||||
* @method \Aws\Result searchQueues(array $args = [])
|
||||
@@ -287,10 +377,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise searchRoutingProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result searchSecurityProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchSecurityProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result searchUserHierarchyGroups(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchUserHierarchyGroupsAsync(array $args = [])
|
||||
* @method \Aws\Result searchUsers(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchUsersAsync(array $args = [])
|
||||
* @method \Aws\Result searchVocabularies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchVocabulariesAsync(array $args = [])
|
||||
* @method \Aws\Result sendChatIntegrationEvent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise sendChatIntegrationEventAsync(array $args = [])
|
||||
* @method \Aws\Result startAttachedFileUpload(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startAttachedFileUploadAsync(array $args = [])
|
||||
* @method \Aws\Result startChatContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startChatContactAsync(array $args = [])
|
||||
* @method \Aws\Result startContactEvaluation(array $args = [])
|
||||
@@ -303,6 +399,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise startOutboundVoiceContactAsync(array $args = [])
|
||||
* @method \Aws\Result startTaskContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startTaskContactAsync(array $args = [])
|
||||
* @method \Aws\Result startWebRTCContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startWebRTCContactAsync(array $args = [])
|
||||
* @method \Aws\Result stopContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise stopContactAsync(array $args = [])
|
||||
* @method \Aws\Result stopContactRecording(array $args = [])
|
||||
@@ -313,14 +411,20 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise submitContactEvaluationAsync(array $args = [])
|
||||
* @method \Aws\Result suspendContactRecording(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise suspendContactRecordingAsync(array $args = [])
|
||||
* @method \Aws\Result tagContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagContactAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result transferContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise transferContactAsync(array $args = [])
|
||||
* @method \Aws\Result untagContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagContactAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateAgentStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAgentStatusAsync(array $args = [])
|
||||
* @method \Aws\Result updateAuthenticationProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateAuthenticationProfileAsync(array $args = [])
|
||||
* @method \Aws\Result updateContact(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactAsync(array $args = [])
|
||||
* @method \Aws\Result updateContactAttributes(array $args = [])
|
||||
@@ -337,6 +441,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactFlowModuleMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result updateContactFlowName(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactFlowNameAsync(array $args = [])
|
||||
* @method \Aws\Result updateContactRoutingData(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactRoutingDataAsync(array $args = [])
|
||||
* @method \Aws\Result updateContactSchedule(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateContactScheduleAsync(array $args = [])
|
||||
* @method \Aws\Result updateEvaluationForm(array $args = [])
|
||||
@@ -351,6 +457,10 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateParticipantRoleConfigAsync(array $args = [])
|
||||
* @method \Aws\Result updatePhoneNumber(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePhoneNumberAsync(array $args = [])
|
||||
* @method \Aws\Result updatePhoneNumberMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePhoneNumberMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result updatePredefinedAttribute(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePredefinedAttributeAsync(array $args = [])
|
||||
* @method \Aws\Result updatePrompt(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePromptAsync(array $args = [])
|
||||
* @method \Aws\Result updateQueueHoursOfOperation(array $args = [])
|
||||
@@ -395,9 +505,15 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateUserIdentityInfoAsync(array $args = [])
|
||||
* @method \Aws\Result updateUserPhoneConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateUserPhoneConfigAsync(array $args = [])
|
||||
* @method \Aws\Result updateUserProficiencies(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateUserProficienciesAsync(array $args = [])
|
||||
* @method \Aws\Result updateUserRoutingProfile(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateUserRoutingProfileAsync(array $args = [])
|
||||
* @method \Aws\Result updateUserSecurityProfiles(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateUserSecurityProfilesAsync(array $args = [])
|
||||
* @method \Aws\Result updateViewContent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateViewContentAsync(array $args = [])
|
||||
* @method \Aws\Result updateViewMetadata(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateViewMetadataAsync(array $args = [])
|
||||
*/
|
||||
class ConnectClient extends AwsClient {}
|
||||
|
||||
@@ -23,8 +23,16 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result deleteDomain(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
|
||||
* @method \Aws\Result deleteField(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteFieldAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLayout(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteLayoutAsync(array $args = [])
|
||||
* @method \Aws\Result deleteTemplate(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteTemplateAsync(array $args = [])
|
||||
* @method \Aws\Result getCase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCaseAsync(array $args = [])
|
||||
* @method \Aws\Result getCaseAuditEvents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCaseAuditEventsAsync(array $args = [])
|
||||
* @method \Aws\Result getCaseEventConfiguration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCaseEventConfigurationAsync(array $args = [])
|
||||
* @method \Aws\Result getDomain(array $args = [])
|
||||
|
||||
@@ -9,6 +9,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise completeAttachmentUploadAsync(array $args = [])
|
||||
* @method \Aws\Result createParticipantConnection(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createParticipantConnectionAsync(array $args = [])
|
||||
* @method \Aws\Result describeView(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeViewAsync(array $args = [])
|
||||
* @method \Aws\Result disconnectParticipant(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disconnectParticipantAsync(array $args = [])
|
||||
* @method \Aws\Result getAttachment(array $args = [])
|
||||
|
||||
@@ -13,6 +13,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise createContentAsync(array $args = [])
|
||||
* @method \Aws\Result createKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result createQuickResponse(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createQuickResponseAsync(array $args = [])
|
||||
* @method \Aws\Result createSession(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createSessionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteAssistant(array $args = [])
|
||||
@@ -21,8 +23,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteAssistantAssociationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteContent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteContentAsync(array $args = [])
|
||||
* @method \Aws\Result deleteImportJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteImportJobAsync(array $args = [])
|
||||
* @method \Aws\Result deleteKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result deleteQuickResponse(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteQuickResponseAsync(array $args = [])
|
||||
* @method \Aws\Result getAssistant(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAssistantAsync(array $args = [])
|
||||
* @method \Aws\Result getAssistantAssociation(array $args = [])
|
||||
@@ -31,8 +37,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getContentAsync(array $args = [])
|
||||
* @method \Aws\Result getContentSummary(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getContentSummaryAsync(array $args = [])
|
||||
* @method \Aws\Result getImportJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getImportJobAsync(array $args = [])
|
||||
* @method \Aws\Result getKnowledgeBase(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getKnowledgeBaseAsync(array $args = [])
|
||||
* @method \Aws\Result getQuickResponse(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getQuickResponseAsync(array $args = [])
|
||||
* @method \Aws\Result getRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result getSession(array $args = [])
|
||||
@@ -43,8 +53,12 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listAssistantsAsync(array $args = [])
|
||||
* @method \Aws\Result listContents(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listContentsAsync(array $args = [])
|
||||
* @method \Aws\Result listImportJobs(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listImportJobsAsync(array $args = [])
|
||||
* @method \Aws\Result listKnowledgeBases(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listKnowledgeBasesAsync(array $args = [])
|
||||
* @method \Aws\Result listQuickResponses(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listQuickResponsesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result notifyRecommendationsReceived(array $args = [])
|
||||
@@ -55,10 +69,14 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise removeKnowledgeBaseTemplateUriAsync(array $args = [])
|
||||
* @method \Aws\Result searchContent(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchContentAsync(array $args = [])
|
||||
* @method \Aws\Result searchQuickResponses(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchQuickResponsesAsync(array $args = [])
|
||||
* @method \Aws\Result searchSessions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise searchSessionsAsync(array $args = [])
|
||||
* @method \Aws\Result startContentUpload(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startContentUploadAsync(array $args = [])
|
||||
* @method \Aws\Result startImportJob(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startImportJobAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
@@ -67,5 +85,7 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise updateContentAsync(array $args = [])
|
||||
* @method \Aws\Result updateKnowledgeBaseTemplateUri(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateKnowledgeBaseTemplateUriAsync(array $args = [])
|
||||
* @method \Aws\Result updateQuickResponse(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateQuickResponseAsync(array $args = [])
|
||||
*/
|
||||
class ConnectWisdomServiceClient extends AwsClient {}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
namespace Aws\ControlCatalog;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Control Catalog** service.
|
||||
* @method \Aws\Result getControl(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getControlAsync(array $args = [])
|
||||
* @method \Aws\Result listCommonControls(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCommonControlsAsync(array $args = [])
|
||||
* @method \Aws\Result listControls(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listControlsAsync(array $args = [])
|
||||
* @method \Aws\Result listDomains(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
|
||||
* @method \Aws\Result listObjectives(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listObjectivesAsync(array $args = [])
|
||||
*/
|
||||
class ControlCatalogClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\ControlCatalog\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **AWS Control Catalog** service.
|
||||
*/
|
||||
class ControlCatalogException extends AwsException {}
|
||||
@@ -5,13 +5,59 @@ use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **AWS Control Tower** service.
|
||||
* @method \Aws\Result createLandingZone(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createLandingZoneAsync(array $args = [])
|
||||
* @method \Aws\Result deleteLandingZone(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteLandingZoneAsync(array $args = [])
|
||||
* @method \Aws\Result disableBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disableBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result disableControl(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise disableControlAsync(array $args = [])
|
||||
* @method \Aws\Result enableBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise enableBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result enableControl(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise enableControlAsync(array $args = [])
|
||||
* @method \Aws\Result getBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result getBaselineOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getBaselineOperationAsync(array $args = [])
|
||||
* @method \Aws\Result getControlOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getControlOperationAsync(array $args = [])
|
||||
* @method \Aws\Result getEnabledBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getEnabledBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result getEnabledControl(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getEnabledControlAsync(array $args = [])
|
||||
* @method \Aws\Result getLandingZone(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLandingZoneAsync(array $args = [])
|
||||
* @method \Aws\Result getLandingZoneOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getLandingZoneOperationAsync(array $args = [])
|
||||
* @method \Aws\Result listBaselines(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listBaselinesAsync(array $args = [])
|
||||
* @method \Aws\Result listControlOperations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listControlOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result listEnabledBaselines(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEnabledBaselinesAsync(array $args = [])
|
||||
* @method \Aws\Result listEnabledControls(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEnabledControlsAsync(array $args = [])
|
||||
* @method \Aws\Result listLandingZoneOperations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listLandingZoneOperationsAsync(array $args = [])
|
||||
* @method \Aws\Result listLandingZones(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listLandingZonesAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result resetEnabledBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise resetEnabledBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result resetLandingZone(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise resetLandingZoneAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result updateEnabledBaseline(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateEnabledBaselineAsync(array $args = [])
|
||||
* @method \Aws\Result updateEnabledControl(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateEnabledControlAsync(array $args = [])
|
||||
* @method \Aws\Result updateLandingZone(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateLandingZoneAsync(array $args = [])
|
||||
*/
|
||||
class ControlTowerClient extends AwsClient {}
|
||||
|
||||
@@ -25,6 +25,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getAnomalyMonitorsAsync(array $args = [])
|
||||
* @method \Aws\Result getAnomalySubscriptions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAnomalySubscriptionsAsync(array $args = [])
|
||||
* @method \Aws\Result getApproximateUsageRecords(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getApproximateUsageRecordsAsync(array $args = [])
|
||||
* @method \Aws\Result getCostAndUsage(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getCostAndUsageAsync(array $args = [])
|
||||
* @method \Aws\Result getCostAndUsageWithResources(array $args = [])
|
||||
@@ -57,6 +59,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise getTagsAsync(array $args = [])
|
||||
* @method \Aws\Result getUsageForecast(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getUsageForecastAsync(array $args = [])
|
||||
* @method \Aws\Result listCostAllocationTagBackfillHistory(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCostAllocationTagBackfillHistoryAsync(array $args = [])
|
||||
* @method \Aws\Result listCostAllocationTags(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCostAllocationTagsAsync(array $args = [])
|
||||
* @method \Aws\Result listCostCategoryDefinitions(array $args = [])
|
||||
@@ -67,6 +71,8 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result provideAnomalyFeedback(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise provideAnomalyFeedbackAsync(array $args = [])
|
||||
* @method \Aws\Result startCostAllocationTagBackfill(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startCostAllocationTagBackfillAsync(array $args = [])
|
||||
* @method \Aws\Result startSavingsPlansPurchaseRecommendationGeneration(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise startSavingsPlansPurchaseRecommendationGenerationAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace Aws\CostOptimizationHub;
|
||||
|
||||
use Aws\AwsClient;
|
||||
|
||||
/**
|
||||
* This client is used to interact with the **Cost Optimization Hub** service.
|
||||
* @method \Aws\Result getPreferences(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPreferencesAsync(array $args = [])
|
||||
* @method \Aws\Result getRecommendation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRecommendationAsync(array $args = [])
|
||||
* @method \Aws\Result listEnrollmentStatuses(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEnrollmentStatusesAsync(array $args = [])
|
||||
* @method \Aws\Result listRecommendationSummaries(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRecommendationSummariesAsync(array $args = [])
|
||||
* @method \Aws\Result listRecommendations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listRecommendationsAsync(array $args = [])
|
||||
* @method \Aws\Result updateEnrollmentStatus(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateEnrollmentStatusAsync(array $args = [])
|
||||
* @method \Aws\Result updatePreferences(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updatePreferencesAsync(array $args = [])
|
||||
*/
|
||||
class CostOptimizationHubClient extends AwsClient {}
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\CostOptimizationHub\Exception;
|
||||
|
||||
use Aws\Exception\AwsException;
|
||||
|
||||
/**
|
||||
* Represents an error interacting with the **Cost Optimization Hub** service.
|
||||
*/
|
||||
class CostOptimizationHubException extends AwsException {}
|
||||
@@ -9,9 +9,15 @@ use Aws\AwsClient;
|
||||
* @method \GuzzleHttp\Promise\Promise deleteReportDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result describeReportDefinitions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeReportDefinitionsAsync(array $args = [])
|
||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||
* @method \Aws\Result modifyReportDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise modifyReportDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result putReportDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putReportDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result tagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||
* @method \Aws\Result untagResource(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||
*/
|
||||
class CostandUsageReportServiceClient extends AwsClient {}
|
||||
|
||||
@@ -48,6 +48,7 @@ class CredentialProvider
|
||||
const ENV_PROFILE = 'AWS_PROFILE';
|
||||
const ENV_ROLE_SESSION_NAME = 'AWS_ROLE_SESSION_NAME';
|
||||
const ENV_SECRET = 'AWS_SECRET_ACCESS_KEY';
|
||||
const ENV_ACCOUNT_ID = 'AWS_ACCOUNT_ID';
|
||||
const ENV_SESSION = 'AWS_SESSION_TOKEN';
|
||||
const ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE';
|
||||
const ENV_SHARED_CREDENTIALS_FILE = 'AWS_SHARED_CREDENTIALS_FILE';
|
||||
@@ -291,9 +292,18 @@ class CredentialProvider
|
||||
// Use credentials from environment variables, if available
|
||||
$key = getenv(self::ENV_KEY);
|
||||
$secret = getenv(self::ENV_SECRET);
|
||||
$accountId = getenv(self::ENV_ACCOUNT_ID) ?: null;
|
||||
$token = getenv(self::ENV_SESSION) ?: null;
|
||||
|
||||
if ($key && $secret) {
|
||||
return Promise\Create::promiseFor(
|
||||
new Credentials($key, $secret, getenv(self::ENV_SESSION) ?: NULL)
|
||||
new Credentials(
|
||||
$key,
|
||||
$secret,
|
||||
$token,
|
||||
null,
|
||||
$accountId
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -541,7 +551,9 @@ class CredentialProvider
|
||||
new Credentials(
|
||||
$data[$profile]['aws_access_key_id'],
|
||||
$data[$profile]['aws_secret_access_key'],
|
||||
$data[$profile]['aws_session_token']
|
||||
$data[$profile]['aws_session_token'],
|
||||
null,
|
||||
!empty($data[$profile]['aws_account_id']) ? $data[$profile]['aws_account_id'] : null
|
||||
)
|
||||
);
|
||||
};
|
||||
@@ -616,12 +628,20 @@ class CredentialProvider
|
||||
$processData['SessionToken'] = null;
|
||||
}
|
||||
|
||||
$accountId = null;
|
||||
if (!empty($processData['AccountId'])) {
|
||||
$accountId = $processData['AccountId'];
|
||||
} elseif (!empty($data[$profile]['aws_account_id'])) {
|
||||
$accountId = $data[$profile]['aws_account_id'];
|
||||
}
|
||||
|
||||
return Promise\Create::promiseFor(
|
||||
new Credentials(
|
||||
$processData['AccessKeyId'],
|
||||
$processData['SecretAccessKey'],
|
||||
$processData['SessionToken'],
|
||||
$expires
|
||||
$expires,
|
||||
$accountId
|
||||
)
|
||||
);
|
||||
};
|
||||
@@ -704,8 +724,8 @@ class CredentialProvider
|
||||
'RoleArn' => $roleArn,
|
||||
'RoleSessionName' => $roleSessionName
|
||||
]);
|
||||
|
||||
$credentials = $stsClient->createCredentials($result);
|
||||
|
||||
return Promise\Create::promiseFor($credentials);
|
||||
}
|
||||
|
||||
@@ -897,7 +917,8 @@ class CredentialProvider
|
||||
$ssoCredentials['accessKeyId'],
|
||||
$ssoCredentials['secretAccessKey'],
|
||||
$ssoCredentials['sessionToken'],
|
||||
$expiration
|
||||
$expiration,
|
||||
$ssoProfile['sso_account_id']
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -956,7 +977,8 @@ class CredentialProvider
|
||||
$ssoCredentials['accessKeyId'],
|
||||
$ssoCredentials['secretAccessKey'],
|
||||
$ssoCredentials['sessionToken'],
|
||||
$expiration
|
||||
$expiration,
|
||||
$ssoProfile['sso_account_id']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
<?php
|
||||
namespace Aws\Credentials;
|
||||
|
||||
use Aws\Identity\AwsCredentialIdentity;
|
||||
|
||||
/**
|
||||
* Basic implementation of the AWS Credentials interface that allows callers to
|
||||
* pass in the AWS Access Key and AWS Secret Access Key in the constructor.
|
||||
*/
|
||||
class Credentials implements CredentialsInterface, \Serializable
|
||||
class Credentials extends AwsCredentialIdentity implements
|
||||
CredentialsInterface,
|
||||
\Serializable
|
||||
{
|
||||
private $key;
|
||||
private $secret;
|
||||
private $token;
|
||||
private $expires;
|
||||
private $accountId;
|
||||
|
||||
/**
|
||||
* Constructs a new BasicAWSCredentials object, with the specified AWS
|
||||
@@ -21,12 +26,13 @@ class Credentials implements CredentialsInterface, \Serializable
|
||||
* @param string $token Security token to use
|
||||
* @param int $expires UNIX timestamp for when credentials expire
|
||||
*/
|
||||
public function __construct($key, $secret, $token = null, $expires = null)
|
||||
public function __construct($key, $secret, $token = null, $expires = null, $accountId = null)
|
||||
{
|
||||
$this->key = trim($key);
|
||||
$this->secret = trim($secret);
|
||||
$this->key = trim((string) $key);
|
||||
$this->secret = trim((string) $secret);
|
||||
$this->token = $token;
|
||||
$this->expires = $expires;
|
||||
$this->accountId = $accountId;
|
||||
}
|
||||
|
||||
public static function __set_state(array $state)
|
||||
@@ -35,7 +41,8 @@ class Credentials implements CredentialsInterface, \Serializable
|
||||
$state['key'],
|
||||
$state['secret'],
|
||||
$state['token'],
|
||||
$state['expires']
|
||||
$state['expires'],
|
||||
$state['accountId']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -64,13 +71,19 @@ class Credentials implements CredentialsInterface, \Serializable
|
||||
return $this->expires !== null && time() >= $this->expires;
|
||||
}
|
||||
|
||||
public function getAccountId()
|
||||
{
|
||||
return $this->accountId;
|
||||
}
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return [
|
||||
'key' => $this->key,
|
||||
'secret' => $this->secret,
|
||||
'token' => $this->token,
|
||||
'expires' => $this->expires
|
||||
'expires' => $this->expires,
|
||||
'accountId' => $this->accountId
|
||||
];
|
||||
}
|
||||
|
||||
@@ -97,6 +110,7 @@ class Credentials implements CredentialsInterface, \Serializable
|
||||
$this->secret = $data['secret'];
|
||||
$this->token = $data['token'];
|
||||
$this->expires = $data['expires'];
|
||||
$this->accountId = $data['accountId'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Aws\Credentials;
|
||||
|
||||
final class CredentialsUtils
|
||||
{
|
||||
/**
|
||||
* Determines whether a given host
|
||||
* is a loopback address.
|
||||
*
|
||||
* @param $host
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isLoopBackAddress($host): bool
|
||||
{
|
||||
if (!filter_var($host, FILTER_VALIDATE_IP)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
||||
if ($host === '::1') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$loopbackStart = ip2long('127.0.0.0');
|
||||
$loopbackEnd = ip2long('127.255.255.255');
|
||||
$ipLong = ip2long($host);
|
||||
|
||||
return ($ipLong >= $loopbackStart && $ipLong <= $loopbackEnd);
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,16 @@
|
||||
namespace Aws\Credentials;
|
||||
|
||||
use Aws\Exception\CredentialsException;
|
||||
use GuzzleHttp\Exception\ConnectException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
/**
|
||||
* Credential provider that fetches credentials with GET request.
|
||||
* ECS environment variable is used in constructing request URI.
|
||||
* Credential provider that fetches container credentials with GET request.
|
||||
* container environment variables are used in constructing request URI.
|
||||
*/
|
||||
class EcsCredentialProvider
|
||||
{
|
||||
@@ -16,7 +19,14 @@ class EcsCredentialProvider
|
||||
const ENV_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI";
|
||||
const ENV_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI";
|
||||
const ENV_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN";
|
||||
const ENV_AUTH_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE";
|
||||
const ENV_TIMEOUT = 'AWS_METADATA_SERVICE_TIMEOUT';
|
||||
const EKS_SERVER_HOST_IPV4 = '169.254.170.23';
|
||||
const EKS_SERVER_HOST_IPV6 = 'fd00:ec2::23';
|
||||
const ENV_RETRIES = 'AWS_METADATA_SERVICE_NUM_ATTEMPTS';
|
||||
|
||||
const DEFAULT_ENV_TIMEOUT = 1.0;
|
||||
const DEFAULT_ENV_RETRIES = 3;
|
||||
|
||||
/** @var callable */
|
||||
private $client;
|
||||
@@ -24,101 +34,179 @@ class EcsCredentialProvider
|
||||
/** @var float|mixed */
|
||||
private $timeout;
|
||||
|
||||
/** @var int */
|
||||
private $retries;
|
||||
|
||||
/** @var int */
|
||||
private $attempts;
|
||||
|
||||
/**
|
||||
* The constructor accepts following options:
|
||||
* - timeout: (optional) Connection timeout, in seconds, default 1.0
|
||||
* - retries: Optional number of retries to be attempted, default 3.
|
||||
* - client: An EcsClient to make request from
|
||||
*
|
||||
* @param array $config Configuration options
|
||||
*/
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
$timeout = getenv(self::ENV_TIMEOUT);
|
||||
$this->timeout = (float) isset($config['timeout'])
|
||||
? $config['timeout']
|
||||
: (getenv(self::ENV_TIMEOUT) ?: self::DEFAULT_ENV_TIMEOUT);
|
||||
$this->retries = (int) isset($config['retries'])
|
||||
? $config['retries']
|
||||
: ((int) getenv(self::ENV_RETRIES) ?: self::DEFAULT_ENV_RETRIES);
|
||||
|
||||
if (!$timeout) {
|
||||
$timeout = isset($_SERVER[self::ENV_TIMEOUT])
|
||||
? $_SERVER[self::ENV_TIMEOUT]
|
||||
: (isset($config['timeout']) ? $config['timeout'] : 1.0);
|
||||
}
|
||||
|
||||
$this->timeout = (float) $timeout;
|
||||
$this->client = isset($config['client'])
|
||||
? $config['client']
|
||||
: \Aws\default_http_handler();
|
||||
$this->client = $config['client'] ?? \Aws\default_http_handler();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load ECS credentials
|
||||
* Load container credentials.
|
||||
*
|
||||
* @return PromiseInterface
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function __invoke()
|
||||
{
|
||||
$client = $this->client;
|
||||
$request = new Request('GET', self::getEcsUri());
|
||||
|
||||
$headers = $this->setHeaderForAuthToken();
|
||||
return $client(
|
||||
$request,
|
||||
[
|
||||
'timeout' => $this->timeout,
|
||||
'proxy' => '',
|
||||
'headers' => $headers
|
||||
]
|
||||
)->then(function (ResponseInterface $response) {
|
||||
$result = $this->decodeResult((string) $response->getBody());
|
||||
return new Credentials(
|
||||
$result['AccessKeyId'],
|
||||
$result['SecretAccessKey'],
|
||||
$result['Token'],
|
||||
strtotime($result['Expiration'])
|
||||
);
|
||||
})->otherwise(function ($reason) {
|
||||
$reason = is_array($reason) ? $reason['exception'] : $reason;
|
||||
$msg = $reason->getMessage();
|
||||
throw new CredentialsException(
|
||||
"Error retrieving credential from ECS ($msg)"
|
||||
);
|
||||
});
|
||||
$this->attempts = 0;
|
||||
$uri = $this->getEcsUri();
|
||||
if ($this->isCompatibleUri($uri)) {
|
||||
return Promise\Coroutine::of(function () {
|
||||
$client = $this->client;
|
||||
$request = new Request('GET', $this->getEcsUri());
|
||||
$headers = $this->getHeadersForAuthToken();
|
||||
$credentials = null;
|
||||
while ($credentials === null) {
|
||||
$credentials = (yield $client(
|
||||
$request,
|
||||
[
|
||||
'timeout' => $this->timeout,
|
||||
'proxy' => '',
|
||||
'headers' => $headers,
|
||||
]
|
||||
)->then(function (ResponseInterface $response) {
|
||||
$result = $this->decodeResult((string)$response->getBody());
|
||||
return new Credentials(
|
||||
$result['AccessKeyId'],
|
||||
$result['SecretAccessKey'],
|
||||
$result['Token'],
|
||||
strtotime($result['Expiration']),
|
||||
$result['AccountId'] ?? null
|
||||
);
|
||||
})->otherwise(function ($reason) {
|
||||
$reason = is_array($reason) ? $reason['exception'] : $reason;
|
||||
|
||||
$isRetryable = $reason instanceof ConnectException;
|
||||
if ($isRetryable && ($this->attempts < $this->retries)) {
|
||||
sleep((int)pow(1.2, $this->attempts));
|
||||
} else {
|
||||
$msg = $reason->getMessage();
|
||||
throw new CredentialsException(
|
||||
sprintf('Error retrieving credentials from container metadata after attempt %d/%d (%s)', $this->attempts, $this->retries, $msg)
|
||||
);
|
||||
}
|
||||
}));
|
||||
$this->attempts++;
|
||||
}
|
||||
|
||||
yield $credentials;
|
||||
});
|
||||
}
|
||||
|
||||
throw new CredentialsException("Uri '{$uri}' contains an unsupported host.");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the number of attempts that have been done.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getAttempts(): int
|
||||
{
|
||||
return $this->attempts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves authorization token.
|
||||
*
|
||||
* @return array|false|string
|
||||
*/
|
||||
private function getEcsAuthToken()
|
||||
{
|
||||
if (!empty($path = getenv(self::ENV_AUTH_TOKEN_FILE))) {
|
||||
$token = @file_get_contents($path);
|
||||
if (false === $token) {
|
||||
clearstatcache(true, dirname($path) . DIRECTORY_SEPARATOR . @readlink($path));
|
||||
clearstatcache(true, dirname($path) . DIRECTORY_SEPARATOR . dirname(@readlink($path)));
|
||||
clearstatcache(true, $path);
|
||||
}
|
||||
|
||||
if (!is_readable($path)) {
|
||||
throw new CredentialsException("Failed to read authorization token from '{$path}': no such file or directory.");
|
||||
}
|
||||
|
||||
$token = @file_get_contents($path);
|
||||
|
||||
if (empty($token)) {
|
||||
throw new CredentialsException("Invalid authorization token read from `$path`. Token file is empty!");
|
||||
}
|
||||
|
||||
return $token;
|
||||
}
|
||||
|
||||
return getenv(self::ENV_AUTH_TOKEN);
|
||||
}
|
||||
|
||||
public function setHeaderForAuthToken(){
|
||||
/**
|
||||
* Provides headers for credential metadata request.
|
||||
*
|
||||
* @return array|array[]|string[]
|
||||
*/
|
||||
private function getHeadersForAuthToken()
|
||||
{
|
||||
$authToken = self::getEcsAuthToken();
|
||||
$headers = [];
|
||||
if(!empty($authToken))
|
||||
|
||||
if (!empty($authToken))
|
||||
$headers = ['Authorization' => $authToken];
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
public function setHeaderForAuthToken()
|
||||
{
|
||||
$authToken = self::getEcsAuthToken();
|
||||
$headers = [];
|
||||
if (!empty($authToken))
|
||||
$headers = ['Authorization' => $authToken];
|
||||
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch credential URI from ECS environment variable
|
||||
* Fetch container metadata URI from container environment variable.
|
||||
*
|
||||
* @return string Returns ECS URI
|
||||
* @return string Returns container metadata URI
|
||||
*/
|
||||
private function getEcsUri()
|
||||
{
|
||||
$credsUri = getenv(self::ENV_URI);
|
||||
|
||||
if ($credsUri === false) {
|
||||
$credsUri = isset($_SERVER[self::ENV_URI]) ? $_SERVER[self::ENV_URI] : '';
|
||||
$credsUri = $_SERVER[self::ENV_URI] ?? '';
|
||||
}
|
||||
|
||||
if(empty($credsUri)){
|
||||
if (empty($credsUri)){
|
||||
$credFullUri = getenv(self::ENV_FULL_URI);
|
||||
if($credFullUri === false){
|
||||
$credFullUri = isset($_SERVER[self::ENV_FULL_URI]) ? $_SERVER[self::ENV_FULL_URI] : '';
|
||||
if ($credFullUri === false){
|
||||
$credFullUri = $_SERVER[self::ENV_FULL_URI] ?? '';
|
||||
}
|
||||
|
||||
if(!empty($credFullUri))
|
||||
if (!empty($credFullUri))
|
||||
return $credFullUri;
|
||||
}
|
||||
|
||||
|
||||
return self::SERVER_URI . $credsUri;
|
||||
}
|
||||
|
||||
@@ -127,8 +215,37 @@ class EcsCredentialProvider
|
||||
$result = json_decode($response, true);
|
||||
|
||||
if (!isset($result['AccessKeyId'])) {
|
||||
throw new CredentialsException('Unexpected ECS credential value');
|
||||
throw new CredentialsException('Unexpected container metadata credentials value');
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether or not a given request URI is a valid
|
||||
* container credential request URI.
|
||||
*
|
||||
* @param $uri
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function isCompatibleUri($uri)
|
||||
{
|
||||
$parsed = parse_url($uri);
|
||||
|
||||
if ($parsed['scheme'] !== 'https') {
|
||||
$host = trim($parsed['host'], '[]');
|
||||
$ecsHost = parse_url(self::SERVER_URI)['host'];
|
||||
$eksHost = self::EKS_SERVER_HOST_IPV4;
|
||||
|
||||
if ($host !== $ecsHost
|
||||
&& $host !== $eksHost
|
||||
&& $host !== self::EKS_SERVER_HOST_IPV6
|
||||
&& !CredentialsUtils::isLoopBackAddress(gethostbyname($host))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
namespace Aws\Credentials;
|
||||
|
||||
use Aws\Configuration\ConfigurationResolver;
|
||||
use Aws\Exception\CredentialsException;
|
||||
use Aws\Exception\InvalidJsonException;
|
||||
use Aws\Sdk;
|
||||
use GuzzleHttp\Exception\TransferException;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Exception\RequestException;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Promise\PromiseInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
@@ -16,13 +16,22 @@ use Psr\Http\Message\ResponseInterface;
|
||||
*/
|
||||
class InstanceProfileProvider
|
||||
{
|
||||
const SERVER_URI = 'http://169.254.169.254/latest/';
|
||||
const CRED_PATH = 'meta-data/iam/security-credentials/';
|
||||
const TOKEN_PATH = 'api/token';
|
||||
|
||||
const ENV_DISABLE = 'AWS_EC2_METADATA_DISABLED';
|
||||
const ENV_TIMEOUT = 'AWS_METADATA_SERVICE_TIMEOUT';
|
||||
const ENV_RETRIES = 'AWS_METADATA_SERVICE_NUM_ATTEMPTS';
|
||||
const CFG_EC2_METADATA_V1_DISABLED = 'ec2_metadata_v1_disabled';
|
||||
const CFG_EC2_METADATA_SERVICE_ENDPOINT = 'ec2_metadata_service_endpoint';
|
||||
const CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE = 'ec2_metadata_service_endpoint_mode';
|
||||
const DEFAULT_TIMEOUT = 1.0;
|
||||
const DEFAULT_RETRIES = 3;
|
||||
const DEFAULT_TOKEN_TTL_SECONDS = 21600;
|
||||
const DEFAULT_AWS_EC2_METADATA_V1_DISABLED = false;
|
||||
const ENDPOINT_MODE_IPv4 = 'IPv4';
|
||||
const ENDPOINT_MODE_IPv6 = 'IPv6';
|
||||
const DEFAULT_METADATA_SERVICE_IPv4_ENDPOINT = 'http://169.254.169.254';
|
||||
const DEFAULT_METADATA_SERVICE_IPv6_ENDPOINT = 'http://[fd00:ec2::254]';
|
||||
|
||||
/** @var string */
|
||||
private $profile;
|
||||
@@ -42,23 +51,49 @@ class InstanceProfileProvider
|
||||
/** @var bool */
|
||||
private $secureMode = true;
|
||||
|
||||
/** @var bool|null */
|
||||
private $ec2MetadataV1Disabled;
|
||||
|
||||
/** @var string */
|
||||
private $endpoint;
|
||||
|
||||
/** @var string */
|
||||
private $endpointMode;
|
||||
|
||||
/** @var array */
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* The constructor accepts the following options:
|
||||
*
|
||||
* - timeout: Connection timeout, in seconds.
|
||||
* - profile: Optional EC2 profile name, if known.
|
||||
* - retries: Optional number of retries to be attempted.
|
||||
* - ec2_metadata_v1_disabled: Optional for disabling the fallback to IMDSv1.
|
||||
* - endpoint: Optional for overriding the default endpoint to be used for fetching credentials.
|
||||
* The value must contain a valid URI scheme. If the URI scheme is not https, it must
|
||||
* resolve to a loopback address.
|
||||
* - endpoint_mode: Optional for overriding the default endpoint mode (IPv4|IPv6) to be used for
|
||||
* resolving the default endpoint.
|
||||
* - use_aws_shared_config_files: Decides whether the shared config file should be considered when
|
||||
* using the ConfigurationResolver::resolve method.
|
||||
*
|
||||
* @param array $config Configuration options.
|
||||
*/
|
||||
public function __construct(array $config = [])
|
||||
{
|
||||
$this->timeout = (float) getenv(self::ENV_TIMEOUT) ?: (isset($config['timeout']) ? $config['timeout'] : 1.0);
|
||||
$this->profile = isset($config['profile']) ? $config['profile'] : null;
|
||||
$this->retries = (int) getenv(self::ENV_RETRIES) ?: (isset($config['retries']) ? $config['retries'] : 3);
|
||||
$this->client = isset($config['client'])
|
||||
? $config['client'] // internal use only
|
||||
: \Aws\default_http_handler();
|
||||
$this->timeout = (float) getenv(self::ENV_TIMEOUT) ?: ($config['timeout'] ?? self::DEFAULT_TIMEOUT);
|
||||
$this->profile = $config['profile'] ?? null;
|
||||
$this->retries = (int) getenv(self::ENV_RETRIES) ?: ($config['retries'] ?? self::DEFAULT_RETRIES);
|
||||
$this->client = $config['client'] ?? \Aws\default_http_handler();
|
||||
$this->ec2MetadataV1Disabled = $config[self::CFG_EC2_METADATA_V1_DISABLED] ?? null;
|
||||
$this->endpoint = $config[self::CFG_EC2_METADATA_SERVICE_ENDPOINT] ?? null;
|
||||
if (!empty($this->endpoint) && !$this->isValidEndpoint($this->endpoint)) {
|
||||
throw new \InvalidArgumentException('The provided URI "' . $this->endpoint . '" is invalid, or contains an unsupported host');
|
||||
}
|
||||
|
||||
$this->endpointMode = $config[self::CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE] ?? null;
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +114,7 @@ class InstanceProfileProvider
|
||||
self::TOKEN_PATH,
|
||||
'PUT',
|
||||
[
|
||||
'x-aws-ec2-metadata-token-ttl-seconds' => 21600
|
||||
'x-aws-ec2-metadata-token-ttl-seconds' => self::DEFAULT_TOKEN_TTL_SECONDS
|
||||
]
|
||||
));
|
||||
} catch (TransferException $e) {
|
||||
@@ -87,13 +122,13 @@ class InstanceProfileProvider
|
||||
&& $previousCredentials instanceof Credentials
|
||||
) {
|
||||
goto generateCredentials;
|
||||
}
|
||||
else if (!method_exists($e, 'getResponse')
|
||||
} elseif ($this->shouldFallbackToIMDSv1()
|
||||
&& (!method_exists($e, 'getResponse')
|
||||
|| empty($e->getResponse())
|
||||
|| !in_array(
|
||||
$e->getResponse()->getStatusCode(),
|
||||
[400, 500, 502, 503, 504]
|
||||
)
|
||||
))
|
||||
) {
|
||||
$this->secureMode = false;
|
||||
} else {
|
||||
@@ -169,7 +204,7 @@ class InstanceProfileProvider
|
||||
&& $previousCredentials instanceof Credentials
|
||||
) {
|
||||
goto generateCredentials;
|
||||
} else if (!empty($this->getExceptionStatusCode($e))
|
||||
} elseif (!empty($this->getExceptionStatusCode($e))
|
||||
&& $this->getExceptionStatusCode($e) === 401
|
||||
) {
|
||||
$this->secureMode = true;
|
||||
@@ -191,7 +226,8 @@ class InstanceProfileProvider
|
||||
$result['AccessKeyId'],
|
||||
$result['SecretAccessKey'],
|
||||
$result['Token'],
|
||||
strtotime($result['Expiration'])
|
||||
strtotime($result['Expiration']),
|
||||
$result['AccountId'] ?? null
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,7 +256,7 @@ class InstanceProfileProvider
|
||||
}
|
||||
|
||||
$fn = $this->client;
|
||||
$request = new Request($method, self::SERVER_URI . $url);
|
||||
$request = new Request($method, $this->resolveEndpoint() . $url);
|
||||
$userAgent = 'aws-sdk-php/' . Sdk::VERSION;
|
||||
if (defined('HHVM_VERSION')) {
|
||||
$userAgent .= ' HHVM/' . HHVM_VERSION;
|
||||
@@ -296,4 +332,136 @@ class InstanceProfileProvider
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This functions checks for whether we should fall back to IMDSv1 or not.
|
||||
* If $ec2MetadataV1Disabled is null then we will try to resolve this value from
|
||||
* the following sources:
|
||||
* - From environment: "AWS_EC2_METADATA_V1_DISABLED".
|
||||
* - From config file: aws_ec2_metadata_v1_disabled
|
||||
* - Defaulted to false
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function shouldFallbackToIMDSv1(): bool
|
||||
{
|
||||
$isImdsV1Disabled = \Aws\boolean_value($this->ec2MetadataV1Disabled)
|
||||
?? \Aws\boolean_value(
|
||||
ConfigurationResolver::resolve(
|
||||
self::CFG_EC2_METADATA_V1_DISABLED,
|
||||
self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED,
|
||||
'bool',
|
||||
$this->config
|
||||
)
|
||||
)
|
||||
?? self::DEFAULT_AWS_EC2_METADATA_V1_DISABLED;
|
||||
|
||||
return !$isImdsV1Disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the metadata service endpoint. If the endpoint is not provided
|
||||
* or configured then, the default endpoint, based on the endpoint mode resolved,
|
||||
* will be used.
|
||||
* Example: if endpoint_mode is resolved to be IPv4 and the endpoint is not provided
|
||||
* then, the endpoint to be used will be http://169.254.169.254.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function resolveEndpoint(): string
|
||||
{
|
||||
$endpoint = $this->endpoint;
|
||||
if (is_null($endpoint)) {
|
||||
$endpoint = ConfigurationResolver::resolve(
|
||||
self::CFG_EC2_METADATA_SERVICE_ENDPOINT,
|
||||
$this->getDefaultEndpoint(),
|
||||
'string',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
if (!$this->isValidEndpoint($endpoint)) {
|
||||
throw new CredentialsException('The provided URI "' . $endpoint . '" is invalid, or contains an unsupported host');
|
||||
}
|
||||
|
||||
if (substr($endpoint, strlen($endpoint) - 1) !== '/') {
|
||||
$endpoint = $endpoint . '/';
|
||||
}
|
||||
|
||||
return $endpoint . 'latest/';
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the default metadata service endpoint.
|
||||
* If endpoint_mode is resolved as IPv4 then:
|
||||
* - endpoint = http://169.254.169.254
|
||||
* If endpoint_mode is resolved as IPv6 then:
|
||||
* - endpoint = http://[fd00:ec2::254]
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getDefaultEndpoint(): string
|
||||
{
|
||||
$endpointMode = $this->resolveEndpointMode();
|
||||
switch ($endpointMode) {
|
||||
case self::ENDPOINT_MODE_IPv4:
|
||||
return self::DEFAULT_METADATA_SERVICE_IPv4_ENDPOINT;
|
||||
case self::ENDPOINT_MODE_IPv6:
|
||||
return self::DEFAULT_METADATA_SERVICE_IPv6_ENDPOINT;
|
||||
}
|
||||
|
||||
throw new CredentialsException("Invalid endpoint mode '$endpointMode' resolved");
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves the endpoint mode to be considered when resolving the default
|
||||
* metadata service endpoint.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function resolveEndpointMode(): string
|
||||
{
|
||||
$endpointMode = $this->endpointMode;
|
||||
if (is_null($endpointMode)) {
|
||||
$endpointMode = ConfigurationResolver::resolve(
|
||||
self::CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE,
|
||||
self::ENDPOINT_MODE_IPv4,
|
||||
'string',
|
||||
$this->config
|
||||
);
|
||||
}
|
||||
|
||||
return $endpointMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks for whether a provide URI is valid.
|
||||
* @param string $uri this parameter is the uri to do the validation against to.
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
private function isValidEndpoint(
|
||||
$uri
|
||||
): bool
|
||||
{
|
||||
// We make sure first the provided uri is a valid URL
|
||||
$isValidURL = filter_var($uri, FILTER_VALIDATE_URL) !== false;
|
||||
if (!$isValidURL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We make sure that if is a no secure host then it must be a loop back address.
|
||||
$parsedUri = parse_url($uri);
|
||||
if ($parsedUri['scheme'] !== 'https') {
|
||||
$host = trim($parsedUri['host'], '[]');
|
||||
|
||||
return CredentialsUtils::isLoopBackAddress(gethostbyname($host))
|
||||
|| in_array(
|
||||
$uri,
|
||||
[self::DEFAULT_METADATA_SERVICE_IPv4_ENDPOINT, self::DEFAULT_METADATA_SERVICE_IPv6_ENDPOINT]
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class AesDecryptingStream implements AesStreamInterface
|
||||
return $this->cipherMethod->getCurrentIv();
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
public function getSize(): ?int
|
||||
{
|
||||
$plainTextSize = $this->stream->getSize();
|
||||
|
||||
@@ -80,12 +80,12 @@ class AesDecryptingStream implements AesStreamInterface
|
||||
return $plainTextSize;
|
||||
}
|
||||
|
||||
public function isWritable()
|
||||
public function isWritable(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function read($length)
|
||||
public function read($length): string
|
||||
{
|
||||
if ($length > strlen($this->buffer)) {
|
||||
$this->buffer .= $this->decryptBlock(
|
||||
@@ -101,7 +101,7 @@ class AesDecryptingStream implements AesStreamInterface
|
||||
return $data ? $data : '';
|
||||
}
|
||||
|
||||
public function seek($offset, $whence = SEEK_SET)
|
||||
public function seek($offset, $whence = SEEK_SET): void
|
||||
{
|
||||
if ($offset === 0 && $whence === SEEK_SET) {
|
||||
$this->buffer = '';
|
||||
|
||||
@@ -65,7 +65,7 @@ class AesEncryptingStream implements AesStreamInterface
|
||||
return $this->cipherMethod->getCurrentIv();
|
||||
}
|
||||
|
||||
public function getSize()
|
||||
public function getSize(): ?int
|
||||
{
|
||||
$plainTextSize = $this->stream->getSize();
|
||||
|
||||
@@ -79,12 +79,12 @@ class AesEncryptingStream implements AesStreamInterface
|
||||
return $plainTextSize;
|
||||
}
|
||||
|
||||
public function isWritable()
|
||||
public function isWritable(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function read($length)
|
||||
public function read($length): string
|
||||
{
|
||||
if ($length > strlen($this->buffer)) {
|
||||
$this->buffer .= $this->encryptBlock(
|
||||
@@ -99,7 +99,7 @@ class AesEncryptingStream implements AesStreamInterface
|
||||
return $data ? $data : '';
|
||||
}
|
||||
|
||||
public function seek($offset, $whence = SEEK_SET)
|
||||
public function seek($offset, $whence = SEEK_SET): void
|
||||
{
|
||||
if ($whence === SEEK_CUR) {
|
||||
$offset = $this->tell() + $offset;
|
||||
|
||||
@@ -29,6 +29,11 @@ class AesGcmDecryptingStream implements AesStreamInterface
|
||||
|
||||
private $tagLength;
|
||||
|
||||
/**
|
||||
* @var StreamInterface
|
||||
*/
|
||||
private $stream;
|
||||
|
||||
/**
|
||||
* @param StreamInterface $cipherText
|
||||
* @param string $key
|
||||
@@ -54,6 +59,9 @@ class AesGcmDecryptingStream implements AesStreamInterface
|
||||
$this->aad = $aad;
|
||||
$this->tagLength = $tagLength;
|
||||
$this->keySize = $keySize;
|
||||
// unsetting the property forces the first access to go through
|
||||
// __get().
|
||||
unset($this->stream);
|
||||
}
|
||||
|
||||
public function getOpenSslName()
|
||||
@@ -100,7 +108,7 @@ class AesGcmDecryptingStream implements AesStreamInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function isWritable()
|
||||
public function isWritable(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user