Updates to vendors etc

This commit is contained in:
Chris Hunt
2025-07-11 15:57:48 +01:00
parent d972cbcd0a
commit 8fb6438254
8043 changed files with 248005 additions and 189479 deletions

View File

@@ -10,6 +10,7 @@ use App\User;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Psr\Container\ContainerExceptionInterface;
@@ -144,6 +145,7 @@ class AppServiceProvider extends ServiceProvider
if ($db_type == 'sqlite') {
$db_file = database_path(env('DB_DATABASE', 'app.sqlite'));
Log::debug('SQLite Database Path: ' . $db_file);
if (! is_file($db_file)) {
touch($db_file);
}

View File

@@ -2,8 +2,6 @@
namespace App;
use Cache;
use Form;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Request as Input;
use Yaml;
@@ -123,15 +121,7 @@ abstract class Search
$output .= '<option value="'.$key.'"'.$selected.'>'.$searchprovider['name'].'</option>';
}
$output .= '</select>';
$output .= Form::text(
'q',
Input::get('q') ?? null,
[
'class' => 'homesearch',
'autofocus' => 'autofocus',
'placeholder' => __('app.settings.search').'...'
]
);
$output .= '<input type="text" name="q" value="'.(Input::get('q') ?? '').'" class="homesearch" autofocus placeholder="'.__('app.settings.search').'..." />';
$output .= '<button type="submit">'.ucwords(__('app.settings.search')).'</button>';
$output .= '</div>';
$output .= '</form>';

View File

@@ -2,7 +2,6 @@
namespace App;
use Form;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
@@ -10,7 +9,6 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Http\Request;
use Illuminate\Session\SessionManager;
use Illuminate\Session\Store;
use Illuminate\Support\Facades\Input;
/**
* App\Setting
@@ -147,7 +145,7 @@ class Setting extends Model
$this->value).
'" /></a>';
}
$value .= Form::file('value', ['class' => 'form-control']);
$value .= '<input type="file" name="value" class="form-control" />';
if (isset($this->value) && ! empty($this->value)) {
$value .= '<a class="settinglink" href="'.
route('settings.clear', $this->id).
@@ -178,22 +176,23 @@ class Setting extends Model
if ($this->key === 'search_provider') {
$options = Search::providers()->pluck('name', 'id');
}
$value = '<select name="value" class="form-control">';
foreach ($options as $key => $opt) {
$options->$key = __($opt);
$value .= '<option value="'.$key.'" '.(($this->value == $key) ? 'selected' : '').'>'.__($opt).'</option>';
}
$value = Form::select('value', $options, null, ['class' => 'form-control']);
$value .= '</select>';
break;
case 'textarea':
$value = Form::textarea('value', null, ['class' => 'form-control', 'cols' => '44', 'rows' => '15']);
$value = '<textarea name="value" class="form-control" cols="44" rows="15"></textarea>';
break;
default:
$value = Form::text('value', null, ['class' => 'form-control']);
$value = '<input type="text" name="value" class="form-control" />';
break;
}
return $value;
}
public function group(): BelongsTo
{
return $this->belongsTo(\App\SettingGroup::class, 'group_id');

View File

@@ -6,7 +6,7 @@ use Illuminate\Foundation\Configuration\Middleware;
return Application::configure(basePath: dirname(__DIR__))
->withProviders([
\Collective\Html\HtmlServiceProvider::class,
\Spatie\Html\HtmlServiceProvider::class,
])
->withRouting(
web: __DIR__.'/../routes/web.php',

View File

@@ -2,5 +2,6 @@
return [
App\Providers\AppServiceProvider::class,
App\Providers\FormMacroServiceProvider::class,
App\Providers\RouteServiceProvider::class,
];

4092
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,12 +9,16 @@ return [
'appsource' => env('APP_SOURCE', 'https://appslist.heimdall.site/'),
//'providers' => [
//App\Providers\FormMacroServiceProvider::class, // Add this line
//],
'aliases' => Facade::defaultAliases()->merge([
'EnhancedApps' => App\EnhancedApps::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'SupportedApps' => App\SupportedApps::class,
'Yaml' => Symfony\Component\Yaml\Yaml::class,
'Form' => App\Providers\FormMacroServiceProvider::class
])->toArray(),
'auth_roles_enable' => (bool) env('AUTH_ROLES_ENABLE', false),

View File

@@ -2,6 +2,18 @@
return [
'default' => env('DB_CONNECTION', 'sqlite'), // Make sure the default connection is set
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => database_path(env('DB_DATABASE', 'app.sqlite')), // Make sure to use the correct path
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), // Enable foreign key constraints
],
],
'migrations' => [
'table' => 'migrations',
'update_date_on_publish' => false, // disable to preserve original behavior for existing applications

0
database/.gitignore vendored Normal file → Executable file
View File

0
database/factories/ItemFactory.php Normal file → Executable file
View File

0
database/factories/ItemTagFactory.php Normal file → Executable file
View File

0
database/factories/UserFactory.php Normal file → Executable file
View File

View File

View File

View File

0
database/migrations/2018_02_16_193703_item_tag.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
database/seeders/DatabaseSeeder.php Normal file → Executable file
View File

0
database/seeders/SettingsSeeder.php Normal file → Executable file
View File

0
database/seeders/UsersSeeder.php Normal file → Executable file
View File

View File

@@ -9,10 +9,6 @@
</header>
<div class="create">
{!! csrf_field() !!}
<?php /*<div class="input">
<label>Application name</label>
{!! Form::select('supported', \App\Item::supportedOptions(), array('placeholder' => 'Title','class' => 'form-control')) !!}
</div>*/ ?>
<div class="input">
{!! $setting->edit_value !!}

View File

@@ -3,6 +3,20 @@
<header>
<div class="section-title">{{ __('app.apps.add_tag') }}</div>
<div class="module-actions">
<div class="toggleinput">
<label class="name">{{ __('app.apps.pinned') }}</label>
{{ html()->hidden('pinned', '0') }}
<label class="switch">
<?php
$checked = true;
if(isset($item->pinned) && (bool)$item->pinned !== true) $checked = false;
$set_checked = ($checked) ? ' checked="checked"' : '';
?>
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
<span class="slider round"></span>
</label>
</div>
<button type="submit"class="button"><i class="fa fa-save"></i><span>{{ __('app.buttons.save') }}</span></button>
<a href="{{ route('tags.index', []) }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div>
@@ -14,17 +28,6 @@
<label>{{ __('app.apps.tag_name') }} *</label>
{{ html()->text('title')->placeholder(__('app.apps.title'))->class('form-control')->required() }}
<hr />
<label>{{ __('app.apps.pinned') }}</label>
{{ html()->hidden('pinned', '0') }}
<label class="switch">
<?php
$checked = true;
if(isset($item->pinned) && (bool)$item->pinned !== true) $checked = false;
$set_checked = ($checked) ? ' checked="checked"' : '';
?>
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
<span class="slider round"></span>
</label>
</div>
<div class="input">
<label>{{ __('app.apps.colour') }}</label>
@@ -59,19 +62,6 @@
</div>
</div>
</div>
<div class="input">
<label>{{ __('app.apps.pinned') }}</label>
{{ html()->hidden('pinned', '0') }}
<label class="switch">
<?php
$checked = false;
if(isset($item->pinned) && (bool)$item->pinned === true) $checked = true;
$set_checked = ($checked) ? ' checked="checked"' : '';
?>
<input type="checkbox" name="pinned" value="1"<?php echo $set_checked;?> />
<span class="slider round"></span>
</label>
</div>
<div id="sapconfig"></div>

File diff suppressed because one or more lines are too long

46
vendor/aws/aws-crt-php/format-check.py vendored Executable file
View File

@@ -0,0 +1,46 @@
#!/usr/bin/env python3
import argparse
import os
from pathlib import Path
import re
from subprocess import list2cmdline, run
from tempfile import NamedTemporaryFile
CLANG_FORMAT_VERSION = '18.1.6'
INCLUDE_REGEX = re.compile(r'^ext/.*\.(c|h|inl)$')
EXCLUDE_REGEX = re.compile(r'^$')
arg_parser = argparse.ArgumentParser(description="Check with clang-format")
arg_parser.add_argument('-i', '--inplace-edit', action='store_true',
help="Edit files inplace")
args = arg_parser.parse_args()
os.chdir(Path(__file__).parent)
# create file containing list of all files to format
filepaths_file = NamedTemporaryFile(delete=False)
for dirpath, dirnames, filenames in os.walk('.'):
for filename in filenames:
# our regexes expect filepath to use forward slash
filepath = Path(dirpath, filename).as_posix()
if not INCLUDE_REGEX.match(filepath):
continue
if EXCLUDE_REGEX.match(filepath):
continue
filepaths_file.write(f"{filepath}\n".encode())
filepaths_file.close()
# use pipx to run clang-format from PyPI
# this is a simple way to run the same clang-format version regardless of OS
cmd = ['pipx', 'run', f'clang-format=={CLANG_FORMAT_VERSION}',
f'--files={filepaths_file.name}']
if args.inplace_edit:
cmd += ['-i']
else:
cmd += ['--Werror', '--dry-run']
print(f"{Path.cwd()}$ {list2cmdline(cmd)}")
if run(cmd).returncode:
exit(1)

View File

@@ -12,23 +12,23 @@
}
],
"support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"forum": "https://github.com/aws/aws-sdk-php/discussions",
"issues": "https://github.com/aws/aws-sdk-php/issues"
},
"require": {
"php": ">=7.2.5",
"guzzlehttp/guzzle": "^6.5.8 || ^7.4.5",
"guzzlehttp/psr7": "^1.9.1 || ^2.4.5",
"guzzlehttp/promises": "^1.4.0 || ^2.0",
"mtdowling/jmespath.php": "^2.6",
"php": ">=8.1",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.4.5",
"guzzlehttp/promises": "^2.0",
"mtdowling/jmespath.php": "^2.8.0",
"ext-pcre": "*",
"ext-json": "*",
"ext-simplexml": "*",
"aws/aws-crt-php": "^1.2.3",
"psr/http-message": "^1.0 || ^2.0"
"psr/http-message": "^2.0"
},
"require-dev": {
"composer/composer" : "^1.10.22",
"composer/composer" : "^2.7.8",
"ext-openssl": "*",
"ext-dom": "*",
"ext-pcntl": "*",
@@ -37,13 +37,12 @@
"behat/behat": "~3.0",
"doctrine/cache": "~1.4",
"aws/aws-php-sns-message-validator": "~1.0",
"nette/neon": "^2.3",
"andrewsville/php-token-reflection": "^1.4",
"psr/cache": "^1.0",
"psr/simple-cache": "^1.0",
"paragonie/random_compat": ">= 2",
"sebastian/comparator": "^1.2.3 || ^4.0",
"yoast/phpunit-polyfills": "^1.0",
"psr/cache": "^2.0 || ^3.0",
"psr/simple-cache": "^2.0 || ^3.0",
"sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0",
"symfony/filesystem": "^v6.4.0 || ^v7.1.0",
"yoast/phpunit-polyfills": "^2.0",
"dms/phpunit-arraysubset-asserts": "^0.4.0"
},
"suggest": {
@@ -57,7 +56,8 @@
"psr-4": {
"Aws\\": "src/"
},
"files": ["src/functions.php"]
"files": ["src/functions.php"],
"exclude-from-classmap": ["src/data/"]
},
"autoload-dev": {
"psr-4": {
@@ -71,4 +71,3 @@
}
}
}

View File

@@ -0,0 +1,31 @@
<?php
namespace Aws\AIOps;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS AI Ops** service.
* @method \Aws\Result createInvestigationGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInvestigationGroupAsync(array $args = [])
* @method \Aws\Result deleteInvestigationGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteInvestigationGroupAsync(array $args = [])
* @method \Aws\Result deleteInvestigationGroupPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteInvestigationGroupPolicyAsync(array $args = [])
* @method \Aws\Result getInvestigationGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvestigationGroupAsync(array $args = [])
* @method \Aws\Result getInvestigationGroupPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvestigationGroupPolicyAsync(array $args = [])
* @method \Aws\Result listInvestigationGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvestigationGroupsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putInvestigationGroupPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise putInvestigationGroupPolicyAsync(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 updateInvestigationGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateInvestigationGroupAsync(array $args = [])
*/
class AIOpsClient extends AwsClient {}

View File

@@ -0,0 +1,9 @@
<?php
namespace Aws\AIOps\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS AI Ops** service.
*/
class AIOpsException extends AwsException {}

View File

@@ -5,12 +5,16 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **AWS ARC - Zonal Shift** service.
* @method \Aws\Result cancelPracticeRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelPracticeRunAsync(array $args = [])
* @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 = [])
@@ -19,8 +23,12 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listManagedResourcesAsync(array $args = [])
* @method \Aws\Result listZonalShifts(array $args = [])
* @method \GuzzleHttp\Promise\Promise listZonalShiftsAsync(array $args = [])
* @method \Aws\Result startPracticeRun(array $args = [])
* @method \GuzzleHttp\Promise\Promise startPracticeRunAsync(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 = [])

View File

@@ -13,6 +13,8 @@ use Aws\AwsClient;
* @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 = [])
@@ -23,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 = [])
@@ -33,8 +37,12 @@ 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 getFindingsStatistics(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFindingsStatisticsAsync(array $args = [])
* @method \Aws\Result getGeneratedPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGeneratedPolicyAsync(array $args = [])
* @method \Aws\Result listAccessPreviewFindings(array $args = [])
@@ -63,6 +71,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 updateAnalyzer(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAnalyzerAsync(array $args = [])
* @method \Aws\Result updateArchiveRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateArchiveRuleAsync(array $args = [])
* @method \Aws\Result updateFindings(array $args = [])

View File

@@ -5,23 +5,33 @@ 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 = [])
* @method \GuzzleHttp\Promise\Promise disableRegionAsync(array $args = [])
* @method \Aws\Result enableRegion(array $args = [])
* @method \GuzzleHttp\Promise\Promise enableRegionAsync(array $args = [])
* @method \Aws\Result getAccountInformation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAccountInformationAsync(array $args = [])
* @method \Aws\Result getAlternateContact(array $args = [])
* @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 = [])
* @method \GuzzleHttp\Promise\Promise listRegionsAsync(array $args = [])
* @method \Aws\Result putAccountName(array $args = [])
* @method \GuzzleHttp\Promise\Promise putAccountNameAsync(array $args = [])
* @method \Aws\Result putAlternateContact(array $args = [])
* @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 {}

View File

@@ -34,6 +34,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise requestCertificateAsync(array $args = [])
* @method \Aws\Result resendValidationEmail(array $args = [])
* @method \GuzzleHttp\Promise\Promise resendValidationEmailAsync(array $args = [])
* @method \Aws\Result revokeCertificate(array $args = [])
* @method \GuzzleHttp\Promise\Promise revokeCertificateAsync(array $args = [])
* @method \Aws\Result updateCertificateOptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateCertificateOptionsAsync(array $args = [])
*/

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -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 = [])

View File

@@ -205,7 +205,7 @@ class ApiProvider
* @param string $modelsDir Directory containing service models.
* @param array $manifest The API version manifest data.
*/
private function __construct($modelsDir, array $manifest = null)
private function __construct($modelsDir, ?array $manifest = null)
{
$this->manifest = $manifest;
$this->modelsDir = rtrim($modelsDir, '/');

View File

@@ -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);
}

View File

@@ -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

View File

@@ -21,7 +21,7 @@ abstract class AbstractErrorParser
/**
* @param Service $api
*/
public function __construct(Service $api = null)
public function __construct(?Service $api = null)
{
$this->api = $api;
}
@@ -47,7 +47,7 @@ abstract class AbstractErrorParser
protected function populateShape(
array &$data,
ResponseInterface $response,
CommandInterface $command = null
?CommandInterface $command = null
) {
$data['body'] = [];
@@ -60,9 +60,7 @@ abstract class AbstractErrorParser
foreach ($errors as $key => $error) {
// If error code matches a known error shape, populate the body
if ($data['code'] == $error['name']
&& $error instanceof StructureShape
) {
if ($this->errorCodeMatches($data, $error)) {
$modeledError = $error;
$data['body'] = $this->extractPayload(
$modeledError,
@@ -92,4 +90,10 @@ abstract class AbstractErrorParser
return $data;
}
}
private function errorCodeMatches(array $data, $error): bool
{
return $data['code'] == $error['name']
|| (isset($error['error']['code']) && $data['code'] === $error['error']['code']);
}
}

View File

@@ -15,7 +15,7 @@ class JsonRpcErrorParser extends AbstractErrorParser
private $parser;
public function __construct(Service $api = null, JsonParser $parser = null)
public function __construct(?Service $api = null, ?JsonParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new JsonParser();
@@ -23,7 +23,7 @@ class JsonRpcErrorParser extends AbstractErrorParser
public function __invoke(
ResponseInterface $response,
CommandInterface $command = null
?CommandInterface $command = null
) {
$data = $this->genericHandler($response);
@@ -37,9 +37,7 @@ class JsonRpcErrorParser extends AbstractErrorParser
$parts = explode('#', $data['parsed']['__type']);
$data['code'] = isset($parts[1]) ? $parts[1] : $parts[0];
}
$data['message'] = isset($data['parsed']['message'])
? $data['parsed']['message']
: null;
$data['message'] = $data['parsed']['message'] ?? null;
}
$this->populateShape($data, $response, $command);

View File

@@ -16,7 +16,7 @@ class RestJsonErrorParser extends AbstractErrorParser
private $parser;
public function __construct(Service $api = null, JsonParser $parser = null)
public function __construct(?Service $api = null, ?JsonParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new JsonParser();
@@ -24,7 +24,7 @@ class RestJsonErrorParser extends AbstractErrorParser
public function __invoke(
ResponseInterface $response,
CommandInterface $command = null
?CommandInterface $command = null
) {
$data = $this->genericHandler($response);

View File

@@ -17,7 +17,7 @@ class XmlErrorParser extends AbstractErrorParser
protected $parser;
public function __construct(Service $api = null, XmlParser $parser = null)
public function __construct(?Service $api = null, ?XmlParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new XmlParser();
@@ -25,7 +25,7 @@ class XmlErrorParser extends AbstractErrorParser
public function __invoke(
ResponseInterface $response,
CommandInterface $command = null
?CommandInterface $command = null
) {
$code = (string) $response->getStatusCode();

View File

@@ -11,6 +11,7 @@ class Operation extends AbstractModel
private $errors;
private $staticContextParams = [];
private $contextParams;
private $operationContextParams = [];
public function __construct(array $definition, ShapeMap $shapeMap)
{
@@ -28,6 +29,10 @@ class Operation extends AbstractModel
$this->staticContextParams = $definition['staticContextParams'];
}
if (isset($definition['operationContextParams'])) {
$this->operationContextParams = $definition['operationContextParams'];
}
parent::__construct($definition, $shapeMap);
$this->contextParams = $this->setContextParams();
}
@@ -124,6 +129,17 @@ class Operation extends AbstractModel
return $this->contextParams;
}
/**
* Gets definition of modeled dynamic values used
* for endpoint resolution
*
* @return array
*/
public function getOperationContextParams(): array
{
return $this->operationContextParams;
}
private function setContextParams()
{
$members = $this->getInput()->getMembers();

View File

@@ -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 = [];
@@ -187,6 +192,9 @@ class DecodingEventStreamIterator implements Iterator
return $this->key;
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
@@ -197,6 +205,9 @@ class DecodingEventStreamIterator implements Iterator
}
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
@@ -217,7 +228,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);
@@ -289,10 +300,6 @@ class DecodingEventStreamIterator implements Iterator
private function unpackInt64($bytes)
{
if (version_compare(PHP_VERSION, '5.6.3', '<')) {
$d = unpack('N2', $bytes);
return [1 => $d[1] << 32 | $d[2]];
}
return unpack('J', $bytes);
}

View File

@@ -28,35 +28,67 @@ 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);
}
}
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->parseEvent($this->decodingIterator->current());
}
/**
* @return mixed
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->decodingIterator->key();
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->decodingIterator->next();
}
/**
* @return void
*/
#[\ReturnTypeWillChange]
public function rewind()
{
$this->decodingIterator->rewind();
}
/**
* @return bool
*/
#[\ReturnTypeWillChange]
public function valid()
{
@@ -70,6 +102,10 @@ class EventParsingIterator implements Iterator
return $this->parseError($event);
}
if ($event['headers'][':message-type'] === 'exception') {
return $this->parseException($event);
}
if ($event['headers'][':message-type'] !== 'event') {
throw new ParserException('Failed to parse unknown message type.');
}
@@ -80,8 +116,12 @@ class EventParsingIterator implements Iterator
throw new ParserException('Failed to parse without event type.');
}
$eventShape = $this->shape->getMember($eventType);
$eventPayload = $event['payload'];
if ($eventType === 'initial-response') {
return $this->parseInitialResponseEvent($eventPayload);
}
$eventShape = $this->shape->getMember($eventType);
return [
$eventType => array_merge(
@@ -153,4 +193,19 @@ class EventParsingIterator implements Iterator
$event['headers'][':error-message']
);
}
private function parseException(array $event) {
$payload = $event['payload']?->getContents();
$parsedPayload = json_decode($payload, true);
throw new EventStreamDataException(
$event['headers'][':exception-type'] ?? 'Unknown',
$parsedPayload['message'] ?? $payload,
);
}
private function parseInitialResponseEvent($payload): array
{
return ['initial-response' => json_decode($payload, true)];
}
}

View File

@@ -1,6 +1,7 @@
<?php
namespace Aws\Api\Parser;
use Aws\Api\Operation;
use Aws\Api\StructureShape;
use Aws\Api\Service;
use Aws\Result;
@@ -19,7 +20,7 @@ class JsonRpcParser extends AbstractParser
* @param Service $api Service description
* @param JsonParser $parser JSON body builder
*/
public function __construct(Service $api, JsonParser $parser = null)
public function __construct(Service $api, ?JsonParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new JsonParser();
@@ -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(

View File

@@ -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();
}
}

View File

@@ -27,7 +27,7 @@ class QueryParser extends AbstractParser
*/
public function __construct(
Service $api,
XmlParser $xmlParser = null,
?XmlParser $xmlParser = null,
$honorResultWrapper = true
) {
parent::__construct($api);

View File

@@ -17,7 +17,7 @@ class RestJsonParser extends AbstractRestParser
* @param Service $api Service description
* @param JsonParser $parser JSON body builder
*/
public function __construct(Service $api, JsonParser $parser = null)
public function __construct(Service $api, ?JsonParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new JsonParser();

View File

@@ -17,7 +17,7 @@ class RestXmlParser extends AbstractRestParser
* @param Service $api Service description
* @param XmlParser $parser XML body parser
*/
public function __construct(Service $api, XmlParser $parser = null)
public function __construct(Service $api, ?XmlParser $parser = null)
{
parent::__construct($api);
$this->parser = $parser ?: new XmlParser();

View File

@@ -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);

View File

@@ -36,7 +36,7 @@ class JsonRpcSerializer
public function __construct(
Service $api,
$endpoint,
JsonBody $jsonFormatter = null
?JsonBody $jsonFormatter = null
) {
$this->endpoint = $endpoint;
$this->api = $api;

View File

@@ -24,7 +24,7 @@ class QuerySerializer
public function __construct(
Service $api,
$endpoint,
callable $paramBuilder = null
?callable $paramBuilder = null
) {
$this->api = $api;
$this->endpoint = $endpoint;

View File

@@ -24,7 +24,7 @@ class RestJsonSerializer extends RestSerializer
public function __construct(
Service $api,
$endpoint,
JsonBody $jsonFormatter = null
?JsonBody $jsonFormatter = null
) {
parent::__construct($api, $endpoint);
$this->contentType = JsonBody::getContentType($api);

View File

@@ -8,7 +8,6 @@ use Aws\Api\Shape;
use Aws\Api\StructureShape;
use Aws\Api\TimestampShape;
use Aws\CommandInterface;
use Aws\EndpointV2\EndpointProviderV2;
use Aws\EndpointV2\EndpointV2SerializerTrait;
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
use GuzzleHttp\Psr7;
@@ -31,6 +30,9 @@ abstract class RestSerializer
/** @var Uri */
private $endpoint;
/** @var bool */
private $isUseEndpointV2;
/**
* @param Service $api Service API description
* @param string $endpoint Endpoint to connect to
@@ -43,7 +45,6 @@ abstract class RestSerializer
/**
* @param CommandInterface $command Command to serialize into a request.
* @param $endpointProvider Provider used for dynamic endpoint resolution.
* @param $clientArgs Client arguments used for dynamic endpoint resolution.
*
* @return RequestInterface
@@ -59,6 +60,7 @@ abstract class RestSerializer
$headers = isset($opts['headers']) ? $opts['headers'] : [];
if ($endpoint instanceof RulesetEndpoint) {
$this->isUseEndpointV2 = true;
$this->setEndpointV2RequestOptions($endpoint, $headers);
}
@@ -198,6 +200,7 @@ abstract class RestSerializer
private function buildEndpoint(Operation $operation, array $args, array $opts)
{
$serviceName = $this->api->getServiceName();
// Create an associative array of variable definitions used in expansions
$varDefinitions = $this->getVarDefinitions($operation, $args);
@@ -226,11 +229,7 @@ abstract class RestSerializer
$path = $this->endpoint->getPath();
//Accounts for trailing '/' in path when custom endpoint
//is provided to endpointProviderV2
if ($this->api->isModifiedModel()
&& $this->api->getServiceName() === 's3'
) {
if ($this->isUseEndpointV2 && $serviceName === 's3') {
if (substr($path, -1) === '/' && $relative[0] === '/') {
$path = rtrim($path, '/');
}
@@ -246,6 +245,14 @@ abstract class RestSerializer
return new Uri($this->endpoint->withPath('') . $relative);
}
}
if (((!empty($relative) && $relative !== '/')
&& !$this->isUseEndpointV2)
|| (isset($serviceName) && str_starts_with($serviceName, 'geo-'))
) {
$this->normalizePath($path);
}
// If endpoint has path, remove leading '/' to preserve URI resolution.
if ($path && $relative[0] === '/') {
$relative = substr($relative, 1);
@@ -253,9 +260,7 @@ abstract class RestSerializer
//Append path to endpoint when leading '//...'
// present as uri cannot be properly resolved
if ($this->api->isModifiedModel()
&& strpos($relative, '//') === 0
) {
if ($this->isUseEndpointV2 && strpos($relative, '//') === 0) {
return new Uri($this->endpoint . $relative);
}
@@ -307,4 +312,19 @@ abstract class RestSerializer
}
return $varDefinitions;
}
/**
* Appends trailing slash to non-empty paths with at least one segment
* to ensure proper URI resolution
*
* @param string $path
*
* @return void
*/
private function normalizePath(string $path): void
{
if (!empty($path) && $path !== '/' && substr($path, -1) !== '/') {
$this->endpoint = $this->endpoint->withPath($path . '/');
}
}
}

View File

@@ -20,7 +20,7 @@ class RestXmlSerializer extends RestSerializer
public function __construct(
Service $api,
$endpoint,
XmlBody $xmlBody = null
?XmlBody $xmlBody = null
) {
parent::__construct($api, $endpoint);
$this->xmlBody = $xmlBody ?: new XmlBody($api);

View File

@@ -30,6 +30,9 @@ class Service extends AbstractModel
/** @var boolean */
private $modifiedModel = false;
/** @var string */
private $protocol;
/**
* @param array $definition
* @param callable $provider
@@ -69,6 +72,8 @@ class Service extends AbstractModel
if (isset($definition['clientContextParams'])) {
$this->clientContextParams = $definition['clientContextParams'];
}
$this->protocol = $this->selectProtocol($definition);
}
/**
@@ -114,7 +119,7 @@ class Service extends AbstractModel
* @return callable
* @throws \UnexpectedValueException
*/
public static function createErrorParser($protocol, Service $api = null)
public static function createErrorParser($protocol, ?Service $api = null)
{
static $mapping = [
'json' => ErrorParser\JsonRpcErrorParser::class,
@@ -219,7 +224,7 @@ class Service extends AbstractModel
*/
public function getServiceName()
{
return $this->definition['metadata']['serviceIdentifier'];
return $this->definition['metadata']['serviceIdentifier'] ?? null;
}
/**
@@ -241,7 +246,7 @@ class Service extends AbstractModel
*/
public function getProtocol()
{
return $this->definition['metadata']['protocol'];
return $this->protocol;
}
/**
@@ -284,7 +289,7 @@ class Service extends AbstractModel
$this->definition['operations'][$name],
$this->shapeMap
);
} else if ($this->modifiedModel) {
} elseif ($this->modifiedModel) {
$this->operations[$name] = new Operation(
$this->definition['operations'][$name],
$this->shapeMap
@@ -517,6 +522,7 @@ class Service extends AbstractModel
public function setDefinition($definition)
{
$this->definition = $definition;
$this->shapeMap = new ShapeMap($definition['shapes']);
$this->modifiedModel = true;
}
@@ -532,4 +538,27 @@ class Service extends AbstractModel
{
return $this->modifiedModel;
}
/**
* Accepts a list of protocols derived from the service model.
* Returns the highest priority compatible auth scheme if the `protocols` trait is present.
* Otherwise, returns the value of the `protocol` field, if set, or null.
*
* @param array $definition
*
* @return string|null
*/
private function selectProtocol(array $definition): string | null
{
$modeledProtocols = $definition['metadata']['protocols'] ?? null;
if (!empty($modeledProtocols)) {
foreach(SupportedProtocols::cases() as $protocol) {
if (in_array($protocol->value, $modeledProtocols)) {
return $protocol->value;
}
}
}
return $definition['metadata']['protocol'] ?? null;
}
}

View File

@@ -0,0 +1,26 @@
<?php
namespace Aws\Api;
/**
* Priority ordered collection of supported AWS protocols.
*/
enum SupportedProtocols: string
{
case JSON = 'json';
case REST_JSON = 'rest-json';
case REST_XML = 'rest-xml';
case QUERY = 'query';
case EC2 = 'ec2';
/**
* Check if a protocol is valid.
*
* @param string $protocol
* @return bool True if the protocol is supported, otherwise false.
*/
public static function isSupported(string $protocol): bool
{
return self::tryFrom($protocol) !== null;
}
}

View File

@@ -25,7 +25,7 @@ class Validator
* "max", and "pattern". If a key is not
* provided, the constraint will assume false.
*/
public function __construct(array $constraints = null)
public function __construct(?array $constraints = null)
{
static $assumedFalseValues = [
'required' => false,

View File

@@ -22,6 +22,8 @@ use Psr\Http\Message\RequestInterface;
* @method \GuzzleHttp\Promise\Promise createDocumentationVersionAsync(array $args = [])
* @method \Aws\Result createDomainName(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDomainNameAsync(array $args = [])
* @method \Aws\Result createDomainNameAccessAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDomainNameAccessAssociationAsync(array $args = [])
* @method \Aws\Result createModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelAsync(array $args = [])
* @method \Aws\Result createRequestValidator(array $args = [])
@@ -54,6 +56,8 @@ use Psr\Http\Message\RequestInterface;
* @method \GuzzleHttp\Promise\Promise deleteDocumentationVersionAsync(array $args = [])
* @method \Aws\Result deleteDomainName(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDomainNameAsync(array $args = [])
* @method \Aws\Result deleteDomainNameAccessAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDomainNameAccessAssociationAsync(array $args = [])
* @method \Aws\Result deleteGatewayResponse(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGatewayResponseAsync(array $args = [])
* @method \Aws\Result deleteIntegration(array $args = [])
@@ -118,6 +122,8 @@ use Psr\Http\Message\RequestInterface;
* @method \GuzzleHttp\Promise\Promise getDocumentationVersionsAsync(array $args = [])
* @method \Aws\Result getDomainName(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDomainNameAsync(array $args = [])
* @method \Aws\Result getDomainNameAccessAssociations(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDomainNameAccessAssociationsAsync(array $args = [])
* @method \Aws\Result getDomainNames(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDomainNamesAsync(array $args = [])
* @method \Aws\Result getExport(array $args = [])
@@ -196,6 +202,8 @@ use Psr\Http\Message\RequestInterface;
* @method \GuzzleHttp\Promise\Promise putMethodResponseAsync(array $args = [])
* @method \Aws\Result putRestApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRestApiAsync(array $args = [])
* @method \Aws\Result rejectDomainNameAccessAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise rejectDomainNameAccessAssociationAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result testInvokeAuthorizer(array $args = [])

View File

@@ -25,6 +25,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createRouteAsync(array $args = [])
* @method \Aws\Result createRouteResponse(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRouteResponseAsync(array $args = [])
* @method \Aws\Result createRoutingRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRoutingRuleAsync(array $args = [])
* @method \Aws\Result createStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStageAsync(array $args = [])
* @method \Aws\Result createVpcLink(array $args = [])
@@ -57,6 +59,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteRouteResponseAsync(array $args = [])
* @method \Aws\Result deleteRouteSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRouteSettingsAsync(array $args = [])
* @method \Aws\Result deleteRoutingRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteRoutingRuleAsync(array $args = [])
* @method \Aws\Result deleteStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStageAsync(array $args = [])
* @method \Aws\Result deleteVpcLink(array $args = [])
@@ -107,6 +111,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getRouteResponsesAsync(array $args = [])
* @method \Aws\Result getRoutes(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRoutesAsync(array $args = [])
* @method \Aws\Result getRoutingRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRoutingRuleAsync(array $args = [])
* @method \Aws\Result listRoutingRules(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRoutingRulesAsync(array $args = [])
* @method \Aws\Result getStage(array $args = [])
* @method \GuzzleHttp\Promise\Promise getStageAsync(array $args = [])
* @method \Aws\Result getStages(array $args = [])
@@ -119,6 +127,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getVpcLinksAsync(array $args = [])
* @method \Aws\Result importApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise importApiAsync(array $args = [])
* @method \Aws\Result putRoutingRule(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRoutingRuleAsync(array $args = [])
* @method \Aws\Result reimportApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise reimportApiAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])

View File

@@ -33,6 +33,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteExtensionAssociationAsync(array $args = [])
* @method \Aws\Result deleteHostedConfigurationVersion(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteHostedConfigurationVersionAsync(array $args = [])
* @method \Aws\Result getAccountSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
* @method \Aws\Result getApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApplicationAsync(array $args = [])
* @method \Aws\Result getConfiguration(array $args = [])
@@ -77,6 +79,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 updateAccountSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAccountSettingsAsync(array $args = [])
* @method \Aws\Result updateApplication(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
* @method \Aws\Result updateConfigurationProfile(array $args = [])

View File

@@ -9,6 +9,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createApplicationAsync(array $args = [])
* @method \Aws\Result createDataIntegration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataIntegrationAsync(array $args = [])
* @method \Aws\Result createDataIntegrationAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataIntegrationAssociationAsync(array $args = [])
* @method \Aws\Result createEventIntegration(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEventIntegrationAsync(array $args = [])
* @method \Aws\Result deleteApplication(array $args = [])
@@ -45,6 +47,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateApplicationAsync(array $args = [])
* @method \Aws\Result updateDataIntegration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataIntegrationAsync(array $args = [])
* @method \Aws\Result updateDataIntegrationAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataIntegrationAssociationAsync(array $args = [])
* @method \Aws\Result updateEventIntegration(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateEventIntegrationAsync(array $args = [])
*/

View File

@@ -11,10 +11,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise associateMergedGraphqlApiAsync(array $args = [])
* @method \Aws\Result associateSourceGraphqlApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateSourceGraphqlApiAsync(array $args = [])
* @method \Aws\Result createApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise createApiAsync(array $args = [])
* @method \Aws\Result createApiCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise createApiCacheAsync(array $args = [])
* @method \Aws\Result createApiKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise createApiKeyAsync(array $args = [])
* @method \Aws\Result createChannelNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise createChannelNamespaceAsync(array $args = [])
* @method \Aws\Result createDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise createDataSourceAsync(array $args = [])
* @method \Aws\Result createDomainName(array $args = [])
@@ -27,10 +31,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createResolverAsync(array $args = [])
* @method \Aws\Result createType(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTypeAsync(array $args = [])
* @method \Aws\Result deleteApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApiAsync(array $args = [])
* @method \Aws\Result deleteApiCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApiCacheAsync(array $args = [])
* @method \Aws\Result deleteApiKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteApiKeyAsync(array $args = [])
* @method \Aws\Result deleteChannelNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteChannelNamespaceAsync(array $args = [])
* @method \Aws\Result deleteDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDataSourceAsync(array $args = [])
* @method \Aws\Result deleteDomainName(array $args = [])
@@ -55,10 +63,14 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise evaluateMappingTemplateAsync(array $args = [])
* @method \Aws\Result flushApiCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise flushApiCacheAsync(array $args = [])
* @method \Aws\Result getApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApiAsync(array $args = [])
* @method \Aws\Result getApiAssociation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApiAssociationAsync(array $args = [])
* @method \Aws\Result getApiCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise getApiCacheAsync(array $args = [])
* @method \Aws\Result getChannelNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise getChannelNamespaceAsync(array $args = [])
* @method \Aws\Result getDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise getDataSourceAsync(array $args = [])
* @method \Aws\Result getDataSourceIntrospection(array $args = [])
@@ -83,6 +95,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getTypeAsync(array $args = [])
* @method \Aws\Result listApiKeys(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApiKeysAsync(array $args = [])
* @method \Aws\Result listApis(array $args = [])
* @method \GuzzleHttp\Promise\Promise listApisAsync(array $args = [])
* @method \Aws\Result listChannelNamespaces(array $args = [])
* @method \GuzzleHttp\Promise\Promise listChannelNamespacesAsync(array $args = [])
* @method \Aws\Result listDataSources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listDataSourcesAsync(array $args = [])
* @method \Aws\Result listDomainNames(array $args = [])
@@ -115,10 +131,14 @@ 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 updateApi(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateApiAsync(array $args = [])
* @method \Aws\Result updateApiCache(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateApiCacheAsync(array $args = [])
* @method \Aws\Result updateApiKey(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateApiKeyAsync(array $args = [])
* @method \Aws\Result updateChannelNamespace(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateChannelNamespaceAsync(array $args = [])
* @method \Aws\Result updateDataSource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateDataSourceAsync(array $args = [])
* @method \Aws\Result updateDomainName(array $args = [])

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -19,6 +19,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeScalingPoliciesAsync(array $args = [])
* @method \Aws\Result describeScheduledActions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeScheduledActionsAsync(array $args = [])
* @method \Aws\Result getPredictiveScalingForecast(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPredictiveScalingForecastAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result putScalingPolicy(array $args = [])

View File

@@ -0,0 +1,43 @@
<?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 batchUpdateExclusionWindows(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateExclusionWindowsAsync(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 listServiceLevelObjectiveExclusionWindows(array $args = [])
* @method \GuzzleHttp\Promise\Promise listServiceLevelObjectiveExclusionWindowsAsync(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 {}

View File

@@ -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 {}

View File

@@ -41,6 +41,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createStackAsync(array $args = [])
* @method \Aws\Result createStreamingURL(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStreamingURLAsync(array $args = [])
* @method \Aws\Result createThemeForStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise createThemeForStackAsync(array $args = [])
* @method \Aws\Result createUpdatedImage(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUpdatedImageAsync(array $args = [])
* @method \Aws\Result createUsageReportSubscription(array $args = [])
@@ -67,6 +69,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteImagePermissionsAsync(array $args = [])
* @method \Aws\Result deleteStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteStackAsync(array $args = [])
* @method \Aws\Result deleteThemeForStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteThemeForStackAsync(array $args = [])
* @method \Aws\Result deleteUsageReportSubscription(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteUsageReportSubscriptionAsync(array $args = [])
* @method \Aws\Result deleteUser(array $args = [])
@@ -97,6 +101,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeSessionsAsync(array $args = [])
* @method \Aws\Result describeStacks(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeStacksAsync(array $args = [])
* @method \Aws\Result describeThemeForStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeThemeForStackAsync(array $args = [])
* @method \Aws\Result describeUsageReportSubscriptions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeUsageReportSubscriptionsAsync(array $args = [])
* @method \Aws\Result describeUserStackAssociations(array $args = [])
@@ -155,5 +161,7 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateImagePermissionsAsync(array $args = [])
* @method \Aws\Result updateStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateStackAsync(array $args = [])
* @method \Aws\Result updateThemeForStack(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateThemeForStackAsync(array $args = [])
*/
class AppstreamClient extends AwsClient {}

View File

@@ -13,6 +13,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getReportMetadataAsync(array $args = [])
* @method \Aws\Result getTermForReport(array $args = [])
* @method \GuzzleHttp\Promise\Promise getTermForReportAsync(array $args = [])
* @method \Aws\Result listCustomerAgreements(array $args = [])
* @method \GuzzleHttp\Promise\Promise listCustomerAgreementsAsync(array $args = [])
* @method \Aws\Result listReports(array $args = [])
* @method \GuzzleHttp\Promise\Promise listReportsAsync(array $args = [])
* @method \Aws\Result putAccountSettings(array $args = [])

View File

@@ -0,0 +1,181 @@
<?php
namespace Aws\Auth;
use Aws\Auth\Exception\UnresolvedAuthSchemeException;
use Aws\Exception\CredentialsException;
use Aws\Exception\TokenException;
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) {
try {
$resolved = $result->wait();
return $resolved instanceof AwsCredentialIdentity;
} catch (CredentialsException $e) {
return false;
}
}
return $result instanceof AwsCredentialIdentity;
}
/**
* @return bool
*/
private function hasBearerTokenIdentity(): bool
{
if ($this->tokenProvider) {
$fn = $this->tokenProvider;
$result = $fn();
if ($result instanceof PromiseInterface) {
try {
$resolved = $result->wait();
return $resolved instanceof BearerTokenIdentity;
} catch (TokenException $e) {
return false;
}
}
return $result instanceof BearerTokenIdentity;
}
return false;
}
}

View File

@@ -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;
}

View File

@@ -0,0 +1,106 @@
<?php
namespace Aws\Auth;
use Aws\Api\Service;
use Aws\Auth\Exception\UnresolvedAuthSchemeException;
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;
}
try {
$selectedAuthScheme = $resolver->selectAuthScheme(
$resolvableAuth,
['unsigned_payload' => $unsignedPayload]
);
} catch (UnresolvedAuthSchemeException $e) {
// There was an error resolving auth
// The signature version will fall back to the modeled `signatureVersion`
// or auth schemes resolved during endpoint resolution
}
if (!empty($selectedAuthScheme)) {
$command['@context']['signature_version'] = $selectedAuthScheme;
}
}
return $nextHandler($command);
}
}

View File

@@ -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;
}

View File

@@ -4,12 +4,15 @@ 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;
use Psr\Http\Message\RequestInterface;
/**
* Default AWS client implementation
@@ -27,6 +30,9 @@ class AwsClient implements AwsClientInterface
/** @var string */
private $region;
/** @var string */
private $signingRegionSet;
/** @var string */
private $endpoint;
@@ -36,6 +42,9 @@ class AwsClient implements AwsClientInterface
/** @var callable */
private $signatureProvider;
/** @var AuthSchemeResolverInterface */
private $authSchemeResolver;
/** @var callable */
private $credentialProvider;
@@ -203,6 +212,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.
*
@@ -223,17 +249,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);
@@ -244,14 +272,17 @@ class AwsClient implements AwsClientInterface
if ($this->isUseEndpointV2()) {
$this->addEndpointV2Middleware();
}
$this->addAuthSelectionMiddleware();
if (!is_null($this->api->getMetadata('awsQueryCompatible'))) {
$this->addQueryCompatibleInputMiddleware($this->api);
$this->addQueryModeHeader();
}
if (isset($args['with_resolved'])) {
$args['with_resolved']($config);
}
$this->addUserAgentMiddleware($config);
}
public function getHandlerList()
@@ -263,9 +294,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()
@@ -403,49 +432,76 @@ 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'];
}
CommandInterface $command
) use (
$api,
$provider,
$name,
$region,
$signatureVersion,
$configuredSignatureVersion,
$signingRegionSet
) {
if (!$configuredSignatureVersion) {
if (!empty($command['@context']['signing_region'])) {
$region = $command['@context']['signing_region'];
}
if (!empty($command['@context']['signing_service'])) {
$name = $command['@context']['signing_service'];
}
if (!empty($command['@context']['signature_version'])) {
$signatureVersion = $command['@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($command->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($command['@context']['signing_region_set'])
? implode(', ', $command['@context']['signing_region_set'])
: null;
$region = $signingRegionSet
?? $commandSigningRegionSet
?? $region;
}
return SignatureProvider::resolve($provider, $version, $name, $region);
// Capture signature metric
$command->getMetricsBuilder()->identifyMetricByValueAndAppend(
'signature',
$signatureVersion
);
return SignatureProvider::resolve($provider, $signatureVersion, $name, $region);
};
$this->handlerList->appendSign(
Middleware::signer($this->credentialProvider,
@@ -477,6 +533,20 @@ class AwsClient implements AwsClientInterface
);
}
private function addQueryModeHeader(): void
{
$list = $this->getHandlerList();
$list->appendBuild(
Middleware::mapRequest(function (RequestInterface $r) {
return $r->withHeader(
'x-amzn-query-mode',
"true"
);
}),
'x-amzn-query-mode-header'
);
}
private function addInvocationId()
{
// Add invocation id to each request
@@ -519,6 +589,19 @@ class AwsClient implements AwsClientInterface
);
}
private function addAuthSelectionMiddleware()
{
$list = $this->getHandlerList();
$list->prependBuild(
AuthSelectionMiddleware::wrap(
$this->authSchemeResolver,
$this->getApi()
),
'auth-selection'
);
}
private function addEndpointV2Middleware()
{
$list = $this->getHandlerList();
@@ -528,12 +611,31 @@ class AwsClient implements AwsClientInterface
EndpointV2Middleware::wrap(
$this->endpointProvider,
$this->getApi(),
$endpointArgs
$endpointArgs,
$this->credentialProvider
),
'endpoint-resolution'
);
}
/**
* Appends the user agent middleware.
* This middleware MUST be appended after the
* signature middleware `addSignatureMiddleware`,
* so that metrics around signatures are properly
* captured.
*
* @param $args
* @return void
*/
private function addUserAgentMiddleware($args)
{
$this->getHandlerList()->appendSign(
UserAgentMiddleware::wrap($args),
'user-agent'
);
}
/**
* Retrieves client context param definition from service model,
* creates mapping of client context param names with client-provided
@@ -548,7 +650,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];
}
}
}
@@ -558,10 +660,10 @@ 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'] = null;
@@ -582,6 +684,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;
}
@@ -621,6 +725,11 @@ class AwsClient implements AwsClientInterface
}
public static function emitDeprecationWarning() {
trigger_error(
"This method is deprecated. It will be removed in an upcoming release."
, E_USER_DEPRECATED
);
$phpVersion = PHP_VERSION_ID;
if ($phpVersion < 70205) {
$phpVersionString = phpversion();
@@ -654,7 +763,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

View File

@@ -11,6 +11,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createPartnershipAsync(array $args = [])
* @method \Aws\Result createProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
* @method \Aws\Result createStarterMappingTemplate(array $args = [])
* @method \GuzzleHttp\Promise\Promise createStarterMappingTemplateAsync(array $args = [])
* @method \Aws\Result createTransformer(array $args = [])
* @method \GuzzleHttp\Promise\Promise createTransformerAsync(array $args = [])
* @method \Aws\Result deleteCapability(array $args = [])
@@ -21,6 +23,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deleteProfileAsync(array $args = [])
* @method \Aws\Result deleteTransformer(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteTransformerAsync(array $args = [])
* @method \Aws\Result generateMapping(array $args = [])
* @method \GuzzleHttp\Promise\Promise generateMappingAsync(array $args = [])
* @method \Aws\Result getCapability(array $args = [])
* @method \GuzzleHttp\Promise\Promise getCapabilityAsync(array $args = [])
* @method \Aws\Result getPartnership(array $args = [])
@@ -45,6 +49,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise startTransformerJobAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result testConversion(array $args = [])
* @method \GuzzleHttp\Promise\Promise testConversionAsync(array $args = [])
* @method \Aws\Result testMapping(array $args = [])
* @method \GuzzleHttp\Promise\Promise testMappingAsync(array $args = [])
* @method \Aws\Result testParsing(array $args = [])

View File

@@ -0,0 +1,81 @@
<?php
namespace Aws\BCMPricingCalculator;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Billing and Cost Management Pricing Calculator** service.
* @method \Aws\Result batchCreateBillScenarioCommitmentModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateBillScenarioCommitmentModificationAsync(array $args = [])
* @method \Aws\Result batchCreateBillScenarioUsageModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateBillScenarioUsageModificationAsync(array $args = [])
* @method \Aws\Result batchCreateWorkloadEstimateUsage(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchCreateWorkloadEstimateUsageAsync(array $args = [])
* @method \Aws\Result batchDeleteBillScenarioCommitmentModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteBillScenarioCommitmentModificationAsync(array $args = [])
* @method \Aws\Result batchDeleteBillScenarioUsageModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteBillScenarioUsageModificationAsync(array $args = [])
* @method \Aws\Result batchDeleteWorkloadEstimateUsage(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteWorkloadEstimateUsageAsync(array $args = [])
* @method \Aws\Result batchUpdateBillScenarioCommitmentModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateBillScenarioCommitmentModificationAsync(array $args = [])
* @method \Aws\Result batchUpdateBillScenarioUsageModification(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateBillScenarioUsageModificationAsync(array $args = [])
* @method \Aws\Result batchUpdateWorkloadEstimateUsage(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchUpdateWorkloadEstimateUsageAsync(array $args = [])
* @method \Aws\Result createBillEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBillEstimateAsync(array $args = [])
* @method \Aws\Result createBillScenario(array $args = [])
* @method \GuzzleHttp\Promise\Promise createBillScenarioAsync(array $args = [])
* @method \Aws\Result createWorkloadEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise createWorkloadEstimateAsync(array $args = [])
* @method \Aws\Result deleteBillEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBillEstimateAsync(array $args = [])
* @method \Aws\Result deleteBillScenario(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteBillScenarioAsync(array $args = [])
* @method \Aws\Result deleteWorkloadEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteWorkloadEstimateAsync(array $args = [])
* @method \Aws\Result getBillEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBillEstimateAsync(array $args = [])
* @method \Aws\Result getBillScenario(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBillScenarioAsync(array $args = [])
* @method \Aws\Result getPreferences(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPreferencesAsync(array $args = [])
* @method \Aws\Result getWorkloadEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise getWorkloadEstimateAsync(array $args = [])
* @method \Aws\Result listBillEstimateCommitments(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillEstimateCommitmentsAsync(array $args = [])
* @method \Aws\Result listBillEstimateInputCommitmentModifications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillEstimateInputCommitmentModificationsAsync(array $args = [])
* @method \Aws\Result listBillEstimateInputUsageModifications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillEstimateInputUsageModificationsAsync(array $args = [])
* @method \Aws\Result listBillEstimateLineItems(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillEstimateLineItemsAsync(array $args = [])
* @method \Aws\Result listBillEstimates(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillEstimatesAsync(array $args = [])
* @method \Aws\Result listBillScenarioCommitmentModifications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillScenarioCommitmentModificationsAsync(array $args = [])
* @method \Aws\Result listBillScenarioUsageModifications(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillScenarioUsageModificationsAsync(array $args = [])
* @method \Aws\Result listBillScenarios(array $args = [])
* @method \GuzzleHttp\Promise\Promise listBillScenariosAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result listWorkloadEstimateUsage(array $args = [])
* @method \GuzzleHttp\Promise\Promise listWorkloadEstimateUsageAsync(array $args = [])
* @method \Aws\Result listWorkloadEstimates(array $args = [])
* @method \GuzzleHttp\Promise\Promise listWorkloadEstimatesAsync(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 updateBillEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBillEstimateAsync(array $args = [])
* @method \Aws\Result updateBillScenario(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateBillScenarioAsync(array $args = [])
* @method \Aws\Result updatePreferences(array $args = [])
* @method \GuzzleHttp\Promise\Promise updatePreferencesAsync(array $args = [])
* @method \Aws\Result updateWorkloadEstimate(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateWorkloadEstimateAsync(array $args = [])
*/
class BCMPricingCalculatorClient extends AwsClient {}

View File

@@ -0,0 +1,9 @@
<?php
namespace Aws\BCMPricingCalculator\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Billing and Cost Management Pricing Calculator** service.
*/
class BCMPricingCalculatorException extends AwsException {}

View File

@@ -5,6 +5,8 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Backup** service.
* @method \Aws\Result associateBackupVaultMpaApprovalTeam(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateBackupVaultMpaApprovalTeamAsync(array $args = [])
* @method \Aws\Result cancelLegalHold(array $args = [])
* @method \GuzzleHttp\Promise\Promise cancelLegalHoldAsync(array $args = [])
* @method \Aws\Result createBackupPlan(array $args = [])
@@ -21,6 +23,8 @@ 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 createRestoreAccessBackupVault(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRestoreAccessBackupVaultAsync(array $args = [])
* @method \Aws\Result createRestoreTestingPlan(array $args = [])
* @method \GuzzleHttp\Promise\Promise createRestoreTestingPlanAsync(array $args = [])
* @method \Aws\Result createRestoreTestingSelection(array $args = [])
@@ -69,6 +73,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeReportPlanAsync(array $args = [])
* @method \Aws\Result describeRestoreJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeRestoreJobAsync(array $args = [])
* @method \Aws\Result disassociateBackupVaultMpaApprovalTeam(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateBackupVaultMpaApprovalTeamAsync(array $args = [])
* @method \Aws\Result disassociateRecoveryPoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateRecoveryPointAsync(array $args = [])
* @method \Aws\Result disassociateRecoveryPointFromParent(array $args = [])
@@ -89,6 +95,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getBackupVaultNotificationsAsync(array $args = [])
* @method \Aws\Result getLegalHold(array $args = [])
* @method \GuzzleHttp\Promise\Promise getLegalHoldAsync(array $args = [])
* @method \Aws\Result getRecoveryPointIndexDetails(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRecoveryPointIndexDetailsAsync(array $args = [])
* @method \Aws\Result getRecoveryPointRestoreMetadata(array $args = [])
* @method \GuzzleHttp\Promise\Promise getRecoveryPointRestoreMetadataAsync(array $args = [])
* @method \Aws\Result getRestoreJobMetadata(array $args = [])
@@ -121,6 +129,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listCopyJobsAsync(array $args = [])
* @method \Aws\Result listFrameworks(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFrameworksAsync(array $args = [])
* @method \Aws\Result listIndexedRecoveryPoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listIndexedRecoveryPointsAsync(array $args = [])
* @method \Aws\Result listLegalHolds(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLegalHoldsAsync(array $args = [])
* @method \Aws\Result listProtectedResources(array $args = [])
@@ -137,6 +147,8 @@ 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 listRestoreAccessBackupVaults(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRestoreAccessBackupVaultsAsync(array $args = [])
* @method \Aws\Result listRestoreJobSummaries(array $args = [])
* @method \GuzzleHttp\Promise\Promise listRestoreJobSummariesAsync(array $args = [])
* @method \Aws\Result listRestoreJobs(array $args = [])
@@ -157,6 +169,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise putBackupVaultNotificationsAsync(array $args = [])
* @method \Aws\Result putRestoreValidationResult(array $args = [])
* @method \GuzzleHttp\Promise\Promise putRestoreValidationResultAsync(array $args = [])
* @method \Aws\Result revokeRestoreAccessBackupVault(array $args = [])
* @method \GuzzleHttp\Promise\Promise revokeRestoreAccessBackupVaultAsync(array $args = [])
* @method \Aws\Result startBackupJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startBackupJobAsync(array $args = [])
* @method \Aws\Result startCopyJob(array $args = [])
@@ -177,6 +191,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateFrameworkAsync(array $args = [])
* @method \Aws\Result updateGlobalSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGlobalSettingsAsync(array $args = [])
* @method \Aws\Result updateRecoveryPointIndexSettings(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRecoveryPointIndexSettingsAsync(array $args = [])
* @method \Aws\Result updateRecoveryPointLifecycle(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateRecoveryPointLifecycleAsync(array $args = [])
* @method \Aws\Result updateRegionSettings(array $args = [])

View File

@@ -0,0 +1,33 @@
<?php
namespace Aws\BackupSearch;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Backup Search** service.
* @method \Aws\Result getSearchJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSearchJobAsync(array $args = [])
* @method \Aws\Result getSearchResultExportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSearchResultExportJobAsync(array $args = [])
* @method \Aws\Result listSearchJobBackups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSearchJobBackupsAsync(array $args = [])
* @method \Aws\Result listSearchJobResults(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSearchJobResultsAsync(array $args = [])
* @method \Aws\Result listSearchJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSearchJobsAsync(array $args = [])
* @method \Aws\Result listSearchResultExportJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSearchResultExportJobsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result startSearchJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startSearchJobAsync(array $args = [])
* @method \Aws\Result startSearchResultExportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise startSearchResultExportJobAsync(array $args = [])
* @method \Aws\Result stopSearchJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopSearchJobAsync(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 BackupSearchClient extends AwsClient {}

View File

@@ -0,0 +1,9 @@
<?php
namespace Aws\BackupSearch\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Backup Search** service.
*/
class BackupSearchException extends AwsException {}

View File

@@ -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 {}

View File

@@ -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 {}

View File

@@ -9,12 +9,16 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise cancelJobAsync(array $args = [])
* @method \Aws\Result createComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise createComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result createConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise createConsumableResourceAsync(array $args = [])
* @method \Aws\Result createJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = [])
* @method \Aws\Result createSchedulingPolicy(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSchedulingPolicyAsync(array $args = [])
* @method \Aws\Result deleteComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result deleteConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteConsumableResourceAsync(array $args = [])
* @method \Aws\Result deleteJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = [])
* @method \Aws\Result deleteSchedulingPolicy(array $args = [])
@@ -23,6 +27,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise deregisterJobDefinitionAsync(array $args = [])
* @method \Aws\Result describeComputeEnvironments(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeComputeEnvironmentsAsync(array $args = [])
* @method \Aws\Result describeConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeConsumableResourceAsync(array $args = [])
* @method \Aws\Result describeJobDefinitions(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeJobDefinitionsAsync(array $args = [])
* @method \Aws\Result describeJobQueues(array $args = [])
@@ -31,8 +37,14 @@ 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 listConsumableResources(array $args = [])
* @method \GuzzleHttp\Promise\Promise listConsumableResourcesAsync(array $args = [])
* @method \Aws\Result listJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
* @method \Aws\Result listJobsByConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listJobsByConsumableResourceAsync(array $args = [])
* @method \Aws\Result listSchedulingPolicies(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSchedulingPoliciesAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
@@ -49,6 +61,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateComputeEnvironment(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateComputeEnvironmentAsync(array $args = [])
* @method \Aws\Result updateConsumableResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateConsumableResourceAsync(array $args = [])
* @method \Aws\Result updateJobQueue(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = [])
* @method \Aws\Result updateSchedulingPolicy(array $args = [])

View File

@@ -5,44 +5,136 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Amazon Bedrock** service.
* @method \Aws\Result batchDeleteEvaluationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchDeleteEvaluationJobAsync(array $args = [])
* @method \Aws\Result createCustomModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createCustomModelAsync(array $args = [])
* @method \Aws\Result createEvaluationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createEvaluationJobAsync(array $args = [])
* @method \Aws\Result createFoundationModelAgreement(array $args = [])
* @method \GuzzleHttp\Promise\Promise createFoundationModelAgreementAsync(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 createInferenceProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInferenceProfileAsync(array $args = [])
* @method \Aws\Result createMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise createMarketplaceModelEndpointAsync(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 createModelImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelImportJobAsync(array $args = [])
* @method \Aws\Result createModelInvocationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelInvocationJobAsync(array $args = [])
* @method \Aws\Result createPromptRouter(array $args = [])
* @method \GuzzleHttp\Promise\Promise createPromptRouterAsync(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 deleteFoundationModelAgreement(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteFoundationModelAgreementAsync(array $args = [])
* @method \Aws\Result deleteGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGuardrailAsync(array $args = [])
* @method \Aws\Result deleteImportedModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteImportedModelAsync(array $args = [])
* @method \Aws\Result deleteInferenceProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteInferenceProfileAsync(array $args = [])
* @method \Aws\Result deleteMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteMarketplaceModelEndpointAsync(array $args = [])
* @method \Aws\Result deleteModelInvocationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteModelInvocationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result deletePromptRouter(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePromptRouterAsync(array $args = [])
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result deregisterMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise deregisterMarketplaceModelEndpointAsync(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 getFoundationModelAvailability(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFoundationModelAvailabilityAsync(array $args = [])
* @method \Aws\Result getGuardrail(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGuardrailAsync(array $args = [])
* @method \Aws\Result getImportedModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise getImportedModelAsync(array $args = [])
* @method \Aws\Result getInferenceProfile(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInferenceProfileAsync(array $args = [])
* @method \Aws\Result getMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise getMarketplaceModelEndpointAsync(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 getModelImportJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getModelImportJobAsync(array $args = [])
* @method \Aws\Result getModelInvocationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise getModelInvocationJobAsync(array $args = [])
* @method \Aws\Result getModelInvocationLoggingConfiguration(array $args = [])
* @method \GuzzleHttp\Promise\Promise getModelInvocationLoggingConfigurationAsync(array $args = [])
* @method \Aws\Result getPromptRouter(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPromptRouterAsync(array $args = [])
* @method \Aws\Result getProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise getProvisionedModelThroughputAsync(array $args = [])
* @method \Aws\Result getUseCaseForModelAccess(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUseCaseForModelAccessAsync(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 listFoundationModelAgreementOffers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFoundationModelAgreementOffersAsync(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 listImportedModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listImportedModelsAsync(array $args = [])
* @method \Aws\Result listInferenceProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInferenceProfilesAsync(array $args = [])
* @method \Aws\Result listMarketplaceModelEndpoints(array $args = [])
* @method \GuzzleHttp\Promise\Promise listMarketplaceModelEndpointsAsync(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 listModelImportJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listModelImportJobsAsync(array $args = [])
* @method \Aws\Result listModelInvocationJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listModelInvocationJobsAsync(array $args = [])
* @method \Aws\Result listPromptRouters(array $args = [])
* @method \GuzzleHttp\Promise\Promise listPromptRoutersAsync(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 putUseCaseForModelAccess(array $args = [])
* @method \GuzzleHttp\Promise\Promise putUseCaseForModelAccessAsync(array $args = [])
* @method \Aws\Result registerMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise registerMarketplaceModelEndpointAsync(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 stopModelInvocationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopModelInvocationJobAsync(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 updateMarketplaceModelEndpoint(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateMarketplaceModelEndpointAsync(array $args = [])
* @method \Aws\Result updateProvisionedModelThroughput(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateProvisionedModelThroughputAsync(array $args = [])
*/

View File

@@ -5,6 +5,8 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Agents for Amazon Bedrock** service.
* @method \Aws\Result associateAgentCollaborator(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateAgentCollaboratorAsync(array $args = [])
* @method \Aws\Result associateAgentKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise associateAgentKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result createAgent(array $args = [])
@@ -15,8 +17,18 @@ use Aws\AwsClient;
* @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 = [])
@@ -27,8 +39,20 @@ use Aws\AwsClient;
* @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 deleteKnowledgeBaseDocuments(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteKnowledgeBaseDocumentsAsync(array $args = [])
* @method \Aws\Result deletePrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise deletePromptAsync(array $args = [])
* @method \Aws\Result disassociateAgentCollaborator(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateAgentCollaboratorAsync(array $args = [])
* @method \Aws\Result disassociateAgentKnowledgeBase(array $args = [])
* @method \GuzzleHttp\Promise\Promise disassociateAgentKnowledgeBaseAsync(array $args = [])
* @method \Aws\Result getAgent(array $args = [])
@@ -37,20 +61,36 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getAgentActionGroupAsync(array $args = [])
* @method \Aws\Result getAgentAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAgentAliasAsync(array $args = [])
* @method \Aws\Result getAgentCollaborator(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAgentCollaboratorAsync(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 getKnowledgeBaseDocuments(array $args = [])
* @method \GuzzleHttp\Promise\Promise getKnowledgeBaseDocumentsAsync(array $args = [])
* @method \Aws\Result getPrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise getPromptAsync(array $args = [])
* @method \Aws\Result ingestKnowledgeBaseDocuments(array $args = [])
* @method \GuzzleHttp\Promise\Promise ingestKnowledgeBaseDocumentsAsync(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 listAgentCollaborators(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAgentCollaboratorsAsync(array $args = [])
* @method \Aws\Result listAgentKnowledgeBases(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAgentKnowledgeBasesAsync(array $args = [])
* @method \Aws\Result listAgentVersions(array $args = [])
@@ -59,16 +99,30 @@ use Aws\AwsClient;
* @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 listKnowledgeBaseDocuments(array $args = [])
* @method \GuzzleHttp\Promise\Promise listKnowledgeBaseDocumentsAsync(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 stopIngestionJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopIngestionJobAsync(array $args = [])
* @method \Aws\Result tagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = [])
@@ -79,11 +133,21 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise updateAgentActionGroupAsync(array $args = [])
* @method \Aws\Result updateAgentAlias(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAgentAliasAsync(array $args = [])
* @method \Aws\Result updateAgentCollaborator(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAgentCollaboratorAsync(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 = [])
* @method \Aws\Result validateFlowDefinition(array $args = [])
* @method \GuzzleHttp\Promise\Promise validateFlowDefinitionAsync(array $args = [])
*/
class BedrockAgentClient extends AwsClient {}

View File

@@ -5,11 +5,67 @@ use Aws\AwsClient;
/**
* This client is used to interact with the **Agents for Amazon Bedrock Runtime** service.
* @method \Aws\Result createInvocation(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInvocationAsync(array $args = [])
* @method \Aws\Result createSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise createSessionAsync(array $args = [])
* @method \Aws\Result deleteAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAgentMemoryAsync(array $args = [])
* @method \Aws\Result deleteSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteSessionAsync(array $args = [])
* @method \Aws\Result endSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise endSessionAsync(array $args = [])
* @method \Aws\Result generateQuery(array $args = [])
* @method \GuzzleHttp\Promise\Promise generateQueryAsync(array $args = [])
* @method \Aws\Result getAgentMemory(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAgentMemoryAsync(array $args = [])
* @method \Aws\Result getExecutionFlowSnapshot(array $args = [])
* @method \GuzzleHttp\Promise\Promise getExecutionFlowSnapshotAsync(array $args = [])
* @method \Aws\Result getFlowExecution(array $args = [])
* @method \GuzzleHttp\Promise\Promise getFlowExecutionAsync(array $args = [])
* @method \Aws\Result getInvocationStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise getInvocationStepAsync(array $args = [])
* @method \Aws\Result getSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise getSessionAsync(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 invokeInlineAgent(array $args = [])
* @method \GuzzleHttp\Promise\Promise invokeInlineAgentAsync(array $args = [])
* @method \Aws\Result listFlowExecutionEvents(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowExecutionEventsAsync(array $args = [])
* @method \Aws\Result listFlowExecutions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listFlowExecutionsAsync(array $args = [])
* @method \Aws\Result listInvocationSteps(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvocationStepsAsync(array $args = [])
* @method \Aws\Result listInvocations(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInvocationsAsync(array $args = [])
* @method \Aws\Result listSessions(array $args = [])
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
* @method \Aws\Result listTagsForResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
* @method \Aws\Result optimizePrompt(array $args = [])
* @method \GuzzleHttp\Promise\Promise optimizePromptAsync(array $args = [])
* @method \Aws\Result putInvocationStep(array $args = [])
* @method \GuzzleHttp\Promise\Promise putInvocationStepAsync(array $args = [])
* @method \Aws\Result rerank(array $args = [])
* @method \GuzzleHttp\Promise\Promise rerankAsync(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 = [])
* @method \Aws\Result retrieveAndGenerateStream(array $args = [])
* @method \GuzzleHttp\Promise\Promise retrieveAndGenerateStreamAsync(array $args = [])
* @method \Aws\Result startFlowExecution(array $args = [])
* @method \GuzzleHttp\Promise\Promise startFlowExecutionAsync(array $args = [])
* @method \Aws\Result stopFlowExecution(array $args = [])
* @method \GuzzleHttp\Promise\Promise stopFlowExecutionAsync(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 updateSession(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateSessionAsync(array $args = [])
*/
class BedrockAgentRuntimeClient extends AwsClient {}

Some files were not shown because too many files have changed in this diff Show More