v1.1.4
This commit is contained in:
parent
d6e6011c3d
commit
1dd5809016
606 changed files with 21760 additions and 3778 deletions
|
|
@ -1,5 +1,53 @@
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.1.4 =
|
||||||
|
|
||||||
|
_Release date: 2026-06-02_
|
||||||
|
|
||||||
|
**Highlights**
|
||||||
|
|
||||||
|
* Full dev tooling setup (PHPCS, PHPStan level 9, PHPUnit) and first test suite
|
||||||
|
* WordPress 7.1 and PHP 8.5 compatibility declared
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
|
||||||
|
* Composer dev tooling: PHPCS/WPCS, PHPStan (level 9), PHPUnit, PHPCompatibility
|
||||||
|
* phpstan.neon, phpcs.xml, phpunit.xml configuration
|
||||||
|
* PHPUnit test suite (22 tests, 54 assertions): plugin headers, Config, Rate_Limiter
|
||||||
|
* bin/deploy.sh: automated ZIP generation with production vendor only
|
||||||
|
* docs/: db-migrations.md, known-issues.md
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
* Tested up to WordPress 7.1; PHP compatibility extended to 8.5
|
||||||
|
* PHPStan level upgraded from 8 to 9
|
||||||
|
* `IDRIVEE2_MEDIA_VERSION` constant defined in plugin main file; replaces `get_file_data()` call in enqueue
|
||||||
|
* Admin page: proper `sanitize_key()` for `$_GET['page']`, type-check for `$_POST['test_file']`
|
||||||
|
* deploy.sh: switched from `composer update` to `composer install` for reproducible builds from lock file
|
||||||
|
* Logger stats: switched to `time() - ($n * DAY_IN_SECONDS)` arithmetic for consistent UTC dates
|
||||||
|
* uninstall.php: variable renamed to satisfy WP prefix naming rules
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
* WP_Filesystem null guard before file operations in Media_Uploader
|
||||||
|
* Type-safety on all `get_option()`/`get_transient()` results (guards against mixed types)
|
||||||
|
* Rate_Limiter arithmetic: transient value narrowed to int before subtraction
|
||||||
|
* robotstxt-updater.php: short ternary operators replaced, `serialize()` annotated
|
||||||
|
* Media_Uploader deletion queue: malformed `timestamp=0` entries now requeued instead of deleted immediately
|
||||||
|
* Logger: UTC-consistent date arithmetic in both `track_s3_operation()` and `get_s3_stats()`
|
||||||
|
|
||||||
|
**Compatibility**
|
||||||
|
|
||||||
|
* WordPress: 6.8 - 7.1
|
||||||
|
* PHP: 8.2 - 8.5
|
||||||
|
|
||||||
|
**Tests**
|
||||||
|
|
||||||
|
* PHP Coding Standards: 3.13.5 (0 errors)
|
||||||
|
* WordPress Coding Standards: 3.3.0 (0 violations)
|
||||||
|
* PHPStan: Level 9, 0 errors
|
||||||
|
* PHPCompatibility scan: 8.2-8.5
|
||||||
|
|
||||||
= 1.1.3 =
|
= 1.1.3 =
|
||||||
|
|
||||||
_Release date: 2026-02-04_
|
_Release date: 2026-02-04_
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
* Gitea Plugin URI: https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload
|
* Gitea Plugin URI: https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload
|
||||||
* Primary Branch: main
|
* Primary Branch: main
|
||||||
* Description: Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging.
|
* Description: Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging.
|
||||||
* Version: 1.1.3
|
* Version: 1.1.4
|
||||||
* Requires at least: 6.8
|
* Requires at least: 4.1
|
||||||
* Requires PHP: 8.2
|
* Requires PHP: 8.1
|
||||||
* Author: ROBOTSTXT
|
* Author: ROBOTSTXT
|
||||||
* Author URI: https://www.robotstxt.es/
|
* Author URI: https://www.robotstxt.es/
|
||||||
* License: GPL-3.0-or-later
|
* License: GPL-3.0-or-later
|
||||||
|
|
@ -31,14 +31,21 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin version constant.
|
||||||
|
*
|
||||||
|
* @since 1.1.4
|
||||||
|
*/
|
||||||
|
define( 'IDRIVEE2_MEDIA_VERSION', '1.1.4' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Composer autoloader if available.
|
* Load Composer autoloader if available.
|
||||||
*
|
*
|
||||||
* @since 0.1.13
|
* @since 0.1.13
|
||||||
*/
|
*/
|
||||||
$autoload = __DIR__ . '/vendor/autoload.php';
|
$idrivee2_autoload = __DIR__ . '/vendor/autoload.php';
|
||||||
if ( file_exists( $autoload ) ) {
|
if ( file_exists( $idrivee2_autoload ) ) {
|
||||||
require_once $autoload;
|
require_once $idrivee2_autoload;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,8 @@ class Admin_Page {
|
||||||
*/
|
*/
|
||||||
public function handle_test_actions(): void {
|
public function handle_test_actions(): void {
|
||||||
// Only process on settings page.
|
// Only process on settings page.
|
||||||
if ( ! isset( $_GET['page'] ) || 'idrivee2-media-upload' !== $_GET['page'] ) {
|
$current_page = isset( $_GET['page'] ) && is_string( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : '';
|
||||||
|
if ( 'idrivee2-media-upload' !== $current_page ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -179,7 +180,8 @@ class Admin_Page {
|
||||||
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'idrivee2-media-upload' ) );
|
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'idrivee2-media-upload' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->handle_delete_test( sanitize_file_name( wp_unslash( $_POST['test_file'] ) ) );
|
$raw_test_file = is_string( $_POST['test_file'] ) ? $_POST['test_file'] : '';
|
||||||
|
$this->handle_delete_test( sanitize_file_name( wp_unslash( $raw_test_file ) ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -333,7 +335,8 @@ class Admin_Page {
|
||||||
$this->logger->s3_operation( 'putObject', true, $file_name );
|
$this->logger->s3_operation( 'putObject', true, $file_name );
|
||||||
|
|
||||||
// Get the public URL - use CDN domain if configured, otherwise S3 ObjectURL.
|
// Get the public URL - use CDN domain if configured, otherwise S3 ObjectURL.
|
||||||
$object_url = $this->get_public_url( $file_name, $result['ObjectURL'] ?? '' );
|
$s3_object_url = isset( $result['ObjectURL'] ) && is_string( $result['ObjectURL'] ) ? $result['ObjectURL'] : '';
|
||||||
|
$object_url = $this->get_public_url( $file_name, $s3_object_url );
|
||||||
|
|
||||||
set_transient(
|
set_transient(
|
||||||
'idrivee2_test_result',
|
'idrivee2_test_result',
|
||||||
|
|
@ -546,7 +549,7 @@ class Admin_Page {
|
||||||
'idrivee2-media-admin',
|
'idrivee2-media-admin',
|
||||||
plugin_dir_url( $this->plugin_file ) . 'assets/js/admin.js',
|
plugin_dir_url( $this->plugin_file ) . 'assets/js/admin.js',
|
||||||
array( 'jquery' ),
|
array( 'jquery' ),
|
||||||
'0.3.0',
|
defined( 'IDRIVEE2_MEDIA_VERSION' ) ? IDRIVEE2_MEDIA_VERSION : '1.0.0',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -781,14 +784,20 @@ class Admin_Page {
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// Display test results if available.
|
// Display test results if available.
|
||||||
$test_result = get_transient( 'idrivee2_test_result' );
|
$test_result_raw = get_transient( 'idrivee2_test_result' );
|
||||||
if ( $test_result ) {
|
if ( is_array( $test_result_raw ) ) {
|
||||||
|
/**
|
||||||
|
* Typed test result data from transient.
|
||||||
|
*
|
||||||
|
* @var array{type: string, message: string, file_name?: string, object_url?: string} $test_result
|
||||||
|
*/
|
||||||
|
$test_result = $test_result_raw;
|
||||||
delete_transient( 'idrivee2_test_result' );
|
delete_transient( 'idrivee2_test_result' );
|
||||||
$notice_class = 'notice-' . $test_result['type'];
|
$notice_class = 'notice-' . $test_result['type'];
|
||||||
?>
|
?>
|
||||||
<div class="notice <?php echo esc_attr( $notice_class ); ?>">
|
<div class="notice <?php echo esc_attr( $notice_class ); ?>">
|
||||||
<p><strong><?php echo wp_kses_post( $test_result['message'] ); ?></strong></p>
|
<p><strong><?php echo wp_kses_post( $test_result['message'] ); ?></strong></p>
|
||||||
<?php if ( isset( $test_result['file_name'] ) && isset( $test_result['object_url'] ) ) : ?>
|
<?php if ( isset( $test_result['file_name'], $test_result['object_url'] ) ) : ?>
|
||||||
<p>
|
<p>
|
||||||
<?php
|
<?php
|
||||||
printf(
|
printf(
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,10 @@ class Config {
|
||||||
|
|
||||||
// Fall back to WordPress option.
|
// Fall back to WordPress option.
|
||||||
$options = get_option( self::OPTION_NAME, array() );
|
$options = get_option( self::OPTION_NAME, array() );
|
||||||
return isset( $options[ $key ] ) ? (string) $options[ $key ] : '';
|
if ( ! is_array( $options ) ) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
return isset( $options[ $key ] ) && is_string( $options[ $key ] ) ? $options[ $key ] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -223,7 +226,8 @@ class Config {
|
||||||
*/
|
*/
|
||||||
public function update_options( array $data ): bool {
|
public function update_options( array $data ): bool {
|
||||||
// Get current options for comparison.
|
// Get current options for comparison.
|
||||||
$old_options = get_option( self::OPTION_NAME, array() );
|
$raw_old = get_option( self::OPTION_NAME, array() );
|
||||||
|
$old_options = is_array( $raw_old ) ? $raw_old : array();
|
||||||
|
|
||||||
// Validate and sanitize data.
|
// Validate and sanitize data.
|
||||||
$options = array(
|
$options = array(
|
||||||
|
|
@ -238,7 +242,7 @@ class Config {
|
||||||
// Log configuration changes.
|
// Log configuration changes.
|
||||||
if ( $this->logger ) {
|
if ( $this->logger ) {
|
||||||
foreach ( $options as $key => $new_value ) {
|
foreach ( $options as $key => $new_value ) {
|
||||||
$old_value = isset( $old_options[ $key ] ) ? $old_options[ $key ] : '';
|
$old_value = isset( $old_options[ $key ] ) && is_string( $old_options[ $key ] ) ? $old_options[ $key ] : '';
|
||||||
if ( $old_value !== $new_value ) {
|
if ( $old_value !== $new_value ) {
|
||||||
$this->logger->config_change( $key, $old_value, $new_value );
|
$this->logger->config_change( $key, $old_value, $new_value );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ class Logger {
|
||||||
'Authentication failure: ' . $reason,
|
'Authentication failure: ' . $reason,
|
||||||
array(
|
array(
|
||||||
'ip' => $this->get_client_ip(),
|
'ip' => $this->get_client_ip(),
|
||||||
'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '',
|
'user_agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) && is_string( $_SERVER['HTTP_USER_AGENT'] ) ? sanitize_text_field( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ) ) : '',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -244,7 +244,7 @@ class Logger {
|
||||||
private function get_client_ip(): string {
|
private function get_client_ip(): string {
|
||||||
$ip = '';
|
$ip = '';
|
||||||
|
|
||||||
if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
|
if ( isset( $_SERVER['REMOTE_ADDR'] ) && is_string( $_SERVER['REMOTE_ADDR'] ) ) {
|
||||||
$ip = sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
|
$ip = sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -280,7 +280,13 @@ class Logger {
|
||||||
*/
|
*/
|
||||||
private function track_s3_operation( string $operation ): void {
|
private function track_s3_operation( string $operation ): void {
|
||||||
$option_key = 'idrivee2_s3_operations';
|
$option_key = 'idrivee2_s3_operations';
|
||||||
$stats = get_option( $option_key, array() );
|
$raw = get_option( $option_key, array() );
|
||||||
|
/**
|
||||||
|
* Daily S3 operation counts, keyed by date and operation name.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, int>> $stats
|
||||||
|
*/
|
||||||
|
$stats = is_array( $raw ) ? $raw : array();
|
||||||
|
|
||||||
// Initialize stats for today if not exists.
|
// Initialize stats for today if not exists.
|
||||||
$today = gmdate( 'Y-m-d' );
|
$today = gmdate( 'Y-m-d' );
|
||||||
|
|
@ -294,8 +300,8 @@ class Logger {
|
||||||
|
|
||||||
++$stats[ $today ][ $operation ];
|
++$stats[ $today ][ $operation ];
|
||||||
|
|
||||||
// Keep only last 30 days.
|
// Keep only last 30 days. Use time() arithmetic to stay in UTC (avoids strtotime local-tz).
|
||||||
$cutoff_date = gmdate( 'Y-m-d', strtotime( '-30 days' ) );
|
$cutoff_date = gmdate( 'Y-m-d', time() - ( 30 * DAY_IN_SECONDS ) );
|
||||||
foreach ( array_keys( $stats ) as $date ) {
|
foreach ( array_keys( $stats ) as $date ) {
|
||||||
if ( $date < $cutoff_date ) {
|
if ( $date < $cutoff_date ) {
|
||||||
unset( $stats[ $date ] );
|
unset( $stats[ $date ] );
|
||||||
|
|
@ -314,16 +320,18 @@ class Logger {
|
||||||
* @return array<string, array<string, int>> Statistics array indexed by date and operation.
|
* @return array<string, array<string, int>> Statistics array indexed by date and operation.
|
||||||
*/
|
*/
|
||||||
public function get_s3_stats( int $days = 7 ): array {
|
public function get_s3_stats( int $days = 7 ): array {
|
||||||
$days = min( $days, 30 );
|
$days = min( $days, 30 );
|
||||||
$stats = get_option( 'idrivee2_s3_operations', array() );
|
$raw = get_option( 'idrivee2_s3_operations', array() );
|
||||||
|
/**
|
||||||
|
* Daily S3 operation counts, keyed by date and operation name.
|
||||||
|
*
|
||||||
|
* @var array<string, array<string, int>> $stats
|
||||||
|
*/
|
||||||
|
$stats = is_array( $raw ) ? $raw : array();
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
for ( $i = 0; $i < $days; $i++ ) {
|
for ( $i = 0; $i < $days; $i++ ) {
|
||||||
$timestamp = strtotime( "-$i days" );
|
$date = gmdate( 'Y-m-d', time() - ( $i * DAY_IN_SECONDS ) );
|
||||||
if ( false === $timestamp ) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$date = gmdate( 'Y-m-d', $timestamp );
|
|
||||||
if ( isset( $stats[ $date ] ) ) {
|
if ( isset( $stats[ $date ] ) ) {
|
||||||
$result[ $date ] = $stats[ $date ];
|
$result[ $date ] = $stats[ $date ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,14 +107,21 @@ class Media_Uploader {
|
||||||
$client = $this->client_factory->create();
|
$client = $this->client_factory->create();
|
||||||
|
|
||||||
// Build list of files: original + each image size.
|
// Build list of files: original + each image size.
|
||||||
|
$meta_file = isset( $meta['file'] ) && is_string( $meta['file'] ) ? $meta['file'] : '';
|
||||||
|
if ( '' === $meta_file ) {
|
||||||
|
return $meta;
|
||||||
|
}
|
||||||
|
|
||||||
$upload_dir = wp_upload_dir();
|
$upload_dir = wp_upload_dir();
|
||||||
$base_path = path_join( $upload_dir['basedir'], $meta['file'] );
|
$basedir = $upload_dir['basedir'];
|
||||||
|
$base_path = path_join( $basedir, $meta_file );
|
||||||
$files = array(
|
$files = array(
|
||||||
'original' => $base_path,
|
'original' => $base_path,
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( ! empty( $meta['sizes'] ) && is_array( $meta['sizes'] ) ) {
|
$meta_sizes = isset( $meta['sizes'] ) && is_array( $meta['sizes'] ) ? $meta['sizes'] : array();
|
||||||
foreach ( $meta['sizes'] as $size ) {
|
foreach ( $meta_sizes as $size ) {
|
||||||
|
if ( is_array( $size ) && isset( $size['file'] ) && is_string( $size['file'] ) ) {
|
||||||
$files[ $size['file'] ] = path_join( dirname( $base_path ), $size['file'] );
|
$files[ $size['file'] ] = path_join( dirname( $base_path ), $size['file'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -124,8 +131,8 @@ class Media_Uploader {
|
||||||
sprintf( 'Preparing to upload %d files to S3', count( $files ) ),
|
sprintf( 'Preparing to upload %d files to S3', count( $files ) ),
|
||||||
array(
|
array(
|
||||||
'attachment_id' => $attachment_id,
|
'attachment_id' => $attachment_id,
|
||||||
'original' => basename( $meta['file'] ),
|
'original' => basename( $meta_file ),
|
||||||
'sizes_count' => count( $meta['sizes'] ?? array() ),
|
'sizes_count' => count( $meta_sizes ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -140,6 +147,11 @@ class Media_Uploader {
|
||||||
WP_Filesystem();
|
WP_Filesystem();
|
||||||
global $wp_filesystem;
|
global $wp_filesystem;
|
||||||
|
|
||||||
|
if ( ! ( $wp_filesystem instanceof \WP_Filesystem_Base ) ) {
|
||||||
|
$this->logger->error( 'WP_Filesystem not available, aborting S3 upload' );
|
||||||
|
return $meta;
|
||||||
|
}
|
||||||
|
|
||||||
// Upload each file via WP_Filesystem.
|
// Upload each file via WP_Filesystem.
|
||||||
foreach ( $files as $key => $local_path ) {
|
foreach ( $files as $key => $local_path ) {
|
||||||
// Skip if file doesn't exist.
|
// Skip if file doesn't exist.
|
||||||
|
|
@ -156,8 +168,8 @@ class Media_Uploader {
|
||||||
|
|
||||||
// Determine S3 object key.
|
// Determine S3 object key.
|
||||||
$object_key = ( 'original' === $key )
|
$object_key = ( 'original' === $key )
|
||||||
? $meta['file']
|
? $meta_file
|
||||||
: dirname( $meta['file'] ) . '/' . $key;
|
: dirname( $meta_file ) . '/' . $key;
|
||||||
|
|
||||||
// Check if file already exists in S3.
|
// Check if file already exists in S3.
|
||||||
try {
|
try {
|
||||||
|
|
@ -229,14 +241,14 @@ class Media_Uploader {
|
||||||
if ( 'original' === $key ) {
|
if ( 'original' === $key ) {
|
||||||
// Build CDN URL if domain configured, otherwise use S3 URL.
|
// Build CDN URL if domain configured, otherwise use S3 URL.
|
||||||
if ( $this->config->has_domain() ) {
|
if ( $this->config->has_domain() ) {
|
||||||
$s3_base_url = trailingslashit( $this->config->get_domain() ) . dirname( $meta['file'] );
|
$s3_base_url = trailingslashit( $this->config->get_domain() ) . dirname( $meta_file );
|
||||||
} elseif ( ! empty( $result['ObjectURL'] ) ) {
|
} elseif ( isset( $result['ObjectURL'] ) && is_string( $result['ObjectURL'] ) && '' !== $result['ObjectURL'] ) {
|
||||||
$object_url = $result['ObjectURL'];
|
$object_url = $result['ObjectURL'];
|
||||||
$s3_base_url = dirname( $result['ObjectURL'] );
|
$s3_base_url = dirname( $result['ObjectURL'] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$upload_count++;
|
++$upload_count;
|
||||||
|
|
||||||
} catch ( \Aws\Exception\AwsException $e ) {
|
} catch ( \Aws\Exception\AwsException $e ) {
|
||||||
// Log failed upload.
|
// Log failed upload.
|
||||||
|
|
@ -266,14 +278,14 @@ class Media_Uploader {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Preserve relative path in database.
|
// Preserve relative path in database.
|
||||||
update_post_meta( $attachment_id, '_wp_attached_file', $meta['file'] );
|
update_post_meta( $attachment_id, '_wp_attached_file', $meta_file );
|
||||||
|
|
||||||
// Update GUID to use CDN URL if available, otherwise S3 URL.
|
// Update GUID to use CDN URL if available, otherwise S3 URL.
|
||||||
if ( $s3_base_url ) {
|
if ( $s3_base_url ) {
|
||||||
$file_name = basename( $meta['file'] );
|
$file_name = basename( $meta_file );
|
||||||
if ( $this->config->has_domain() ) {
|
if ( $this->config->has_domain() ) {
|
||||||
// Use CDN domain.
|
// Use CDN domain.
|
||||||
$public_url = trailingslashit( $this->config->get_domain() ) . $meta['file'];
|
$public_url = trailingslashit( $this->config->get_domain() ) . $meta_file;
|
||||||
} elseif ( $object_url ) {
|
} elseif ( $object_url ) {
|
||||||
// Use S3 ObjectURL.
|
// Use S3 ObjectURL.
|
||||||
$public_url = $object_url;
|
$public_url = $object_url;
|
||||||
|
|
@ -321,7 +333,8 @@ class Media_Uploader {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
private function schedule_files_for_deletion( array $files ): void {
|
private function schedule_files_for_deletion( array $files ): void {
|
||||||
$queue = get_option( 'idrivee2_deletion_queue', array() );
|
$raw_q = get_option( 'idrivee2_deletion_queue', array() );
|
||||||
|
$queue = is_array( $raw_q ) ? $raw_q : array();
|
||||||
|
|
||||||
foreach ( $files as $file_path ) {
|
foreach ( $files as $file_path ) {
|
||||||
$queue[] = array(
|
$queue[] = array(
|
||||||
|
|
@ -348,9 +361,9 @@ class Media_Uploader {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function cleanup_local_files(): void {
|
public function cleanup_local_files(): void {
|
||||||
$queue = get_option( 'idrivee2_deletion_queue', array() );
|
$raw_queue = get_option( 'idrivee2_deletion_queue', array() );
|
||||||
|
|
||||||
if ( empty( $queue ) ) {
|
if ( ! is_array( $raw_queue ) || empty( $raw_queue ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -361,13 +374,32 @@ class Media_Uploader {
|
||||||
WP_Filesystem();
|
WP_Filesystem();
|
||||||
global $wp_filesystem;
|
global $wp_filesystem;
|
||||||
|
|
||||||
|
if ( ! ( $wp_filesystem instanceof \WP_Filesystem_Base ) ) {
|
||||||
|
$this->logger->error( 'WP_Filesystem not available, aborting cleanup' );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$current_time = time();
|
$current_time = time();
|
||||||
$new_queue = array();
|
$new_queue = array();
|
||||||
$deleted = 0;
|
$deleted = 0;
|
||||||
|
|
||||||
foreach ( $queue as $item ) {
|
foreach ( $raw_queue as $item ) {
|
||||||
$file_path = $item['path'];
|
if ( ! is_array( $item ) ) {
|
||||||
$timestamp = $item['timestamp'];
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$file_path = isset( $item['path'] ) && is_string( $item['path'] ) ? $item['path'] : '';
|
||||||
|
$timestamp = isset( $item['timestamp'] ) && is_int( $item['timestamp'] ) ? $item['timestamp'] : 0;
|
||||||
|
|
||||||
|
if ( '' === $file_path ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Requeue items with a malformed timestamp rather than deleting immediately.
|
||||||
|
if ( 0 === $timestamp ) {
|
||||||
|
$new_queue[] = $item;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Only delete files older than 3 minutes.
|
// Only delete files older than 3 minutes.
|
||||||
if ( ( $current_time - $timestamp ) < 180 ) {
|
if ( ( $current_time - $timestamp ) < 180 ) {
|
||||||
|
|
@ -377,9 +409,9 @@ class Media_Uploader {
|
||||||
|
|
||||||
// Delete the file if it exists.
|
// Delete the file if it exists.
|
||||||
if ( $wp_filesystem->exists( $file_path ) ) {
|
if ( $wp_filesystem->exists( $file_path ) ) {
|
||||||
$result = $wp_filesystem->delete( $file_path );
|
$deleted_ok = $wp_filesystem->delete( $file_path );
|
||||||
if ( $result ) {
|
if ( $deleted_ok ) {
|
||||||
$deleted++;
|
++$deleted;
|
||||||
$this->logger->info(
|
$this->logger->info(
|
||||||
'Local file deleted after S3 upload',
|
'Local file deleted after S3 upload',
|
||||||
array( 'path' => basename( $file_path ) )
|
array( 'path' => basename( $file_path ) )
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ class Plugin {
|
||||||
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ), 20 );
|
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ), 20 );
|
||||||
|
|
||||||
// Add custom cron interval.
|
// Add custom cron interval.
|
||||||
add_filter( 'cron_schedules', array( $this, 'add_cron_intervals' ) );
|
add_filter( 'cron_schedules', array( $this, 'add_cron_intervals' ) ); // phpcs:ignore WordPress.WP.CronInterval.CronSchedulesInterval -- 5-min cleanup is required for timely local file deletion after S3 upload.
|
||||||
|
|
||||||
// Register component hooks.
|
// Register component hooks.
|
||||||
$this->admin_page->register();
|
$this->admin_page->register();
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,10 @@ class Rate_Limiter {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! is_int( $last_time ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$time_since_last = time() - $last_time;
|
$time_since_last = time() - $last_time;
|
||||||
|
|
||||||
if ( $time_since_last < $seconds ) {
|
if ( $time_since_last < $seconds ) {
|
||||||
|
|
@ -114,7 +118,7 @@ class Rate_Limiter {
|
||||||
$transient_key = $this->get_transient_key( $action, $user_id );
|
$transient_key = $this->get_transient_key( $action, $user_id );
|
||||||
$last_time = get_transient( $transient_key );
|
$last_time = get_transient( $transient_key );
|
||||||
|
|
||||||
if ( false === $last_time ) {
|
if ( false === $last_time || ! is_int( $last_time ) ) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class URL_Rewriter {
|
||||||
* @param int $post_id The attachment post ID (required by filter signature, unused).
|
* @param int $post_id The attachment post ID (required by filter signature, unused).
|
||||||
* @return string The filtered URL, using the iDrivee2 domain if defined.
|
* @return string The filtered URL, using the iDrivee2 domain if defined.
|
||||||
*/
|
*/
|
||||||
public function filter_attachment_url( string $url, int $post_id ): string {
|
public function filter_attachment_url( string $url, int $post_id ): string { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed -- Required by wp_get_attachment_url filter signature.
|
||||||
if ( $this->config->has_domain() ) {
|
if ( $this->config->has_domain() ) {
|
||||||
$uploads = wp_upload_dir();
|
$uploads = wp_upload_dir();
|
||||||
$old_base = untrailingslashit( $uploads['baseurl'] );
|
$old_base = untrailingslashit( $uploads['baseurl'] );
|
||||||
|
|
|
||||||
68
readme.txt
68
readme.txt
|
|
@ -1,11 +1,11 @@
|
||||||
=== iDrivee2 Media Upload ===
|
=== iDrivee2 Media Upload ===
|
||||||
Contributors: robotstxt, javiercasares
|
Contributors: robotstxt, javiercasares
|
||||||
Tags: media, upload, s3, cdn, storage, idrivee2, cloud
|
Tags: media, upload, s3, cdn, storage, idrivee2, cloud
|
||||||
Requires at least: 6.8
|
Requires at least: 4.1
|
||||||
Tested up to: 6.9
|
Tested up to: 7.1
|
||||||
Stable tag: 1.1.3
|
Stable tag: 1.1.4
|
||||||
Requires PHP: 8.2
|
Requires PHP: 8.1
|
||||||
Version: 1.1.3
|
Version: 1.1.4
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||||
|
|
||||||
|
|
@ -24,7 +24,7 @@ iDrivee2 Media Upload is a WordPress plugin that automatically uploads media fil
|
||||||
* **Rate Limiting**: Protection against abuse with configurable cooldown periods
|
* **Rate Limiting**: Protection against abuse with configurable cooldown periods
|
||||||
* **Admin Interface**: Test S3 connection and upload test files from WordPress admin
|
* **Admin Interface**: Test S3 connection and upload test files from WordPress admin
|
||||||
* **Multisite Support**: Works seamlessly with WordPress Multisite installations
|
* **Multisite Support**: Works seamlessly with WordPress Multisite installations
|
||||||
* **Type-Safe Code**: PHPStan level 8 compliance with strict type declarations
|
* **Type-Safe Code**: PHPStan level 9 compliance with strict type declarations
|
||||||
* **OWASP Compliant**: All OWASP Top 10 (2021) vulnerabilities addressed
|
* **OWASP Compliant**: All OWASP Top 10 (2021) vulnerabilities addressed
|
||||||
|
|
||||||
**Security Features:**
|
**Security Features:**
|
||||||
|
|
@ -179,8 +179,8 @@ PHP 8.2 or higher is required. The plugin uses strict type declarations and is t
|
||||||
|
|
||||||
== Compatibility ==
|
== Compatibility ==
|
||||||
|
|
||||||
* WordPress: 6.8 - 6.9
|
* WordPress: 6.8 - 7.1
|
||||||
* PHP: 8.2 - 8.4
|
* PHP: 8.2 - 8.5
|
||||||
* MariaDB: 10.6+
|
* MariaDB: 10.6+
|
||||||
* MySQL: 5.7+
|
* MySQL: 5.7+
|
||||||
|
|
||||||
|
|
@ -188,11 +188,59 @@ PHP 8.2 or higher is required. The plugin uses strict type declarations and is t
|
||||||
|
|
||||||
* PHP Coding Standards: 0 errors
|
* PHP Coding Standards: 0 errors
|
||||||
* WordPress Coding Standards (WPCS): 3.3 (0 violations)
|
* WordPress Coding Standards (WPCS): 3.3 (0 violations)
|
||||||
* PHPStan: Level 8 (0 errors, maximum strictness)
|
* PHPStan: Level 9 (0 errors, maximum strictness)
|
||||||
* PHPCompatibility: 8.2-8.4 (fully compatible)
|
* PHP Coding Standards: 0 errors
|
||||||
|
* WordPress Coding Standards (WPCS): 3.3 (0 violations)
|
||||||
|
* PHPStan: Level 9 (0 errors, maximum strictness)
|
||||||
|
* PHPCompatibility: 8.2-8.5 (fully compatible)
|
||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 1.1.4 =
|
||||||
|
|
||||||
|
_Release date: 2026-06-02_
|
||||||
|
|
||||||
|
**Added**
|
||||||
|
|
||||||
|
* Composer dev tooling: PHPCS, WPCS, PHPStan (level 9), PHPUnit, PHPCompatibility
|
||||||
|
* phpstan.neon, phpcs.xml, phpunit.xml configuration files
|
||||||
|
* PHPUnit test suite: plugin header tests, Config and Rate_Limiter unit tests (22 tests, 54 assertions)
|
||||||
|
* bin/deploy.sh: automated distributable ZIP generation with production-only vendor
|
||||||
|
* docs/ directory: db-migrations.md, known-issues.md
|
||||||
|
|
||||||
|
**Changed**
|
||||||
|
|
||||||
|
* Tested up to WordPress 7.1
|
||||||
|
* PHP compatibility declared: 8.2–8.5
|
||||||
|
* PHPStan raised from level 8 to level 9 (0 errors)
|
||||||
|
* PHPCS raised to full WordPress-Core, WordPress-Docs, WordPress-Extra compliance (0 errors)
|
||||||
|
* `IDRIVEE2_MEDIA_VERSION` constant introduced; replaces `get_file_data()` call in admin script enqueue
|
||||||
|
* Admin page: `$_GET['page']` now properly sanitized with `sanitize_key()`
|
||||||
|
* Admin page: `$_POST['test_file']` type-checked before `sanitize_file_name()`
|
||||||
|
* deploy.sh: switched from `composer update` to `composer install` for reproducible builds
|
||||||
|
* Logger stats: UTC-consistent date arithmetic (`time() - ($n * DAY_IN_SECONDS)`)
|
||||||
|
* uninstall.php: variable renamed to `$idrivee2_next_scheduled` (WP prefix rule)
|
||||||
|
|
||||||
|
**Fixed**
|
||||||
|
|
||||||
|
* WP_Filesystem null guard in `Media_Uploader::upload_attachment_to_idrivee2()` and `cleanup_local_files()`
|
||||||
|
* Type safety: all `get_option()`/`get_transient()` mixed values now narrowed before use
|
||||||
|
* Deletion queue: entries with malformed timestamp now requeued instead of deleted immediately
|
||||||
|
* robotstxt-updater.php: short ternary operators replaced, `serialize()` annotated with justification
|
||||||
|
* Rate_Limiter: transient value narrowed to int before arithmetic operations
|
||||||
|
|
||||||
|
**Compatibility**
|
||||||
|
|
||||||
|
* WordPress: 6.8 - 7.1
|
||||||
|
* PHP: 8.2 - 8.5
|
||||||
|
|
||||||
|
**Tests**
|
||||||
|
|
||||||
|
* PHP Coding Standards: 3.13.5 (0 errors)
|
||||||
|
* WordPress Coding Standards: 3.3.0 (0 violations)
|
||||||
|
* PHPStan: Level 9 (0 errors)
|
||||||
|
* PHPCompatibility: 8.2-8.5
|
||||||
|
|
||||||
= 1.1.2 =
|
= 1.1.2 =
|
||||||
|
|
||||||
_Release date: 2026-02-04_
|
_Release date: 2026-02-04_
|
||||||
|
|
|
||||||
|
|
@ -22,362 +22,389 @@ if ( ! class_exists( 'Robotstxt_Updater' ) ) {
|
||||||
*/
|
*/
|
||||||
class Robotstxt_Updater {
|
class Robotstxt_Updater {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin file path.
|
* Plugin file path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private string $plugin_file_path;
|
private string $plugin_file_path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin basename (e.g., 'my-plugin/my-plugin.php').
|
* Plugin basename (e.g., 'my-plugin/my-plugin.php').
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private string $plugin_basename;
|
private string $plugin_basename;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin slug (directory name).
|
* Plugin slug (directory name).
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private string $plugin_slug;
|
private string $plugin_slug;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remote JSON URL.
|
* Remote JSON URL.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private string $json_url;
|
private string $json_url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache key.
|
* Cache key.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
private string $cache_key;
|
private string $cache_key;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin headers.
|
* Plugin headers.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
private array $plugin_data;
|
private array $plugin_data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the updater.
|
* Initialize the updater.
|
||||||
*
|
*
|
||||||
* Usage in your main plugin file:
|
* Usage in your main plugin file:
|
||||||
* require_once __DIR__ . '/robotstxt-updater.php';
|
* require_once __DIR__ . '/robotstxt-updater.php';
|
||||||
* Robotstxt_Updater::init( __FILE__ );
|
* Robotstxt_Updater::init( __FILE__ );
|
||||||
*
|
*
|
||||||
* @param string $plugin_file_path Absolute path to the main plugin file.
|
* @param string $plugin_file_path Absolute path to the main plugin file.
|
||||||
*/
|
*/
|
||||||
public static function init( string $plugin_file_path ): void {
|
public static function init( string $plugin_file_path ): void {
|
||||||
$instance = new self( $plugin_file_path );
|
$instance = new self( $plugin_file_path );
|
||||||
$instance->register();
|
$instance->register();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor.
|
|
||||||
*
|
|
||||||
* @param string $plugin_file_path Absolute path to the main plugin file.
|
|
||||||
*/
|
|
||||||
private function __construct( string $plugin_file_path ) {
|
|
||||||
$this->plugin_file_path = $plugin_file_path;
|
|
||||||
$this->plugin_basename = plugin_basename( $plugin_file_path );
|
|
||||||
$this->plugin_slug = dirname( $this->plugin_basename );
|
|
||||||
$this->plugin_data = $this->get_plugin_data();
|
|
||||||
$this->json_url = $this->build_json_url();
|
|
||||||
$this->cache_key = 'robotstxt_updater_' . md5( $this->plugin_basename );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register WordPress hooks.
|
|
||||||
*/
|
|
||||||
private function register(): void {
|
|
||||||
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'inject_update_info' ) );
|
|
||||||
add_filter( 'plugins_api', array( $this, 'provide_plugin_details' ), 10, 3 );
|
|
||||||
add_action( 'admin_init', array( $this, 'handle_cache_clear' ) );
|
|
||||||
add_action( 'robotstxt_updater_clear_cache', array( $this, 'clear_cache' ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get plugin headers.
|
|
||||||
*
|
|
||||||
* @return array Plugin data.
|
|
||||||
*/
|
|
||||||
private function get_plugin_data(): array {
|
|
||||||
if ( ! function_exists( 'get_plugin_data' ) ) {
|
|
||||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return get_plugin_data( $this->plugin_file_path, false, false );
|
/**
|
||||||
}
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $plugin_file_path Absolute path to the main plugin file.
|
||||||
|
*/
|
||||||
|
private function __construct( string $plugin_file_path ) {
|
||||||
|
$this->plugin_file_path = $plugin_file_path;
|
||||||
|
$this->plugin_basename = plugin_basename( $plugin_file_path );
|
||||||
|
$this->plugin_slug = dirname( $this->plugin_basename );
|
||||||
|
$this->plugin_data = $this->get_plugin_data();
|
||||||
|
$this->json_url = $this->build_json_url();
|
||||||
|
$this->cache_key = 'robotstxt_updater_' . md5( $this->plugin_basename );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build JSON URL from plugin headers.
|
* Register WordPress hooks.
|
||||||
*
|
*/
|
||||||
* Tries to use "Gitea Plugin URI" header to construct the URL.
|
private function register(): void {
|
||||||
* Falls back to Plugin URI if Gitea URI is not available.
|
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'inject_update_info' ) );
|
||||||
*
|
add_filter( 'plugins_api', array( $this, 'provide_plugin_details' ), 10, 3 );
|
||||||
* @return string JSON URL.
|
add_action( 'admin_init', array( $this, 'handle_cache_clear' ) );
|
||||||
*/
|
add_action( 'robotstxt_updater_clear_cache', array( $this, 'clear_cache' ) );
|
||||||
private function build_json_url(): string {
|
}
|
||||||
// Try Gitea Plugin URI (format: "OWNER/REPO" or full URL).
|
|
||||||
if ( ! empty( $this->plugin_data['Gitea Plugin URI'] ) ) {
|
|
||||||
$gitea_uri = $this->plugin_data['Gitea Plugin URI'];
|
|
||||||
|
|
||||||
// If it's already a full URL, use it.
|
/**
|
||||||
if ( str_starts_with( $gitea_uri, 'http' ) ) {
|
* Get plugin headers.
|
||||||
// Extract base URL and construct JSON path.
|
*
|
||||||
return rtrim( $gitea_uri, '/' ) . '/raw/branch/main/update.json';
|
* @return array<string, string> Plugin data.
|
||||||
|
*/
|
||||||
|
private function get_plugin_data(): array {
|
||||||
|
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||||
|
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's in format "OWNER/REPO", construct full URL.
|
/**
|
||||||
if ( preg_match( '#^[^/]+/[^/]+$#', $gitea_uri ) ) {
|
* Plugin file header data.
|
||||||
return "https://git.robotstxt.es/{$gitea_uri}/raw/branch/main/update.json";
|
*
|
||||||
}
|
* @var array<string, string> $data
|
||||||
|
*/
|
||||||
|
$data = get_plugin_data( $this->plugin_file_path, false, false );
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: try to extract from Plugin URI.
|
/**
|
||||||
if ( ! empty( $this->plugin_data['PluginURI'] ) ) {
|
* Safely cast a mixed value to string.
|
||||||
$plugin_uri = $this->plugin_data['PluginURI'];
|
*
|
||||||
if ( str_contains( $plugin_uri, 'git.robotstxt.es' ) ) {
|
* @param mixed $value The value to cast.
|
||||||
return rtrim( $plugin_uri, '/' ) . '/raw/branch/main/update.json';
|
* @param string $default Fallback when value is not a string.
|
||||||
}
|
* @return string
|
||||||
|
*/
|
||||||
|
private function str_val( mixed $value, string $default = '' ): string {
|
||||||
|
return is_string( $value ) ? $value : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Last resort: construct from plugin slug.
|
/**
|
||||||
return "https://git.robotstxt.es/ROBOTSTXT/{$this->plugin_slug}/raw/branch/main/update.json";
|
* Build JSON URL from plugin headers.
|
||||||
}
|
*
|
||||||
|
* Tries to use "Gitea Plugin URI" header to construct the URL.
|
||||||
|
* Falls back to Plugin URI if Gitea URI is not available.
|
||||||
|
*
|
||||||
|
* @return string JSON URL.
|
||||||
|
*/
|
||||||
|
private function build_json_url(): string {
|
||||||
|
// Try Gitea Plugin URI (format: "OWNER/REPO" or full URL).
|
||||||
|
if ( ! empty( $this->plugin_data['Gitea Plugin URI'] ) ) {
|
||||||
|
$gitea_uri = $this->plugin_data['Gitea Plugin URI'];
|
||||||
|
|
||||||
/**
|
// If it's already a full URL, use it.
|
||||||
* Inject update info into WP's plugin update transient.
|
if ( str_starts_with( $gitea_uri, 'http' ) ) {
|
||||||
*
|
// Extract base URL and construct JSON path.
|
||||||
* @param object|mixed $transient The update_plugins transient.
|
return rtrim( $gitea_uri, '/' ) . '/raw/branch/main/update.json';
|
||||||
*
|
|
||||||
* @return object The modified transient.
|
|
||||||
*/
|
|
||||||
public function inject_update_info( $transient ) {
|
|
||||||
if ( ! is_object( $transient ) ) {
|
|
||||||
$transient = new stdClass();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty( $transient->checked ) || ! is_array( $transient->checked ) ) {
|
|
||||||
return $transient;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty( $transient->checked[ $this->plugin_basename ] ) ) {
|
|
||||||
return $transient;
|
|
||||||
}
|
|
||||||
|
|
||||||
$current_version = $transient->checked[ $this->plugin_basename ];
|
|
||||||
$remote = $this->get_remote_data();
|
|
||||||
|
|
||||||
if ( empty( $remote['version'] ) || empty( $remote['download_url'] ) ) {
|
|
||||||
return $transient;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! $this->is_compatible( $remote ) ) {
|
|
||||||
return $transient;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( version_compare( $remote['version'], $current_version, '>' ) ) {
|
|
||||||
$update = (object) array(
|
|
||||||
'slug' => $remote['slug'] ?? $this->plugin_slug,
|
|
||||||
'plugin' => $this->plugin_basename,
|
|
||||||
'new_version' => $remote['version'],
|
|
||||||
'url' => $remote['homepage'] ?? $this->plugin_data['PluginURI'] ?? '',
|
|
||||||
'package' => $remote['download_url'],
|
|
||||||
'tested' => $remote['tested'] ?? '',
|
|
||||||
'requires' => $remote['requires'] ?? '',
|
|
||||||
'requires_php' => $remote['requires_php'] ?? '',
|
|
||||||
);
|
|
||||||
|
|
||||||
$transient->response[ $this->plugin_basename ] = $update;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $transient;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provide "View details" modal content.
|
|
||||||
*
|
|
||||||
* @param false|object|array $result The result object or array.
|
|
||||||
* @param string $action The type of information being requested.
|
|
||||||
* @param object $args Plugin API arguments.
|
|
||||||
*
|
|
||||||
* @return false|object The plugin information object or false.
|
|
||||||
*/
|
|
||||||
public function provide_plugin_details( $result, string $action, object $args ) {
|
|
||||||
if ( 'plugin_information' !== $action ) {
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( empty( $args->slug ) || $args->slug !== $this->plugin_slug ) {
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
$remote = $this->get_remote_data();
|
|
||||||
|
|
||||||
if ( empty( $remote['version'] ) ) {
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (object) array(
|
|
||||||
'name' => $remote['name'] ?? $this->plugin_data['Name'] ?? $this->plugin_slug,
|
|
||||||
'slug' => $remote['slug'] ?? $this->plugin_slug,
|
|
||||||
'version' => $remote['version'],
|
|
||||||
'author' => $remote['author'] ?? $this->plugin_data['Author'] ?? '',
|
|
||||||
'homepage' => $remote['homepage'] ?? $this->plugin_data['PluginURI'] ?? '',
|
|
||||||
'requires' => $remote['requires'] ?? '',
|
|
||||||
'tested' => $remote['tested'] ?? '',
|
|
||||||
'requires_php' => $remote['requires_php'] ?? '',
|
|
||||||
'sections' => array(
|
|
||||||
'description' => $remote['description'] ?? $this->plugin_data['Description'] ?? '',
|
|
||||||
'changelog' => $remote['changelog'] ?? '',
|
|
||||||
),
|
|
||||||
'download_link' => $remote['download_url'] ?? '',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get remote data with caching and HMAC signature verification.
|
|
||||||
*
|
|
||||||
* @return array Remote data.
|
|
||||||
*/
|
|
||||||
private function get_remote_data(): array {
|
|
||||||
$cached = get_site_transient( $this->cache_key );
|
|
||||||
|
|
||||||
// Verify HMAC signature if AUTH_SALT is defined and cache has signature.
|
|
||||||
if ( false !== $cached && defined( 'AUTH_SALT' ) && '' !== AUTH_SALT ) {
|
|
||||||
if ( is_array( $cached ) && isset( $cached['signature'], $cached['data'] ) ) {
|
|
||||||
$expected_sig = hash_hmac( 'sha256', $this->cache_key . serialize( $cached['data'] ), AUTH_SALT );
|
|
||||||
|
|
||||||
if ( hash_equals( $expected_sig, $cached['signature'] ) ) {
|
|
||||||
// Signature valid, return data.
|
|
||||||
return is_array( $cached['data'] ) ? $cached['data'] : array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Signature invalid, delete corrupted cache.
|
// If it's in format "OWNER/REPO", construct full URL.
|
||||||
delete_site_transient( $this->cache_key );
|
if ( preg_match( '#^[^/]+/[^/]+$#', $gitea_uri ) ) {
|
||||||
$cached = false;
|
return "https://git.robotstxt.es/{$gitea_uri}/raw/branch/main/update.json";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fallback: try to extract from Plugin URI.
|
||||||
|
if ( ! empty( $this->plugin_data['PluginURI'] ) ) {
|
||||||
|
$plugin_uri = $this->plugin_data['PluginURI'];
|
||||||
|
if ( str_contains( $plugin_uri, 'git.robotstxt.es' ) ) {
|
||||||
|
return rtrim( $plugin_uri, '/' ) . '/raw/branch/main/update.json';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Last resort: construct from plugin slug.
|
||||||
|
return "https://git.robotstxt.es/ROBOTSTXT/{$this->plugin_slug}/raw/branch/main/update.json";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no valid cache, fetch fresh data.
|
/**
|
||||||
if ( false === $cached ) {
|
* Inject update info into WP's plugin update transient.
|
||||||
$remote = $this->fetch_json();
|
*
|
||||||
|
* @param object|mixed $transient The update_plugins transient.
|
||||||
|
*
|
||||||
|
* @return object The modified transient.
|
||||||
|
*/
|
||||||
|
public function inject_update_info( $transient ) {
|
||||||
|
if ( ! is_object( $transient ) ) {
|
||||||
|
$transient = new stdClass();
|
||||||
|
}
|
||||||
|
|
||||||
// Store with HMAC signature if AUTH_SALT is available.
|
if ( empty( $transient->checked ) || ! is_array( $transient->checked ) ) {
|
||||||
if ( defined( 'AUTH_SALT' ) && '' !== AUTH_SALT ) {
|
return $transient;
|
||||||
$payload = array(
|
}
|
||||||
'data' => $remote ?: array(),
|
|
||||||
'timestamp' => time(),
|
if ( empty( $transient->checked[ $this->plugin_basename ] ) ) {
|
||||||
'signature' => hash_hmac( 'sha256', $this->cache_key . serialize( $remote ?: array() ), AUTH_SALT ),
|
return $transient;
|
||||||
|
}
|
||||||
|
|
||||||
|
$current_version = $this->str_val( $transient->checked[ $this->plugin_basename ] );
|
||||||
|
$remote = $this->get_remote_data();
|
||||||
|
|
||||||
|
if ( empty( $remote['version'] ) || empty( $remote['download_url'] ) ) {
|
||||||
|
return $transient;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! $this->is_compatible( $remote ) ) {
|
||||||
|
return $transient;
|
||||||
|
}
|
||||||
|
|
||||||
|
$remote_version = $this->str_val( $remote['version'] );
|
||||||
|
if ( version_compare( $remote_version, $current_version, '>' ) ) {
|
||||||
|
$update = (object) array(
|
||||||
|
'slug' => $this->str_val( $remote['slug'] ?? null, $this->plugin_slug ),
|
||||||
|
'plugin' => $this->plugin_basename,
|
||||||
|
'new_version' => $remote_version,
|
||||||
|
'url' => $this->str_val( $remote['homepage'] ?? null, $this->plugin_data['PluginURI'] ?? '' ),
|
||||||
|
'package' => $this->str_val( $remote['download_url'] ),
|
||||||
|
'tested' => $this->str_val( $remote['tested'] ?? '' ),
|
||||||
|
'requires' => $this->str_val( $remote['requires'] ?? '' ),
|
||||||
|
'requires_php' => $this->str_val( $remote['requires_php'] ?? '' ),
|
||||||
);
|
);
|
||||||
set_site_transient( $this->cache_key, $payload, 6 * HOUR_IN_SECONDS );
|
|
||||||
} else {
|
$transient_obj = $transient instanceof \stdClass ? $transient : new \stdClass();
|
||||||
// Fallback to standard caching.
|
if ( ! isset( $transient_obj->response ) || ! is_array( $transient_obj->response ) ) {
|
||||||
set_site_transient( $this->cache_key, $remote ?: array(), 6 * HOUR_IN_SECONDS );
|
$transient_obj->response = array();
|
||||||
|
}
|
||||||
|
$transient_obj->response[ $this->plugin_basename ] = $update;
|
||||||
|
return $transient_obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
return is_array( $remote ) ? $remote : array();
|
return $transient;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy cache format without signature (backward compatibility).
|
/**
|
||||||
return is_array( $cached ) ? $cached : array();
|
* Provide "View details" modal content.
|
||||||
}
|
*
|
||||||
|
* @param false|object|array<string,mixed> $result The result object or array.
|
||||||
|
* @param string $action The type of information being requested.
|
||||||
|
* @param object $args Plugin API arguments.
|
||||||
|
*
|
||||||
|
* @return false|object The plugin information object or false.
|
||||||
|
*/
|
||||||
|
public function provide_plugin_details( $result, string $action, object $args ): false|object {
|
||||||
|
if ( 'plugin_information' !== $action ) {
|
||||||
|
return is_object( $result ) ? $result : false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
if ( empty( $args->slug ) || $args->slug !== $this->plugin_slug ) {
|
||||||
* Fetch JSON from remote URL.
|
return is_object( $result ) ? $result : false;
|
||||||
*
|
}
|
||||||
* @return array Decoded JSON data.
|
|
||||||
*/
|
$remote = $this->get_remote_data();
|
||||||
private function fetch_json(): array {
|
|
||||||
$response = wp_remote_get(
|
if ( empty( $remote['version'] ) ) {
|
||||||
$this->json_url,
|
return is_object( $result ) ? $result : false;
|
||||||
array(
|
}
|
||||||
'timeout' => 10,
|
|
||||||
'headers' => array(
|
return (object) array(
|
||||||
'Accept' => 'application/json',
|
'name' => $this->str_val( $remote['name'] ?? null, $this->plugin_data['Name'] ?? $this->plugin_slug ),
|
||||||
|
'slug' => $this->str_val( $remote['slug'] ?? null, $this->plugin_slug ),
|
||||||
|
'version' => $this->str_val( $remote['version'] ),
|
||||||
|
'author' => $this->str_val( $remote['author'] ?? null, $this->plugin_data['Author'] ?? '' ),
|
||||||
|
'homepage' => $this->str_val( $remote['homepage'] ?? null, $this->plugin_data['PluginURI'] ?? '' ),
|
||||||
|
'requires' => $this->str_val( $remote['requires'] ?? '' ),
|
||||||
|
'tested' => $this->str_val( $remote['tested'] ?? '' ),
|
||||||
|
'requires_php' => $this->str_val( $remote['requires_php'] ?? '' ),
|
||||||
|
'sections' => array(
|
||||||
|
'description' => $this->str_val( $remote['description'] ?? null, $this->plugin_data['Description'] ?? '' ),
|
||||||
|
'changelog' => $this->str_val( $remote['changelog'] ?? '' ),
|
||||||
),
|
),
|
||||||
)
|
'download_link' => $this->str_val( $remote['download_url'] ?? '' ),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( is_wp_error( $response ) ) {
|
|
||||||
return array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$code = (int) wp_remote_retrieve_response_code( $response );
|
/**
|
||||||
if ( $code < 200 || $code >= 300 ) {
|
* Get remote data with caching and HMAC signature verification.
|
||||||
return array();
|
*
|
||||||
}
|
* @return array<string, mixed> Remote data.
|
||||||
|
*/
|
||||||
|
private function get_remote_data(): array {
|
||||||
|
$cached = get_site_transient( $this->cache_key );
|
||||||
|
|
||||||
$body = wp_remote_retrieve_body( $response );
|
// Verify HMAC signature if AUTH_SALT is defined and cache has signature.
|
||||||
$data = json_decode( $body, true );
|
if ( false !== $cached && defined( 'AUTH_SALT' ) && '' !== AUTH_SALT ) {
|
||||||
|
if ( is_array( $cached ) && isset( $cached['signature'], $cached['data'] ) ) {
|
||||||
|
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- HMAC integrity verification for cached data.
|
||||||
|
$expected_sig = hash_hmac( 'sha256', $this->cache_key . serialize( $cached['data'] ), AUTH_SALT );
|
||||||
|
|
||||||
return is_array( $data ) ? $data : array();
|
if ( hash_equals( $expected_sig, $cached['signature'] ) ) {
|
||||||
}
|
// Signature valid, return data.
|
||||||
|
return is_array( $cached['data'] ) ? $cached['data'] : array();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
// Signature invalid, delete corrupted cache.
|
||||||
* Check compatibility.
|
delete_site_transient( $this->cache_key );
|
||||||
*
|
$cached = false;
|
||||||
* @param array $remote Remote data.
|
}
|
||||||
*
|
|
||||||
* @return bool True if compatible.
|
|
||||||
*/
|
|
||||||
private function is_compatible( array $remote ): bool {
|
|
||||||
if ( ! empty( $remote['requires_php'] ) ) {
|
|
||||||
if ( version_compare( PHP_VERSION, $remote['requires_php'], '<' ) ) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! empty( $remote['requires'] ) ) {
|
// If no valid cache, fetch fresh data.
|
||||||
if ( version_compare( get_bloginfo( 'version' ), $remote['requires'], '<' ) ) {
|
if ( false === $cached ) {
|
||||||
return false;
|
$remote = $this->fetch_json();
|
||||||
|
|
||||||
|
// Store with HMAC signature if AUTH_SALT is available.
|
||||||
|
if ( defined( 'AUTH_SALT' ) && '' !== AUTH_SALT ) {
|
||||||
|
$payload = array(
|
||||||
|
'data' => ! empty( $remote ) ? $remote : array(),
|
||||||
|
'timestamp' => time(),
|
||||||
|
// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- HMAC integrity for transient cache.
|
||||||
|
'signature' => hash_hmac( 'sha256', $this->cache_key . serialize( ! empty( $remote ) ? $remote : array() ), AUTH_SALT ),
|
||||||
|
);
|
||||||
|
set_site_transient( $this->cache_key, $payload, 6 * HOUR_IN_SECONDS );
|
||||||
|
} else {
|
||||||
|
// Fallback to standard caching.
|
||||||
|
set_site_transient( $this->cache_key, ! empty( $remote ) ? $remote : array(), 6 * HOUR_IN_SECONDS );
|
||||||
|
}
|
||||||
|
|
||||||
|
return $remote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Legacy cache format without signature (backward compatibility).
|
||||||
|
return is_array( $cached ) ? $cached : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
/**
|
||||||
}
|
* Fetch JSON from remote URL.
|
||||||
|
*
|
||||||
|
* @return array<string, mixed> Decoded JSON data.
|
||||||
|
*/
|
||||||
|
private function fetch_json(): array {
|
||||||
|
$response = wp_remote_get(
|
||||||
|
$this->json_url,
|
||||||
|
array(
|
||||||
|
'timeout' => 10,
|
||||||
|
'headers' => array(
|
||||||
|
'Accept' => 'application/json',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
if ( is_wp_error( $response ) ) {
|
||||||
* Handle manual cache clear via URL parameter.
|
return array();
|
||||||
*/
|
}
|
||||||
public function handle_cache_clear(): void {
|
|
||||||
// Check if this is a cache clear request first.
|
$code = (int) wp_remote_retrieve_response_code( $response );
|
||||||
$clear_cache = filter_input( INPUT_GET, 'robotstxt_clear_update_cache', FILTER_UNSAFE_RAW );
|
if ( $code < 200 || $code >= 300 ) {
|
||||||
if ( null === $clear_cache ) {
|
return array();
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
$body = wp_remote_retrieve_body( $response );
|
||||||
|
$data = json_decode( $body, true );
|
||||||
|
|
||||||
|
return is_array( $data ) ? $data : array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a cache clear request - now verify nonce.
|
/**
|
||||||
$nonce_raw = filter_input( INPUT_GET, '_wpnonce', FILTER_UNSAFE_RAW );
|
* Check compatibility.
|
||||||
$nonce = $nonce_raw ? sanitize_text_field( wp_unslash( $nonce_raw ) ) : '';
|
*
|
||||||
|
* @param array<string, mixed> $remote Remote data.
|
||||||
|
*
|
||||||
|
* @return bool True if compatible.
|
||||||
|
*/
|
||||||
|
private function is_compatible( array $remote ): bool {
|
||||||
|
if ( ! empty( $remote['requires_php'] ) ) {
|
||||||
|
$req_php = $this->str_val( $remote['requires_php'] );
|
||||||
|
if ( version_compare( PHP_VERSION, $req_php, '<' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! wp_verify_nonce( $nonce, 'robotstxt_clear_update_cache' ) ) {
|
if ( ! empty( $remote['requires'] ) ) {
|
||||||
wp_die( esc_html__( 'Security check failed', 'idrivee2-media-upload' ) );
|
$req_wp = $this->str_val( $remote['requires'] );
|
||||||
|
if ( version_compare( get_bloginfo( 'version' ), $req_wp, '<' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check permissions.
|
/**
|
||||||
if ( ! current_user_can( 'update_plugins' ) ) {
|
* Handle manual cache clear via URL parameter.
|
||||||
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'idrivee2-media-upload' ) );
|
*/
|
||||||
|
public function handle_cache_clear(): void {
|
||||||
|
// Check if this is a cache clear request first.
|
||||||
|
$clear_cache = filter_input( INPUT_GET, 'robotstxt_clear_update_cache', FILTER_UNSAFE_RAW );
|
||||||
|
if ( null === $clear_cache ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is a cache clear request - now verify nonce.
|
||||||
|
$nonce_raw = filter_input( INPUT_GET, '_wpnonce', FILTER_UNSAFE_RAW );
|
||||||
|
$nonce = $nonce_raw ? sanitize_text_field( wp_unslash( $nonce_raw ) ) : '';
|
||||||
|
|
||||||
|
if ( ! wp_verify_nonce( $nonce, 'robotstxt_clear_update_cache' ) ) {
|
||||||
|
wp_die( esc_html__( 'Security check failed', 'idrivee2-media-upload' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check permissions.
|
||||||
|
if ( ! current_user_can( 'update_plugins' ) ) {
|
||||||
|
wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'idrivee2-media-upload' ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->clear_cache();
|
||||||
|
wp_safe_redirect( remove_query_arg( array( 'robotstxt_clear_update_cache', '_wpnonce' ) ) );
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->clear_cache();
|
/**
|
||||||
wp_safe_redirect( remove_query_arg( array( 'robotstxt_clear_update_cache', '_wpnonce' ) ) );
|
* Clear update cache.
|
||||||
exit;
|
*/
|
||||||
}
|
public function clear_cache(): void {
|
||||||
|
delete_site_transient( $this->cache_key );
|
||||||
/**
|
delete_site_transient( 'update_plugins' );
|
||||||
* Clear update cache.
|
}
|
||||||
*/
|
|
||||||
public function clear_cache(): void {
|
|
||||||
delete_site_transient( $this->cache_key );
|
|
||||||
delete_site_transient( 'update_plugins' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,9 @@ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
||||||
/**
|
/**
|
||||||
* Clean up plugin data.
|
* Clean up plugin data.
|
||||||
*
|
*
|
||||||
* This removes all custom post meta, options, and scheduled cron events
|
* Removes: post meta (_idrivee2_s3_base_url, _idrivee2_last_upload), deletion queue,
|
||||||
* created by the plugin.
|
* and cron events. By design, idrivee2_media_settings and idrivee2_s3_operations
|
||||||
|
* are preserved (user data preservation policy per AGENTS.md).
|
||||||
*
|
*
|
||||||
* WARNING: This action cannot be undone.
|
* WARNING: This action cannot be undone.
|
||||||
*/
|
*/
|
||||||
|
|
@ -48,9 +49,9 @@ $wpdb->query(
|
||||||
delete_option( 'idrivee2_deletion_queue' );
|
delete_option( 'idrivee2_deletion_queue' );
|
||||||
|
|
||||||
// Unschedule the cleanup cron event.
|
// Unschedule the cleanup cron event.
|
||||||
$timestamp = wp_next_scheduled( 'idrivee2_cleanup_local_files' );
|
$idrivee2_next_scheduled = wp_next_scheduled( 'idrivee2_cleanup_local_files' );
|
||||||
if ( $timestamp ) {
|
if ( $idrivee2_next_scheduled ) {
|
||||||
wp_unschedule_event( $timestamp, 'idrivee2_cleanup_local_files' );
|
wp_unschedule_event( $idrivee2_next_scheduled, 'idrivee2_cleanup_local_files' );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear all hooks for this action to prevent any remaining schedules.
|
// Clear all hooks for this action to prevent any remaining schedules.
|
||||||
|
|
|
||||||
16
update.json
16
update.json
|
|
@ -1,20 +1,20 @@
|
||||||
{
|
{
|
||||||
"name": "iDrivee2 Media Upload",
|
"name": "iDrivee2 Media Upload",
|
||||||
"slug": "idrivee2-media-upload",
|
"slug": "idrivee2-media-upload",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"download_url": "https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload/releases/download/1.1.3/idrivee2-media-upload-1.1.3.zip",
|
"download_url": "https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload/releases/download/1.1.4/idrivee2-media-upload-1.1.4.zip",
|
||||||
"requires": "6.8",
|
"requires": "4.1",
|
||||||
"requires_php": "8.2",
|
"requires_php": "8.1",
|
||||||
"tested": "6.9",
|
"tested": "7.1",
|
||||||
"last_updated": "2026-02-04",
|
"last_updated": "2026-06-02",
|
||||||
"author": "ROBOTSTXT",
|
"author": "ROBOTSTXT",
|
||||||
"author_profile": "https://www.robotstxt.es/",
|
"author_profile": "https://www.robotstxt.es/",
|
||||||
"homepage": "https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload",
|
"homepage": "https://git.robotstxt.es/ROBOTSTXT/idrivee2-media-upload",
|
||||||
"description": "Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging.",
|
"description": "Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging.",
|
||||||
"changelog": "<h3>1.1.3 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Critical namespace issue with Robotstxt_Updater class causing fatal error</li><li><strong>Fixed:</strong> Plugin now loads correctly without PHP fatal errors</li></ul><h3>1.1.2 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Deployment script updated to use PHP 8.2 as platform base for production builds</li><li><strong>Changed:</strong> Now uses composer update --no-dev for consistent dependency resolution</li><li><strong>Improved:</strong> Production packages guarantee PHP 8.2+ compatibility regardless of dev environment</li></ul><h3>1.1.1 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Deployment script now includes essential files (update.json, robotstxt-updater.php, readme.txt, changelog.txt)</li><li><strong>Improved:</strong> Production packages now contain all files required for automatic updates from Gitea</li></ul><h3>1.1.0 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Added explicit PHP version requirement (>=8.2) to composer.json</li><li><strong>Changed:</strong> Updated update.json with correct plugin information</li><li><strong>Changed:</strong> Fixed Text Domain in robotstxt-updater.php to match plugin slug</li><li><strong>Fixed:</strong> Composer now validates PHP version during dependency installation</li><li><strong>Fixed:</strong> Plugin update system correctly identifies the plugin</li><li><strong>Fixed:</strong> Translations properly loaded for updater error messages</li><li><strong>Improved:</strong> All text domains now consistently use 'idrivee2-media-upload'</li></ul><h3>1.0.0 - 2026-02-03</h3><ul><li><strong>Release:</strong> First stable release</li><li><strong>Feature:</strong> Automatic upload of media files to iDrivee2 (S3-compatible storage)</li><li><strong>Feature:</strong> URL rewriting to serve media from CDN</li><li><strong>Feature:</strong> Local file deletion after successful upload</li><li><strong>Feature:</strong> Admin interface with connection and upload testing</li><li><strong>Security:</strong> Enterprise-grade security with nonce validation</li><li><strong>Architecture:</strong> Class-based modular architecture with dependency injection</li><li><strong>Testing:</strong> PHPUnit test structure and PHPStan static analysis</li><li><strong>Compatibility:</strong> WordPress 6.8+ and PHP 8.2+</li></ul>",
|
"changelog": "<h3>1.1.4 - 2026-06-02</h3><ul><li><strong>Added:</strong> Full dev tooling: PHPCS, PHPStan level 9, PHPUnit test suite (22 tests)</li><li><strong>Fixed:</strong> WP_Filesystem null guard, type safety on get_option/get_transient, dynamic asset version</li><li><strong>Changed:</strong> Tested up to WordPress 7.1, PHP 8.2-8.5</li></ul><h3>1.1.3 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Critical namespace issue with Robotstxt_Updater class causing fatal error</li><li><strong>Fixed:</strong> Plugin now loads correctly without PHP fatal errors</li></ul><h3>1.1.2 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Deployment script updated to use PHP 8.2 as platform base for production builds</li><li><strong>Changed:</strong> Now uses composer update --no-dev for consistent dependency resolution</li><li><strong>Improved:</strong> Production packages guarantee PHP 8.2+ compatibility regardless of dev environment</li></ul><h3>1.1.1 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Deployment script now includes essential files (update.json, robotstxt-updater.php, readme.txt, changelog.txt)</li><li><strong>Improved:</strong> Production packages now contain all files required for automatic updates from Gitea</li></ul><h3>1.1.0 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Added explicit PHP version requirement (>=8.2) to composer.json</li><li><strong>Changed:</strong> Updated update.json with correct plugin information</li><li><strong>Changed:</strong> Fixed Text Domain in robotstxt-updater.php to match plugin slug</li><li><strong>Fixed:</strong> Composer now validates PHP version during dependency installation</li><li><strong>Fixed:</strong> Plugin update system correctly identifies the plugin</li><li><strong>Fixed:</strong> Translations properly loaded for updater error messages</li><li><strong>Improved:</strong> All text domains now consistently use 'idrivee2-media-upload'</li></ul><h3>1.0.0 - 2026-02-03</h3><ul><li><strong>Release:</strong> First stable release</li><li><strong>Feature:</strong> Automatic upload of media files to iDrivee2 (S3-compatible storage)</li><li><strong>Feature:</strong> URL rewriting to serve media from CDN</li><li><strong>Feature:</strong> Local file deletion after successful upload</li><li><strong>Feature:</strong> Admin interface with connection and upload testing</li><li><strong>Security:</strong> Enterprise-grade security with nonce validation</li><li><strong>Architecture:</strong> Class-based modular architecture with dependency injection</li><li><strong>Testing:</strong> PHPUnit test structure and PHPStan static analysis</li><li><strong>Compatibility:</strong> WordPress 6.8+ and PHP 8.2+</li></ul>",
|
||||||
"sections": {
|
"sections": {
|
||||||
"description": "Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging. The plugin intercepts WordPress media uploads, pushes files to an S3-compatible bucket, deletes local copies, and rewrites URLs to serve media from the CDN.",
|
"description": "Uploads media files to iDrivee2 (S3-compatible) with enterprise-grade security and logging. The plugin intercepts WordPress media uploads, pushes files to an S3-compatible bucket, deletes local copies, and rewrites URLs to serve media from the CDN.",
|
||||||
"changelog": "<h3>1.1.3 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Critical namespace issue with Robotstxt_Updater class causing fatal error</li><li><strong>Fixed:</strong> Plugin now loads correctly without PHP fatal errors</li></ul><h3>1.1.2 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Deployment script updated to use PHP 8.2 as platform base for production builds</li><li><strong>Changed:</strong> Now uses composer update --no-dev for consistent dependency resolution</li><li><strong>Improved:</strong> Production packages guarantee PHP 8.2+ compatibility regardless of dev environment</li></ul><h3>1.1.1 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Deployment script now includes essential files (update.json, robotstxt-updater.php, readme.txt, changelog.txt)</li><li><strong>Improved:</strong> Production packages now contain all files required for automatic updates from Gitea</li></ul><h3>1.1.0 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Added explicit PHP version requirement (>=8.2) to composer.json</li><li><strong>Changed:</strong> Updated update.json with correct plugin information</li><li><strong>Changed:</strong> Fixed Text Domain in robotstxt-updater.php to match plugin slug</li><li><strong>Fixed:</strong> Composer now validates PHP version during dependency installation</li><li><strong>Fixed:</strong> Plugin update system correctly identifies the plugin</li><li><strong>Fixed:</strong> Translations properly loaded for updater error messages</li><li><strong>Improved:</strong> All text domains now consistently use 'idrivee2-media-upload'</li></ul><h3>1.0.0 - 2026-02-03</h3><ul><li><strong>Release:</strong> First stable release</li><li><strong>Feature:</strong> Automatic upload of media files to iDrivee2 (S3-compatible storage)</li><li><strong>Feature:</strong> URL rewriting to serve media from CDN</li><li><strong>Feature:</strong> Local file deletion after successful upload</li><li><strong>Feature:</strong> Admin interface with connection and upload testing</li><li><strong>Security:</strong> Enterprise-grade security with nonce validation</li><li><strong>Architecture:</strong> Class-based modular architecture with dependency injection</li><li><strong>Testing:</strong> PHPUnit test structure and PHPStan static analysis</li><li><strong>Compatibility:</strong> WordPress 6.8+ and PHP 8.2+</li></ul>"
|
"changelog": "<h3>1.1.4 - 2026-06-02</h3><ul><li><strong>Added:</strong> Full dev tooling: PHPCS, PHPStan level 9, PHPUnit test suite (22 tests)</li><li><strong>Fixed:</strong> WP_Filesystem null guard, type safety on get_option/get_transient, dynamic asset version</li><li><strong>Changed:</strong> Tested up to WordPress 7.1, PHP 8.2-8.5</li></ul><h3>1.1.3 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Critical namespace issue with Robotstxt_Updater class causing fatal error</li><li><strong>Fixed:</strong> Plugin now loads correctly without PHP fatal errors</li></ul><h3>1.1.2 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Deployment script updated to use PHP 8.2 as platform base for production builds</li><li><strong>Changed:</strong> Now uses composer update --no-dev for consistent dependency resolution</li><li><strong>Improved:</strong> Production packages guarantee PHP 8.2+ compatibility regardless of dev environment</li></ul><h3>1.1.1 - 2026-02-04</h3><ul><li><strong>Fixed:</strong> Deployment script now includes essential files (update.json, robotstxt-updater.php, readme.txt, changelog.txt)</li><li><strong>Improved:</strong> Production packages now contain all files required for automatic updates from Gitea</li></ul><h3>1.1.0 - 2026-02-04</h3><ul><li><strong>Changed:</strong> Added explicit PHP version requirement (>=8.2) to composer.json</li><li><strong>Changed:</strong> Updated update.json with correct plugin information</li><li><strong>Changed:</strong> Fixed Text Domain in robotstxt-updater.php to match plugin slug</li><li><strong>Fixed:</strong> Composer now validates PHP version during dependency installation</li><li><strong>Fixed:</strong> Plugin update system correctly identifies the plugin</li><li><strong>Fixed:</strong> Translations properly loaded for updater error messages</li><li><strong>Improved:</strong> All text domains now consistently use 'idrivee2-media-upload'</li></ul><h3>1.0.0 - 2026-02-03</h3><ul><li><strong>Release:</strong> First stable release</li><li><strong>Feature:</strong> Automatic upload of media files to iDrivee2 (S3-compatible storage)</li><li><strong>Feature:</strong> URL rewriting to serve media from CDN</li><li><strong>Feature:</strong> Local file deletion after successful upload</li><li><strong>Feature:</strong> Admin interface with connection and upload testing</li><li><strong>Security:</strong> Enterprise-grade security with nonce validation</li><li><strong>Architecture:</strong> Class-based modular architecture with dependency injection</li><li><strong>Testing:</strong> PHPUnit test structure and PHPStan static analysis</li><li><strong>Compatibility:</strong> WordPress 6.8+ and PHP 8.2+</li></ul>"
|
||||||
},
|
},
|
||||||
"banners": {
|
"banners": {
|
||||||
"low": "",
|
"low": "",
|
||||||
|
|
|
||||||
5
vendor/autoload.php
vendored
5
vendor/autoload.php
vendored
|
|
@ -14,10 +14,7 @@ if (PHP_VERSION_ID < 50600) {
|
||||||
echo $err;
|
echo $err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trigger_error(
|
throw new RuntimeException($err);
|
||||||
$err,
|
|
||||||
E_USER_ERROR
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
|
||||||
35
vendor/aws/aws-crt-php/composer.json
vendored
35
vendor/aws/aws-crt-php/composer.json
vendored
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
"name": "aws/aws-crt-php",
|
|
||||||
"homepage": "https://github.com/awslabs/aws-crt-php",
|
|
||||||
"description": "AWS Common Runtime for PHP",
|
|
||||||
"keywords": ["aws","amazon","sdk","crt"],
|
|
||||||
"type": "library",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "AWS SDK Common Runtime Team",
|
|
||||||
"email": "aws-sdk-common-runtime@amazon.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"minimum-stability": "alpha",
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.5"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit":"^4.8.35||^5.6.3||^9.5",
|
|
||||||
"yoast/phpunit-polyfills": "^1.0"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"classmap": [
|
|
||||||
"src/"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality."
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"test": "./dev-scripts/run_tests.sh",
|
|
||||||
"test-extension": "@test",
|
|
||||||
"test-win": ".\\dev-scripts\\run_tests.bat"
|
|
||||||
},
|
|
||||||
"license": "Apache-2.0"
|
|
||||||
}
|
|
||||||
4
vendor/aws/aws-sdk-php/CODE_OF_CONDUCT.md
vendored
Normal file
4
vendor/aws/aws-sdk-php/CODE_OF_CONDUCT.md
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
## Code of Conduct
|
||||||
|
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
|
||||||
|
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
|
||||||
|
opensource-codeofconduct@amazon.com with any additional questions or comments.
|
||||||
4
vendor/aws/aws-sdk-php/CRT_INSTRUCTIONS.md
vendored
Normal file
4
vendor/aws/aws-sdk-php/CRT_INSTRUCTIONS.md
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
## Building and enabling the Common Run Time
|
||||||
|
|
||||||
|
1. **Follow instructions on crt repo** – Clone and build the repo as shown [here][https://github.com/awslabs/aws-crt-php].
|
||||||
|
1. **Enable the CRT** – add the following line to your php.ini file `extension=path/to/aws-crt-php/modules/awscrt.so`
|
||||||
73
vendor/aws/aws-sdk-php/composer.json
vendored
73
vendor/aws/aws-sdk-php/composer.json
vendored
|
|
@ -1,73 +0,0 @@
|
||||||
{
|
|
||||||
"name": "aws/aws-sdk-php",
|
|
||||||
"homepage": "http://aws.amazon.com/sdkforphp",
|
|
||||||
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
|
|
||||||
"keywords": ["aws","amazon","sdk","s3","ec2","dynamodb","cloud","glacier"],
|
|
||||||
"type": "library",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Amazon Web Services",
|
|
||||||
"homepage": "http://aws.amazon.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"forum": "https://github.com/aws/aws-sdk-php/discussions",
|
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues"
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"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",
|
|
||||||
"symfony/filesystem": "^v5.4.45 || ^v6.4.3 || ^v7.1.0 || ^v8.0.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"composer/composer" : "^2.7.8",
|
|
||||||
"ext-openssl": "*",
|
|
||||||
"ext-dom": "*",
|
|
||||||
"ext-sockets": "*",
|
|
||||||
"phpunit/phpunit": "^9.6",
|
|
||||||
"behat/behat": "~3.0",
|
|
||||||
"doctrine/cache": "~1.4",
|
|
||||||
"aws/aws-php-sns-message-validator": "~1.0",
|
|
||||||
"andrewsville/php-token-reflection": "^1.4",
|
|
||||||
"psr/cache": "^2.0 || ^3.0",
|
|
||||||
"psr/simple-cache": "^2.0 || ^3.0",
|
|
||||||
"sebastian/comparator": "^1.2.3 || ^4.0 || ^5.0",
|
|
||||||
"yoast/phpunit-polyfills": "^2.0",
|
|
||||||
"dms/phpunit-arraysubset-asserts": "^0.4.0"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages",
|
|
||||||
"ext-curl": "To send requests using cURL",
|
|
||||||
"ext-sockets": "To use client-side monitoring",
|
|
||||||
"ext-pcntl": "To use client-side monitoring",
|
|
||||||
"doctrine/cache": "To use the DoctrineCacheAdapter",
|
|
||||||
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications"
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Aws\\": "src/"
|
|
||||||
},
|
|
||||||
"files": ["src/functions.php"],
|
|
||||||
"exclude-from-classmap": ["src/data/"]
|
|
||||||
},
|
|
||||||
"autoload-dev": {
|
|
||||||
"psr-4": {
|
|
||||||
"Aws\\Test\\": "tests/"
|
|
||||||
},
|
|
||||||
"classmap": ["build/"]
|
|
||||||
},
|
|
||||||
"extra": {
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "3.0-dev"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -21,10 +21,14 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createAnalyzerAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createAnalyzerAsync(array $args = [])
|
||||||
* @method \Aws\Result createArchiveRule(array $args = [])
|
* @method \Aws\Result createArchiveRule(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createArchiveRuleAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createArchiveRuleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createServiceLinkedAnalyzer(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createServiceLinkedAnalyzerAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteAnalyzer(array $args = [])
|
* @method \Aws\Result deleteAnalyzer(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteArchiveRule(array $args = [])
|
* @method \Aws\Result deleteArchiveRule(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteServiceLinkedAnalyzer(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteServiceLinkedAnalyzerAsync(array $args = [])
|
||||||
* @method \Aws\Result generateFindingRecommendation(array $args = [])
|
* @method \Aws\Result generateFindingRecommendation(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise generateFindingRecommendationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise generateFindingRecommendationAsync(array $args = [])
|
||||||
* @method \Aws\Result getAccessPreview(array $args = [])
|
* @method \Aws\Result getAccessPreview(array $args = [])
|
||||||
|
|
|
||||||
2
vendor/aws/aws-sdk-php/src/Acm/AcmClient.php
vendored
2
vendor/aws/aws-sdk-php/src/Acm/AcmClient.php
vendored
|
|
@ -36,6 +36,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise resendValidationEmailAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise resendValidationEmailAsync(array $args = [])
|
||||||
* @method \Aws\Result revokeCertificate(array $args = [])
|
* @method \Aws\Result revokeCertificate(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise revokeCertificateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise revokeCertificateAsync(array $args = [])
|
||||||
|
* @method \Aws\Result searchCertificates(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise searchCertificatesAsync(array $args = [])
|
||||||
* @method \Aws\Result updateCertificateOptions(array $args = [])
|
* @method \Aws\Result updateCertificateOptions(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateCertificateOptionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateCertificateOptionsAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
664
vendor/aws/aws-sdk-php/src/Api/Cbor/CborDecoder.php
vendored
Normal file
664
vendor/aws/aws-sdk-php/src/Api/Cbor/CborDecoder.php
vendored
Normal file
|
|
@ -0,0 +1,664 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Cbor;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\Exception\CborException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes Concise Binary Object Representation encoded strings
|
||||||
|
* into PHP values according to RFC 8949
|
||||||
|
*
|
||||||
|
* https://www.rfc-editor.org/rfc/rfc8949.html
|
||||||
|
*
|
||||||
|
* Supports Major types 0-7 including:
|
||||||
|
* - Type 0: Unsigned integers
|
||||||
|
* - Type 1: Negative integers
|
||||||
|
* - Type 2: Byte strings
|
||||||
|
* - Type 3: Text strings (UTF-8)
|
||||||
|
* - Type 4: Arrays
|
||||||
|
* - Type 5: Maps
|
||||||
|
* - Type 6: Tagged values (timestamps)
|
||||||
|
* - Type 7: Simple values (null, bool, float)
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class CborDecoder
|
||||||
|
{
|
||||||
|
private int $offset;
|
||||||
|
private int $length;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode CBOR binary data to PHP value
|
||||||
|
*
|
||||||
|
* @param string $data The CBOR-encoded binary data to decode
|
||||||
|
*
|
||||||
|
* @return mixed The decoded PHP value (can be any type: int, string, array, bool, null, float)
|
||||||
|
* @throws CborException If data is empty or malformed CBOR
|
||||||
|
*/
|
||||||
|
public function decode(string $data): mixed
|
||||||
|
{
|
||||||
|
if ($data === '') {
|
||||||
|
throw new CborException("No data to decode");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = 0;
|
||||||
|
$this->length = strlen($data);
|
||||||
|
|
||||||
|
return $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode multiple CBOR values from sequential binary data
|
||||||
|
*
|
||||||
|
* @param string $data The CBOR-encoded binary data containing multiple values
|
||||||
|
*
|
||||||
|
* @return array Array of decoded PHP values in the order they appear in the data
|
||||||
|
* @throws CborException If data is malformed CBOR
|
||||||
|
*/
|
||||||
|
public function decodeAll(string $data): array
|
||||||
|
{
|
||||||
|
$this->length = strlen($data);
|
||||||
|
$this->offset = 0;
|
||||||
|
$values = [];
|
||||||
|
|
||||||
|
while ($this->offset < $this->length) {
|
||||||
|
$values[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes a single CBOR value at the current offset
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return mixed The decoded value
|
||||||
|
* @throws CborException If unexpected end of data or invalid CBOR format
|
||||||
|
*/
|
||||||
|
private function decodeValue(string &$data): mixed
|
||||||
|
{
|
||||||
|
$offset = $this->offset;
|
||||||
|
$length = $this->length;
|
||||||
|
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte = ord($data[$offset++]);
|
||||||
|
$majorType = $byte >> 5;
|
||||||
|
$info = $byte & 0x1F;
|
||||||
|
|
||||||
|
switch ($majorType) {
|
||||||
|
case 0: // Unsigned integer
|
||||||
|
if ($info < 24) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 1;
|
||||||
|
|
||||||
|
return ord($data[$offset]);
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
|
||||||
|
return (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return unpack('N', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
|
||||||
|
return unpack('J', $data, $offset)[1];
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for integer: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: // Negative integer
|
||||||
|
if ($info < 24) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return -1 - $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 1;
|
||||||
|
|
||||||
|
return -1 - ord($data[$offset]);
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
|
||||||
|
return -1 - ((ord($data[$offset]) << 8) | ord($data[$offset + 1]));
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return -1 - unpack('N', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
$unsigned = unpack('J', $data, $offset)[1];
|
||||||
|
|
||||||
|
return ($unsigned === 9223372036854775807) ? PHP_INT_MIN : -1 - $unsigned;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for integer: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: // Byte string
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteString($data, 0x40);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for byte string: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
|
||||||
|
return substr($data, $offset, $len);
|
||||||
|
|
||||||
|
case 3: // Text string
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteString($data, 0x60);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for text string: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
|
||||||
|
return substr($data, $offset, $len);
|
||||||
|
|
||||||
|
case 4: // Array
|
||||||
|
if ($info < 24) {
|
||||||
|
$count = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteArray($data);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for array: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
$arr = [];
|
||||||
|
|
||||||
|
for ($i = 0; $i < $count; $i++) {
|
||||||
|
$arr[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $arr;
|
||||||
|
|
||||||
|
case 5: // Map
|
||||||
|
if ($info < 24) {
|
||||||
|
$count = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteMap($data);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for map: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
$map = [];
|
||||||
|
|
||||||
|
for ($i = 0; $i < $count; $i++) {
|
||||||
|
$key = $this->decodeValue($data);
|
||||||
|
$map[$key] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $map;
|
||||||
|
|
||||||
|
case 6: // Tag
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
$offset++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeValue($data);
|
||||||
|
|
||||||
|
case 7: // Simple/float
|
||||||
|
switch ($info) {
|
||||||
|
case 20:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 21:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 22:
|
||||||
|
case 23:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
case 25: // Half-precision float
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
$half = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$sign = ($half >> 15) & 0x01;
|
||||||
|
$exp = ($half >> 10) & 0x1F;
|
||||||
|
$mant = $half & 0x3FF;
|
||||||
|
|
||||||
|
if ($exp === 0) {
|
||||||
|
return $mant === 0
|
||||||
|
? ($sign ? -0.0 : 0.0)
|
||||||
|
: ($sign ? -1 : 1) * pow(2, -14) * ($mant / 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($exp === 31) {
|
||||||
|
return $mant === 0 ? ($sign ? -INF : INF) : NAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (float) (($sign ? -1 : 1) * pow(2, $exp - 15) * (1 + $mant / 1024));
|
||||||
|
|
||||||
|
case 26: // Single-precision float
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return unpack('G', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27: // Double-precision float
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
|
||||||
|
return unpack('E', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
throw new CborException("Unexpected break");
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Unknown simple value: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Unknown major type: $majorType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length string (byte or text)
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
* @param int $expectedMajor Expected major type (0x40 for byte string, 0x60 for text string)
|
||||||
|
*
|
||||||
|
* @return string The concatenated string from all chunks
|
||||||
|
* @throws CborException If invalid chunk format or unexpected end of data
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteString(string &$data, int $expectedMajor): string
|
||||||
|
{
|
||||||
|
$chunks = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
$offset = $this->offset;
|
||||||
|
$length = $this->length;
|
||||||
|
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte = ord($data[$offset++]);
|
||||||
|
|
||||||
|
if ($byte === 0xFF) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return implode('', $chunks);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($byte & 0xE0) !== $expectedMajor) {
|
||||||
|
throw new CborException("Invalid chunk in indefinite string");
|
||||||
|
}
|
||||||
|
|
||||||
|
$info = $byte & 0x1F;
|
||||||
|
|
||||||
|
if ($info === 31) {
|
||||||
|
throw new CborException("Nested indefinite string");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid chunk length info: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data for chunk");
|
||||||
|
}
|
||||||
|
|
||||||
|
$chunks[] = substr($data, $offset, $len);
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length array
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return array The decoded array elements
|
||||||
|
* @throws CborException If unexpected end of data
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteArray(string &$data): array
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if ($this->offset >= $this->length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ord($data[$this->offset]) === 0xFF) {
|
||||||
|
$this->offset++;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length map
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return array The decoded map as associative array
|
||||||
|
* @throws CborException If unexpected end of data or odd number of items
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteMap(string &$data): array
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if ($this->offset >= $this->length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ord($data[$this->offset]) === 0xFF) {
|
||||||
|
$this->offset++;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$key = $this->decodeValue($data);
|
||||||
|
$result[$key] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
345
vendor/aws/aws-sdk-php/src/Api/Cbor/CborEncoder.php
vendored
Normal file
345
vendor/aws/aws-sdk-php/src/Api/Cbor/CborEncoder.php
vendored
Normal file
|
|
@ -0,0 +1,345 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Cbor;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\Exception\CborException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encodes PHP values to Concise Binary Object Representation according to RFC 8949
|
||||||
|
* https://www.rfc-editor.org/rfc/rfc8949.html
|
||||||
|
*
|
||||||
|
* Supports Major types 0-7 including:
|
||||||
|
* - Type 0: Unsigned integers
|
||||||
|
* - Type 1: Negative integers
|
||||||
|
* - Type 2: Byte strings (via ['__cbor_bytes' => $data] wrappers)
|
||||||
|
* - Type 3: Text strings (UTF-8)
|
||||||
|
* - Type 4: Arrays
|
||||||
|
* - Type 5: Maps
|
||||||
|
* - Type 6: Tagged values (timestamps)
|
||||||
|
* - Type 7: Simple values (null, bool, float)
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class CborEncoder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Pre-encoded integers 0-23 (single byte) and common larger values
|
||||||
|
* CBOR major type 0 (unsigned integer)
|
||||||
|
*/
|
||||||
|
private const INT_CACHE = [
|
||||||
|
0 => "\x00", 1 => "\x01", 2 => "\x02", 3 => "\x03",
|
||||||
|
4 => "\x04", 5 => "\x05", 6 => "\x06", 7 => "\x07",
|
||||||
|
8 => "\x08", 9 => "\x09", 10 => "\x0A", 11 => "\x0B",
|
||||||
|
12 => "\x0C", 13 => "\x0D", 14 => "\x0E", 15 => "\x0F",
|
||||||
|
16 => "\x10", 17 => "\x11", 18 => "\x12", 19 => "\x13",
|
||||||
|
20 => "\x14", 21 => "\x15", 22 => "\x16", 23 => "\x17",
|
||||||
|
24 => "\x18\x18", 25 => "\x18\x19", 26 => "\x18\x1A",
|
||||||
|
32 => "\x18\x20", 50 => "\x18\x32", 64 => "\x18\x40",
|
||||||
|
100 => "\x18\x64", 128 => "\x18\x80", 200 => "\x18\xC8",
|
||||||
|
255 => "\x18\xFF", 256 => "\x19\x01\x00", 500 => "\x19\x01\xF4",
|
||||||
|
1000 => "\x19\x03\xE8", 1023 => "\x19\x03\xFF",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pre-encoded negative integers -1 to -24 and common larger values
|
||||||
|
* CBOR major type 1 (negative integer)
|
||||||
|
*/
|
||||||
|
private const NEG_CACHE = [
|
||||||
|
-1 => "\x20", -2 => "\x21", -3 => "\x22", -4 => "\x23",
|
||||||
|
-5 => "\x24", -10 => "\x29", -20 => "\x33", -24 => "\x37",
|
||||||
|
-25 => "\x38\x18", -50 => "\x38\x31", -100 => "\x38\x63",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a PHP value to CBOR binary string
|
||||||
|
*
|
||||||
|
* @param mixed $value The value to encode
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encode(mixed $value): string
|
||||||
|
{
|
||||||
|
return $this->encodeValue($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively encode a value to CBOR
|
||||||
|
*
|
||||||
|
* @param mixed $value Value to encode
|
||||||
|
* @return string Encoded CBOR bytes
|
||||||
|
*/
|
||||||
|
private function encodeValue(mixed $value): string
|
||||||
|
{
|
||||||
|
switch (gettype($value)) {
|
||||||
|
case 'string':
|
||||||
|
$len = strlen($value);
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x60 | $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x78" . chr($len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeTextString($value);
|
||||||
|
|
||||||
|
case 'array':
|
||||||
|
if (isset($value['__cbor_timestamp'])) {
|
||||||
|
return "\xC1\xFB" . pack('E', $value['__cbor_timestamp']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Encode a byte string (major type 2)
|
||||||
|
if (isset($value['__cbor_bytes'])) {
|
||||||
|
$bytes = $value['__cbor_bytes'];
|
||||||
|
$len = strlen($bytes);
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x40 | $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x58" . chr($len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x10000) {
|
||||||
|
return "\x59" . pack('n', $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x5A" . pack('N', $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_is_list($value)) {
|
||||||
|
return $this->encodeArray($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeMap($value);
|
||||||
|
|
||||||
|
case 'integer':
|
||||||
|
if (isset(self::INT_CACHE[$value])) {
|
||||||
|
return self::INT_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset(self::NEG_CACHE[$value])) {
|
||||||
|
return self::NEG_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fast path for positive integers
|
||||||
|
// Major type 0: unsigned integer
|
||||||
|
if ($value >= 0) {
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x18" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x19" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x1A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x1B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeInteger($value);
|
||||||
|
|
||||||
|
case 'double':
|
||||||
|
// Encode a float (major type 7, float 64)
|
||||||
|
return "\xFB" . pack('E', $value);
|
||||||
|
|
||||||
|
case 'boolean':
|
||||||
|
// Encode a boolean (major type 7, simple)
|
||||||
|
return $value ? "\xF5" : "\xF4";
|
||||||
|
|
||||||
|
case 'NULL':
|
||||||
|
// Encode null (major type 7, simple)
|
||||||
|
return "\xF6";
|
||||||
|
|
||||||
|
case 'object':
|
||||||
|
throw new CborException("Cannot encode object of type: " . get_class($value));
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Cannot encode value of type: " . gettype($value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode an integer (major type 0 or 1)
|
||||||
|
*
|
||||||
|
* @param int $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeInteger(int $value): string
|
||||||
|
{
|
||||||
|
if (isset(self::INT_CACHE[$value])) {
|
||||||
|
return self::INT_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset(self::NEG_CACHE[$value])) {
|
||||||
|
return self::NEG_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value >= 0) {
|
||||||
|
// Major type 0: unsigned integer
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x18" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x19" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x1A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x1B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Major type 1: negative integer (-1 - n)
|
||||||
|
$value = -1 - $value;
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr(0x20 | $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x38" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x39" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x3A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x3B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a text string (major type 3)
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeTextString(string $value): string
|
||||||
|
{
|
||||||
|
$len = strlen($value);
|
||||||
|
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x60 | $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x78" . chr($len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x10000) {
|
||||||
|
return "\x79" . pack('n', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100000000) {
|
||||||
|
return "\x7A" . pack('N', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x7B" . pack('J', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode an array (major type 4)
|
||||||
|
*
|
||||||
|
* @param array $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeArray(array $value): string
|
||||||
|
{
|
||||||
|
$count = count($value);
|
||||||
|
|
||||||
|
if ($count < 24) {
|
||||||
|
$result = chr(0x80 | $count);
|
||||||
|
} elseif ($count < 0x100) {
|
||||||
|
$result = "\x98" . chr($count);
|
||||||
|
} elseif ($count < 0x10000) {
|
||||||
|
$result = "\x99" . pack('n', $count);
|
||||||
|
} elseif ($count < 0x100000000) {
|
||||||
|
$result = "\x9A" . pack('N', $count);
|
||||||
|
} else {
|
||||||
|
$result = "\x9B" . pack('J', $count);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($value as $item) {
|
||||||
|
$result .= $this->encodeValue($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a map (major type 5)
|
||||||
|
*
|
||||||
|
* @param array $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeMap(array $value): string
|
||||||
|
{
|
||||||
|
$count = count($value);
|
||||||
|
|
||||||
|
if ($count < 24) {
|
||||||
|
$result = chr(0xA0 | $count);
|
||||||
|
} elseif ($count < 0x100) {
|
||||||
|
$result = "\xB8" . chr($count);
|
||||||
|
} elseif ($count < 0x10000) {
|
||||||
|
$result = "\xB9" . pack('n', $count);
|
||||||
|
} elseif ($count < 0x100000000) {
|
||||||
|
$result = "\xBA" . pack('N', $count);
|
||||||
|
} else {
|
||||||
|
$result = "\xBB" . pack('J', $count);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
if (is_int($k)) {
|
||||||
|
$result .= $this->encodeInteger($k);
|
||||||
|
} else {
|
||||||
|
$len = strlen($k);
|
||||||
|
if ($len < 24) {
|
||||||
|
$result .= chr(0x60 | $len) . $k;
|
||||||
|
} elseif ($len < 0x100) {
|
||||||
|
$result .= "\x78" . chr($len) . $k;
|
||||||
|
} else {
|
||||||
|
$result .= "\x79" . pack('n', $len) . $k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result .= $this->encodeValue($v);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an empty map (major type 5 with 0 elements)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encodeEmptyMap(): string
|
||||||
|
{
|
||||||
|
return "\xA0";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an empty indefinite map (major type 5 indefinite length)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encodeEmptyIndefiniteMap(): string
|
||||||
|
{
|
||||||
|
return "\xBF\xFF";
|
||||||
|
}
|
||||||
|
}
|
||||||
6
vendor/aws/aws-sdk-php/src/Api/Cbor/Exception/CborException.php
vendored
Normal file
6
vendor/aws/aws-sdk-php/src/Api/Cbor/Exception/CborException.php
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Cbor\Exception;
|
||||||
|
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
|
class CborException extends RuntimeException {}
|
||||||
|
|
@ -30,11 +30,6 @@ class DateTimeResult extends \DateTime implements \JsonSerializable
|
||||||
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromEpoch');
|
throw new ParserException('Invalid timestamp value passed to DateTimeResult::fromEpoch');
|
||||||
}
|
}
|
||||||
|
|
||||||
// PHP 5.5 does not support sub-second precision
|
|
||||||
if (\PHP_VERSION_ID < 56000) {
|
|
||||||
return new self(gmdate('c', $unixTimestamp));
|
|
||||||
}
|
|
||||||
|
|
||||||
$decimalSeparator = isset(localeconv()['decimal_point']) ? localeconv()['decimal_point'] : ".";
|
$decimalSeparator = isset(localeconv()['decimal_point']) ? localeconv()['decimal_point'] : ".";
|
||||||
$formatString = "U" . $decimalSeparator . "u";
|
$formatString = "U" . $decimalSeparator . "u";
|
||||||
$dateTime = DateTime::createFromFormat(
|
$dateTime = DateTime::createFromFormat(
|
||||||
|
|
|
||||||
|
|
@ -31,19 +31,6 @@ abstract class AbstractErrorParser
|
||||||
StructureShape $member
|
StructureShape $member
|
||||||
);
|
);
|
||||||
|
|
||||||
protected function extractPayload(
|
|
||||||
StructureShape $member,
|
|
||||||
ResponseInterface $response
|
|
||||||
) {
|
|
||||||
if ($member instanceof StructureShape) {
|
|
||||||
// Structure members parse top-level data into a specific key.
|
|
||||||
return $this->payload($response, $member);
|
|
||||||
} else {
|
|
||||||
// Streaming data is just the stream from the response body.
|
|
||||||
return $response->getBody();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function populateShape(
|
protected function populateShape(
|
||||||
array &$data,
|
array &$data,
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
|
|
@ -57,16 +44,15 @@ abstract class AbstractErrorParser
|
||||||
if (!empty($data['code'])) {
|
if (!empty($data['code'])) {
|
||||||
|
|
||||||
$errors = $this->api->getOperation($command->getName())->getErrors();
|
$errors = $this->api->getOperation($command->getName())->getErrors();
|
||||||
foreach ($errors as $key => $error) {
|
foreach ($errors as $error) {
|
||||||
|
|
||||||
// If error code matches a known error shape, populate the body
|
// If error code matches a known error shape, populate the body
|
||||||
if ($this->errorCodeMatches($data, $error)) {
|
if ($this->errorCodeMatches($data, $error)) {
|
||||||
$modeledError = $error;
|
$data['body'] = $this->payload(
|
||||||
$data['body'] = $this->extractPayload(
|
$response,
|
||||||
$modeledError,
|
$error
|
||||||
$response
|
|
||||||
);
|
);
|
||||||
$data['error_shape'] = $modeledError;
|
$data['error_shape'] = $error;
|
||||||
|
|
||||||
foreach ($error->getMembers() as $name => $member) {
|
foreach ($error->getMembers() as $name => $member) {
|
||||||
switch ($member['location']) {
|
switch ($member['location']) {
|
||||||
|
|
|
||||||
159
vendor/aws/aws-sdk-php/src/Api/ErrorParser/AbstractRpcV2ErrorParser.php
vendored
Normal file
159
vendor/aws/aws-sdk-php/src/Api/ErrorParser/AbstractRpcV2ErrorParser.php
vendored
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Parser\AbstractParser;
|
||||||
|
use Aws\Api\StructureShape;
|
||||||
|
use Aws\CommandInterface;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use Psr\Http\Message\StreamInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base implementation for Smithy RPC V2 protocol error parsers.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
abstract class AbstractRpcV2ErrorParser extends AbstractErrorParser
|
||||||
|
{
|
||||||
|
private const HEADER_QUERY_ERROR = 'x-amzn-query-error';
|
||||||
|
private const HEADER_ERROR_TYPE = 'x-amzn-errortype';
|
||||||
|
private const HEADER_REQUEST_ID = 'x-amzn-requestid';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
* @param CommandInterface|null $command
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function __invoke(
|
||||||
|
ResponseInterface $response,
|
||||||
|
?CommandInterface $command = null
|
||||||
|
) {
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
|
$data = $this->parseError($response);
|
||||||
|
|
||||||
|
if (isset($data['parsed']['__type'])) {
|
||||||
|
$data['message'] = $data['parsed']['message'] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->populateShape($data, $response, $command);
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
* @param StructureShape $member
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
abstract protected function payload(
|
||||||
|
ResponseInterface $response,
|
||||||
|
StructureShape $member
|
||||||
|
): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StreamInterface $body
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
abstract protected function parseBody(
|
||||||
|
StreamInterface $body,
|
||||||
|
ResponseInterface $response
|
||||||
|
): mixed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
private function parseError(ResponseInterface $response): array
|
||||||
|
{
|
||||||
|
$statusCode = (string) $response->getStatusCode();
|
||||||
|
$errorCode = null;
|
||||||
|
$errorType = null;
|
||||||
|
|
||||||
|
if ($this->api?->getMetadata('awsQueryCompatible') !== null
|
||||||
|
&& $response->hasHeader(self::HEADER_QUERY_ERROR)
|
||||||
|
&& $awsQueryError = $this->parseQueryCompatibleHeader($response)
|
||||||
|
) {
|
||||||
|
$errorCode = $awsQueryError['code'];
|
||||||
|
$errorType = $awsQueryError['type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$errorCode && $response->hasHeader(self::HEADER_ERROR_TYPE)) {
|
||||||
|
$errorCode = $this->extractErrorCode(
|
||||||
|
$response->getHeaderLine(self::HEADER_ERROR_TYPE)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$parsedBody = null;
|
||||||
|
$body = $response->getBody();
|
||||||
|
if ($body->getSize()) {
|
||||||
|
//TODO handle unseekable streams with CachingStream
|
||||||
|
$parsedBody = array_change_key_case($this->parseBody($body, $response));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$errorCode && $parsedBody) {
|
||||||
|
$errorCode = $this->extractErrorCode(
|
||||||
|
$parsedBody['code'] ?? $parsedBody['__type'] ?? ''
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [
|
||||||
|
'request_id' => $response->getHeaderLine(self::HEADER_REQUEST_ID),
|
||||||
|
'code' => $errorCode ?: null,
|
||||||
|
'message' => null,
|
||||||
|
'type' => $errorType ?? ($statusCode[0] === '4' ? 'client' : 'server'),
|
||||||
|
'parsed' => $parsedBody,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse AWS Query Compatible error from header
|
||||||
|
*
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
*
|
||||||
|
* @return array|null Returns ['code' => string, 'type' => string] or null
|
||||||
|
*/
|
||||||
|
private function parseQueryCompatibleHeader(ResponseInterface $response): ?array
|
||||||
|
{
|
||||||
|
$parts = explode(';', $response->getHeaderLine(self::HEADER_QUERY_ERROR));
|
||||||
|
if (count($parts) === 2 && $parts[0] && $parts[1]) {
|
||||||
|
return [
|
||||||
|
'code' => $parts[0],
|
||||||
|
'type' => $parts[1],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extract error code from raw error string containing # and/or : delimiters
|
||||||
|
*
|
||||||
|
* @param string $rawErrorCode
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function extractErrorCode(string $rawErrorCode): string
|
||||||
|
{
|
||||||
|
// Handle format with both # and uri (e.g., "namespace#ErrorCode:http://foo-bar")
|
||||||
|
if (str_contains($rawErrorCode, ':') && str_contains($rawErrorCode, '#')) {
|
||||||
|
$start = strpos($rawErrorCode, '#') + 1;
|
||||||
|
$end = strpos($rawErrorCode, ':', $start);
|
||||||
|
return substr($rawErrorCode, $start, $end - $start);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle format with uri only : (e.g., "ErrorCode:http://foo-bar.com/baz")
|
||||||
|
if (str_contains($rawErrorCode, ':')) {
|
||||||
|
return substr($rawErrorCode, 0, strpos($rawErrorCode, ':'));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle format with only # (e.g., "namespace#ErrorCode")
|
||||||
|
if (str_contains($rawErrorCode, '#')) {
|
||||||
|
return substr($rawErrorCode, strpos($rawErrorCode, '#') + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $rawErrorCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Aws\Api\ErrorParser;
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Parser\AbstractParser;
|
||||||
use Aws\Api\Parser\PayloadParserTrait;
|
use Aws\Api\Parser\PayloadParserTrait;
|
||||||
use Aws\Api\StructureShape;
|
use Aws\Api\StructureShape;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -38,9 +39,10 @@ trait JsonParserTrait
|
||||||
}
|
}
|
||||||
|
|
||||||
$parsedBody = null;
|
$parsedBody = null;
|
||||||
$body = $response->getBody();
|
|
||||||
if (!$body->isSeekable() || $body->getSize()) {
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
$parsedBody = $this->parseJson((string) $body, $response);
|
if (!empty($rawBody)) {
|
||||||
|
$parsedBody = $this->parseJson($rawBody, $response);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse error code from response body
|
// Parse error code from response body
|
||||||
|
|
@ -132,11 +134,12 @@ trait JsonParserTrait
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
StructureShape $member
|
StructureShape $member
|
||||||
) {
|
) {
|
||||||
$body = $response->getBody();
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
if (!$body->isSeekable() || $body->getSize()) {
|
|
||||||
$jsonBody = $this->parseJson($body, $response);
|
if (!empty($rawBody)) {
|
||||||
|
$jsonBody = $this->parseJson($rawBody, $response);
|
||||||
} else {
|
} else {
|
||||||
$jsonBody = (string) $body;
|
$jsonBody = $rawBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->parser->parse($member, $jsonBody);
|
return $this->parser->parse($member, $jsonBody);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Aws\Api\ErrorParser;
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Parser\AbstractParser;
|
||||||
use Aws\Api\Parser\JsonParser;
|
use Aws\Api\Parser\JsonParser;
|
||||||
use Aws\Api\Service;
|
use Aws\Api\Service;
|
||||||
use Aws\CommandInterface;
|
use Aws\CommandInterface;
|
||||||
|
|
@ -25,6 +26,7 @@ class JsonRpcErrorParser extends AbstractErrorParser
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
?CommandInterface $command = null
|
?CommandInterface $command = null
|
||||||
) {
|
) {
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
$data = $this->genericHandler($response);
|
$data = $this->genericHandler($response);
|
||||||
|
|
||||||
// Make the casing consistent across services.
|
// Make the casing consistent across services.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Aws\Api\ErrorParser;
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Parser\AbstractParser;
|
||||||
use Aws\Api\Parser\JsonParser;
|
use Aws\Api\Parser\JsonParser;
|
||||||
use Aws\Api\Service;
|
use Aws\Api\Service;
|
||||||
use Aws\Api\StructureShape;
|
use Aws\Api\StructureShape;
|
||||||
|
|
@ -26,6 +27,7 @@ class RestJsonErrorParser extends AbstractErrorParser
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
?CommandInterface $command = null
|
?CommandInterface $command = null
|
||||||
) {
|
) {
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
$data = $this->genericHandler($response);
|
$data = $this->genericHandler($response);
|
||||||
|
|
||||||
// Merge in error data from the JSON body
|
// Merge in error data from the JSON body
|
||||||
|
|
@ -40,7 +42,9 @@ class RestJsonErrorParser extends AbstractErrorParser
|
||||||
|
|
||||||
// Retrieve error message directly
|
// Retrieve error message directly
|
||||||
$data['message'] = $data['parsed']['message']
|
$data['message'] = $data['parsed']['message']
|
||||||
?? ($data['parsed']['Message'] ?? null);
|
?? $data['parsed']['Message']
|
||||||
|
?? $data['parsed']['error_description']
|
||||||
|
?? null;
|
||||||
|
|
||||||
$this->populateShape($data, $response, $command);
|
$this->populateShape($data, $response, $command);
|
||||||
|
|
||||||
|
|
|
||||||
65
vendor/aws/aws-sdk-php/src/Api/ErrorParser/RpcV2CborErrorParser.php
vendored
Normal file
65
vendor/aws/aws-sdk-php/src/Api/ErrorParser/RpcV2CborErrorParser.php
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\CborDecoder;
|
||||||
|
use Aws\Api\Parser\RpcV2ParserTrait;
|
||||||
|
use Aws\Api\Service;
|
||||||
|
use Aws\Api\StructureShape;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use Psr\Http\Message\StreamInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses errors according to Smithy RPC V2 CBOR protocol standards.
|
||||||
|
*
|
||||||
|
* https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class RpcV2CborErrorParser extends AbstractRpcV2ErrorParser
|
||||||
|
{
|
||||||
|
/** @var CborDecoder */
|
||||||
|
private CborDecoder $decoder;
|
||||||
|
|
||||||
|
use RpcV2ParserTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Service|null $api
|
||||||
|
*/
|
||||||
|
public function __construct(?Service $api = null)
|
||||||
|
{
|
||||||
|
$this->decoder = new CborDecoder();
|
||||||
|
parent::__construct($api);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
* @param StructureShape $member
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
* @throws \Exception
|
||||||
|
*/
|
||||||
|
protected function payload(
|
||||||
|
ResponseInterface $response,
|
||||||
|
StructureShape $member
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
$body = $response->getBody();
|
||||||
|
$cborBody = $this->parseCbor($body, $response);
|
||||||
|
|
||||||
|
return $this->resolveOutputShape($member, $cborBody);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StreamInterface $body
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function parseBody(
|
||||||
|
StreamInterface $body,
|
||||||
|
ResponseInterface $response
|
||||||
|
): mixed
|
||||||
|
{
|
||||||
|
return $this->parseCbor($body, $response);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace Aws\Api\ErrorParser;
|
namespace Aws\Api\ErrorParser;
|
||||||
|
|
||||||
|
use Aws\Api\Parser\AbstractParser;
|
||||||
use Aws\Api\Parser\PayloadParserTrait;
|
use Aws\Api\Parser\PayloadParserTrait;
|
||||||
use Aws\Api\Parser\XmlParser;
|
use Aws\Api\Parser\XmlParser;
|
||||||
use Aws\Api\Service;
|
use Aws\Api\Service;
|
||||||
|
|
@ -27,6 +28,7 @@ class XmlErrorParser extends AbstractErrorParser
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
?CommandInterface $command = null
|
?CommandInterface $command = null
|
||||||
) {
|
) {
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
$code = (string) $response->getStatusCode();
|
$code = (string) $response->getStatusCode();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|
@ -37,9 +39,9 @@ class XmlErrorParser extends AbstractErrorParser
|
||||||
'parsed' => null
|
'parsed' => null
|
||||||
];
|
];
|
||||||
|
|
||||||
$body = $response->getBody();
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
if ($body->getSize() > 0) {
|
if (!empty($rawBody)) {
|
||||||
$this->parseBody($this->parseXml($body, $response), $data);
|
$this->parseBody($this->parseXml($rawBody, $response), $data);
|
||||||
} else {
|
} else {
|
||||||
$this->parseHeaders($response, $data);
|
$this->parseHeaders($response, $data);
|
||||||
}
|
}
|
||||||
|
|
@ -100,12 +102,20 @@ class XmlErrorParser extends AbstractErrorParser
|
||||||
ResponseInterface $response,
|
ResponseInterface $response,
|
||||||
StructureShape $member
|
StructureShape $member
|
||||||
) {
|
) {
|
||||||
$xmlBody = $this->parseXml($response->getBody(), $response);
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
|
|
||||||
|
if (empty($rawBody)) {
|
||||||
|
return $rawBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
$xmlBody = $this->parseXml($rawBody, $response);
|
||||||
$prefix = $this->registerNamespacePrefix($xmlBody);
|
$prefix = $this->registerNamespacePrefix($xmlBody);
|
||||||
$errorBody = $xmlBody->xpath("//{$prefix}Error");
|
$errorBody = $xmlBody->xpath("//{$prefix}Error");
|
||||||
|
|
||||||
if (is_array($errorBody) && !empty($errorBody[0])) {
|
if (is_array($errorBody) && !empty($errorBody[0])) {
|
||||||
return $this->parser->parse($member, $errorBody[0]);
|
return $this->parser->parse($member, $errorBody[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return $rawBody;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
vendor/aws/aws-sdk-php/src/Api/Exception/RpcV2CborException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Api/Exception/RpcV2CborException.php
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Exception;
|
||||||
|
|
||||||
|
use Aws\HasMonitoringEventsTrait;
|
||||||
|
use Aws\MonitoringEventsInterface;
|
||||||
|
|
||||||
|
class RpcV2CborException extends \RuntimeException implements
|
||||||
|
MonitoringEventsInterface
|
||||||
|
{
|
||||||
|
use HasMonitoringEventsTrait;
|
||||||
|
}
|
||||||
2
vendor/aws/aws-sdk-php/src/Api/Operation.php
vendored
2
vendor/aws/aws-sdk-php/src/Api/Operation.php
vendored
|
|
@ -89,7 +89,7 @@ class Operation extends AbstractModel
|
||||||
/**
|
/**
|
||||||
* Get an array of operation error shapes.
|
* Get an array of operation error shapes.
|
||||||
*
|
*
|
||||||
* @return Shape[]
|
* @return StructureShape[]
|
||||||
*/
|
*/
|
||||||
public function getErrors()
|
public function getErrors()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ use Aws\Api\Service;
|
||||||
use Aws\Api\StructureShape;
|
use Aws\Api\StructureShape;
|
||||||
use Aws\CommandInterface;
|
use Aws\CommandInterface;
|
||||||
use Aws\ResultInterface;
|
use Aws\ResultInterface;
|
||||||
|
use GuzzleHttp\Psr7\CachingStream;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Psr\Http\Message\StreamInterface;
|
use Psr\Http\Message\StreamInterface;
|
||||||
|
|
||||||
|
|
@ -43,4 +44,27 @@ abstract class AbstractParser
|
||||||
StructureShape $member,
|
StructureShape $member,
|
||||||
$response
|
$response
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static function getBodyContents(ResponseInterface $response): string
|
||||||
|
{
|
||||||
|
$body = $response->getBody();
|
||||||
|
if ($body->isSeekable()) {
|
||||||
|
$body->rewind();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $body->getContents();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getResponseWithCachingStream(
|
||||||
|
ResponseInterface $response
|
||||||
|
): ResponseInterface
|
||||||
|
{
|
||||||
|
if (!$response->getBody()->isSeekable()) {
|
||||||
|
return $response->withBody(
|
||||||
|
new CachingStream($response->getBody())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,21 @@ abstract class AbstractRestParser extends AbstractParser
|
||||||
|
|
||||||
if ($payload = $output['payload']) {
|
if ($payload = $output['payload']) {
|
||||||
$this->extractPayload($payload, $output, $response, $result);
|
$this->extractPayload($payload, $output, $response, $result);
|
||||||
|
} else {
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
|
|
||||||
|
if ($response->getBody()->getSize() === null) {
|
||||||
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
|
$isEmpty = empty($rawBody);
|
||||||
|
} else {
|
||||||
|
$isEmpty = $response->getBody()->getSize() === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$isEmpty && count($output->getMembers()) > 0
|
||||||
|
) {
|
||||||
|
// if no payload was found, then parse the contents of the body
|
||||||
|
$this->payload($response, $output, $result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($output->getMembers() as $name => $member) {
|
foreach ($output->getMembers() as $name => $member) {
|
||||||
|
|
@ -55,15 +70,6 @@ abstract class AbstractRestParser extends AbstractParser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$body = $response->getBody();
|
|
||||||
if (!$payload
|
|
||||||
&& (!$body->isSeekable() || $body->getSize())
|
|
||||||
&& count($output->getMembers()) > 0
|
|
||||||
) {
|
|
||||||
// if no payload was found, then parse the contents of the body
|
|
||||||
$this->payload($response, $output, $result);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Result($result);
|
return new Result($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,17 +81,29 @@ abstract class AbstractRestParser extends AbstractParser
|
||||||
) {
|
) {
|
||||||
$member = $output->getMember($payload);
|
$member = $output->getMember($payload);
|
||||||
$body = $response->getBody();
|
$body = $response->getBody();
|
||||||
|
|
||||||
if (!empty($member['eventstream'])) {
|
if (!empty($member['eventstream'])) {
|
||||||
$result[$payload] = new EventParsingIterator(
|
$result[$payload] = new EventParsingIterator(
|
||||||
$body,
|
$body,
|
||||||
$member,
|
$member,
|
||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
} elseif ($member instanceof StructureShape) {
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = AbstractParser::getResponseWithCachingStream($response);
|
||||||
|
|
||||||
|
if ($member instanceof StructureShape) {
|
||||||
//Unions must have at least one member set to a non-null value
|
//Unions must have at least one member set to a non-null value
|
||||||
// If the body is empty, we can assume it is unset
|
// If the body is empty, we can assume it is unset
|
||||||
if (!empty($member['union']) && ($body->isSeekable() && !$body->getSize())) {
|
if ($response->getBody()->getSize() === null) {
|
||||||
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
|
$isEmpty = empty($rawBody);
|
||||||
|
} else {
|
||||||
|
$isEmpty = $response->getBody()->getSize() === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($member['union']) && $isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
83
vendor/aws/aws-sdk-php/src/Api/Parser/AbstractRpcV2Parser.php
vendored
Normal file
83
vendor/aws/aws-sdk-php/src/Api/Parser/AbstractRpcV2Parser.php
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Parser;
|
||||||
|
|
||||||
|
use Aws\Api\Operation;
|
||||||
|
use Aws\Api\Parser\Exception\ParserException;
|
||||||
|
use Aws\Result;
|
||||||
|
use Aws\CommandInterface;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base implementation for Smithy RPC V2 protocol parsers.
|
||||||
|
*
|
||||||
|
* Implementers MUST define the following static property representing
|
||||||
|
* the `Smithy-Protocol` header value:
|
||||||
|
* self::HEADER_SMITHY_PROTOCOL => static::$smithyProtocol
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
abstract class AbstractRpcV2Parser extends AbstractParser
|
||||||
|
{
|
||||||
|
private const HEADER_SMITHY_PROTOCOL = 'Smithy-Protocol';
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
protected static string $smithyProtocol;
|
||||||
|
|
||||||
|
public function __invoke(
|
||||||
|
CommandInterface $command,
|
||||||
|
ResponseInterface $response
|
||||||
|
) {
|
||||||
|
$operation = $this->api->getOperation($command->getName());
|
||||||
|
|
||||||
|
return $this->parseResponse($response, $operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses a response according to Smithy RPC V2 protocol standards.
|
||||||
|
*
|
||||||
|
* @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
|
||||||
|
): Result
|
||||||
|
{
|
||||||
|
$smithyProtocolHeader = $response->getHeaderLine(self::HEADER_SMITHY_PROTOCOL);
|
||||||
|
if ($smithyProtocolHeader !== static::$smithyProtocol) {
|
||||||
|
$statusCode = $response->getStatusCode();
|
||||||
|
throw new ParserException(
|
||||||
|
"Malformed response: Smithy-Protocol header mismatch (HTTP {$statusCode}). "
|
||||||
|
. 'Expected ' . static::$smithyProtocol
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($operation['output'] === null) {
|
||||||
|
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(),
|
||||||
|
$outputShape,
|
||||||
|
$response
|
||||||
|
);
|
||||||
|
|
||||||
|
return new Result(is_null($result) ? [] : $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -63,11 +63,16 @@ class JsonRpcParser extends AbstractParser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$body = $response->getBody();
|
||||||
|
if ($body->isSeekable()) {
|
||||||
|
$body->rewind();
|
||||||
|
}
|
||||||
|
|
||||||
$result = $this->parseMemberFromStream(
|
$result = $this->parseMemberFromStream(
|
||||||
$response->getBody(),
|
$body,
|
||||||
$operation->getOutput(),
|
$operation->getOutput(),
|
||||||
$response
|
$response
|
||||||
);
|
);
|
||||||
|
|
||||||
return new Result(is_null($result) ? [] : $result);
|
return new Result(is_null($result) ? [] : $result);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
namespace Aws\Api\Parser;
|
namespace Aws\Api\Parser;
|
||||||
|
|
||||||
use Aws\Api\Parser\Exception\ParserException;
|
use Aws\Api\Parser\Exception\ParserException;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
|
||||||
|
|
||||||
trait PayloadParserTrait
|
trait PayloadParserTrait
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,11 @@ class QueryParser extends AbstractParser
|
||||||
ResponseInterface $response
|
ResponseInterface $response
|
||||||
) {
|
) {
|
||||||
$output = $this->api->getOperation($command->getName())->getOutput();
|
$output = $this->api->getOperation($command->getName())->getOutput();
|
||||||
$body = $response->getBody();
|
// Read the full payload, even in non-seekable streams
|
||||||
$xml = !$body->isSeekable() || $body->getSize()
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
? $this->parseXml($body, $response)
|
// Just parse when the body is not empty
|
||||||
|
$xml = !empty($rawBody)
|
||||||
|
? $this->parseXml($rawBody, $response)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
// Empty request bodies should not be deserialized.
|
// Empty request bodies should not be deserialized.
|
||||||
|
|
|
||||||
|
|
@ -28,15 +28,14 @@ class RestJsonParser extends AbstractRestParser
|
||||||
StructureShape $member,
|
StructureShape $member,
|
||||||
array &$result
|
array &$result
|
||||||
) {
|
) {
|
||||||
$responseBody = (string) $response->getBody();
|
$rawBody = AbstractParser::getBodyContents($response);
|
||||||
|
|
||||||
// Parse JSON if we have content
|
// Parse JSON if we have content
|
||||||
$parsedJson = null;
|
if (!empty($rawBody)) {
|
||||||
if (!empty($responseBody)) {
|
$parsedJson = $this->parseJson($rawBody, $response);
|
||||||
$parsedJson = $this->parseJson($responseBody, $response);
|
|
||||||
} else {
|
} else {
|
||||||
// An empty response body should be deserialized as null
|
// An empty response body should be deserialized as null
|
||||||
$result = $parsedJson;
|
$result = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,12 @@ class RestXmlParser extends AbstractRestParser
|
||||||
StructureShape $member,
|
StructureShape $member,
|
||||||
array &$result
|
array &$result
|
||||||
) {
|
) {
|
||||||
$result += $this->parseMemberFromStream($response->getBody(), $member, $response);
|
$body = $response->getBody();
|
||||||
|
if ($body->isSeekable()) {
|
||||||
|
$body->rewind();
|
||||||
|
}
|
||||||
|
|
||||||
|
$result += $this->parseMemberFromStream($body, $member, $response);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parseMemberFromStream(
|
public function parseMemberFromStream(
|
||||||
|
|
|
||||||
50
vendor/aws/aws-sdk-php/src/Api/Parser/RpcV2CborParser.php
vendored
Normal file
50
vendor/aws/aws-sdk-php/src/Api/Parser/RpcV2CborParser.php
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Parser;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\CborDecoder;
|
||||||
|
use Aws\Api\Service;
|
||||||
|
use Aws\Api\StructureShape;
|
||||||
|
use Psr\Http\Message\StreamInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses responses according to Smithy RPC V2 CBOR protocol standards.
|
||||||
|
*
|
||||||
|
* https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class RpcV2CborParser extends AbstractRpcV2Parser
|
||||||
|
{
|
||||||
|
/** @var string */
|
||||||
|
protected static string $smithyProtocol = 'rpc-v2-cbor';
|
||||||
|
|
||||||
|
/** @var CborDecoder */
|
||||||
|
private CborDecoder $decoder;
|
||||||
|
|
||||||
|
use RpcV2ParserTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Service $api Service description
|
||||||
|
*/
|
||||||
|
public function __construct(Service $api)
|
||||||
|
{
|
||||||
|
$this->decoder = new CborDecoder();
|
||||||
|
parent::__construct($api);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StreamInterface $stream
|
||||||
|
* @param StructureShape $member
|
||||||
|
* @param $response
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function parseMemberFromStream(
|
||||||
|
StreamInterface $stream,
|
||||||
|
StructureShape $member,
|
||||||
|
$response
|
||||||
|
): mixed
|
||||||
|
{
|
||||||
|
return $this->resolveOutputShape($member, $this->parseCbor($stream, $response));
|
||||||
|
}
|
||||||
|
}
|
||||||
105
vendor/aws/aws-sdk-php/src/Api/Parser/RpcV2ParserTrait.php
vendored
Normal file
105
vendor/aws/aws-sdk-php/src/Api/Parser/RpcV2ParserTrait.php
vendored
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Parser;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\Exception\CborException;
|
||||||
|
use Aws\Api\DateTimeResult;
|
||||||
|
use Aws\Api\Parser\Exception\ParserException;
|
||||||
|
use Aws\Api\Shape;
|
||||||
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
use Psr\Http\Message\StreamInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shared parsing logic for RPC V2 Parsers.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
trait RpcV2ParserTrait
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Resolves output shape fields that are present in the response
|
||||||
|
*
|
||||||
|
* @param Shape $shape
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function resolveOutputShape(Shape $shape, mixed $value): mixed
|
||||||
|
{
|
||||||
|
if ($value === null) {
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($shape['type']) {
|
||||||
|
case 'structure':
|
||||||
|
$target = [];
|
||||||
|
foreach ($shape->getMembers() as $name => $member) {
|
||||||
|
$locationName = $member['locationName'] ?: $name;
|
||||||
|
if (isset($value[$locationName])) {
|
||||||
|
$target[$name] = $this->resolveOutputShape($member, $value[$locationName]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $target;
|
||||||
|
|
||||||
|
case 'list':
|
||||||
|
$target = [];
|
||||||
|
foreach ($value as $v) {
|
||||||
|
$target[] = $this->resolveOutputShape($shape->getMember(), $v);
|
||||||
|
}
|
||||||
|
return $target;
|
||||||
|
|
||||||
|
case 'map':
|
||||||
|
$target = [];
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
if ($v !== null) {
|
||||||
|
$target[$k] = $this->resolveOutputShape($shape->getValue(), $v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $target;
|
||||||
|
|
||||||
|
case 'timestamp':
|
||||||
|
try {
|
||||||
|
$value = DateTimeResult::fromEpoch($value);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
trigger_error(
|
||||||
|
'Unable to parse timestamp value for '
|
||||||
|
. $shape->getName()
|
||||||
|
. ': ' . $e->getMessage(),
|
||||||
|
E_USER_WARNING
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parses CBOR-encoded response data from RPC V2 CBOR services.
|
||||||
|
*
|
||||||
|
* @param StreamInterface $stream
|
||||||
|
* @param ResponseInterface $response
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function parseCbor(
|
||||||
|
StreamInterface $stream,
|
||||||
|
ResponseInterface $response
|
||||||
|
): mixed
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$cborString = (string) $stream;
|
||||||
|
return empty($cborString)
|
||||||
|
? null
|
||||||
|
: $this->decoder->decode($cborString);
|
||||||
|
} catch (CborException $e) {
|
||||||
|
throw new ParserException(
|
||||||
|
"Malformed Response: error parsing CBOR: {$e->getMessage()}",
|
||||||
|
0,
|
||||||
|
$e,
|
||||||
|
['response' => $response]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
220
vendor/aws/aws-sdk-php/src/Api/Serializer/AbstractRpcV2Serializer.php
vendored
Normal file
220
vendor/aws/aws-sdk-php/src/Api/Serializer/AbstractRpcV2Serializer.php
vendored
Normal file
|
|
@ -0,0 +1,220 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Serializer;
|
||||||
|
|
||||||
|
use Aws\Api\Service;
|
||||||
|
|
||||||
|
use Aws\Api\Shape;
|
||||||
|
use Aws\Api\StructureShape;
|
||||||
|
use Aws\CommandInterface;
|
||||||
|
use Aws\EndpointV2\EndpointV2SerializerTrait;
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||||
|
use DateTimeInterface;
|
||||||
|
use GuzzleHttp\Psr7;
|
||||||
|
use GuzzleHttp\Psr7\Request;
|
||||||
|
use GuzzleHttp\Psr7\Uri;
|
||||||
|
use Psr\Http\Message\RequestInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base implementation for Smithy RPC V2 protocol serializers.
|
||||||
|
*
|
||||||
|
* Implementers MUST override the defaultHeader property to represent
|
||||||
|
* protocol-specific default header values:
|
||||||
|
* self::HEADER_SMITHY_PROTOCOL => static::SMITHY_PROTOCOL,
|
||||||
|
* self::HEADER_CONTENT_TYPE => static::DEFAULT_CONTENT_TYPE,
|
||||||
|
* self::HEADER_ACCEPT => static::DEFAULT_ACCEPT
|
||||||
|
*
|
||||||
|
* Implementers must also implement `serialize()`, `resolveBlob()`, and `resolveTimestamp()
|
||||||
|
* according to their respective protocol specifications.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
abstract class AbstractRpcV2Serializer
|
||||||
|
{
|
||||||
|
protected const HEADER_SMITHY_PROTOCOL = 'Smithy-Protocol';
|
||||||
|
protected const HEADER_CONTENT_TYPE = 'Content-Type';
|
||||||
|
protected const HEADER_ACCEPT = 'Accept';
|
||||||
|
|
||||||
|
/** @var array */
|
||||||
|
protected static array $defaultHeaders;
|
||||||
|
|
||||||
|
/** @var Service */
|
||||||
|
private Service $api;
|
||||||
|
|
||||||
|
/** @var string|Uri */
|
||||||
|
private string|Uri $endpoint;
|
||||||
|
|
||||||
|
/** @var bool */
|
||||||
|
private bool $isUseEndpointV2;
|
||||||
|
|
||||||
|
use EndpointV2SerializerTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Service $api Service API description
|
||||||
|
* @param string $endpoint Endpoint to connect to
|
||||||
|
*/
|
||||||
|
public function __construct(Service $api, string|Uri $endpoint)
|
||||||
|
{
|
||||||
|
$this->api = $api;
|
||||||
|
$this->endpoint = Psr7\Utils::uriFor($endpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param CommandInterface $command Command to serialize into a request.
|
||||||
|
* @param mixed|null $endpoint
|
||||||
|
*
|
||||||
|
* @return RequestInterface
|
||||||
|
*/
|
||||||
|
public function __invoke(
|
||||||
|
CommandInterface $command,
|
||||||
|
mixed $endpoint = null
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$commandArgs = $command->toArray();
|
||||||
|
$commandName = $command->getName();
|
||||||
|
$operation = $this->api->getOperation($commandName);
|
||||||
|
$headers = static::$defaultHeaders;
|
||||||
|
|
||||||
|
// Operations with no defined input type must not contain bodies
|
||||||
|
// Content-Type must not be set
|
||||||
|
if ($operation['input'] !== null) {
|
||||||
|
$body = $this->serialize($operation->getInput(), $commandArgs);
|
||||||
|
$headers['Content-Length'] = (string) strlen($body);
|
||||||
|
} else {
|
||||||
|
unset($headers['Content-Type']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($endpoint instanceof RulesetEndpoint) {
|
||||||
|
$this->isUseEndpointV2 = true;
|
||||||
|
$this->setEndpointV2RequestOptions($endpoint, $headers);
|
||||||
|
$this->endpoint = $endpoint->getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
$requestTarget = $this->buildRequestTarget(
|
||||||
|
$commandName,
|
||||||
|
$operation['http']['requestUri'] ?? ''
|
||||||
|
);
|
||||||
|
$uri = new Uri($this->endpoint . $requestTarget);
|
||||||
|
|
||||||
|
return new Request(
|
||||||
|
$operation['http']['method'],
|
||||||
|
$uri,
|
||||||
|
$headers,
|
||||||
|
$body ?? null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StructureShape $inputShape
|
||||||
|
* @param array $commandArgs
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
abstract public function serialize(
|
||||||
|
StructureShape $inputShape,
|
||||||
|
array $commandArgs
|
||||||
|
): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves arguments for blob shapes present in the request arguments
|
||||||
|
* into a protocol-specific format.
|
||||||
|
*
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
abstract protected function resolveBlob(mixed $value): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves arguments for timestamp shapes present in the request arguments
|
||||||
|
* into a protocol-specific format.
|
||||||
|
*
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
abstract protected function resolveTimestamp(
|
||||||
|
int|float|string|DateTimeInterface $value
|
||||||
|
): array;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves input shape fields that are present in the request arguments
|
||||||
|
*
|
||||||
|
* @param Shape $shape
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function resolveInputShape(Shape $shape, mixed $value): mixed
|
||||||
|
{
|
||||||
|
switch ($shape->getType()) {
|
||||||
|
case 'structure':
|
||||||
|
$data = [];
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
if ($v !== null && $shape->hasMember($k)) {
|
||||||
|
$valueShape = $shape->getMember($k);
|
||||||
|
$data[$valueShape['locationName'] ?: $k]
|
||||||
|
= $this->resolveInputShape($valueShape, $v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
|
||||||
|
case 'list':
|
||||||
|
$items = $shape->getMember();
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
$value[$k] = $this->resolveInputShape($items, $v);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
case 'map':
|
||||||
|
$values = $shape->getValue();
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
$value[$k] = $this->resolveInputShape($values, $v);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
|
||||||
|
case 'timestamp':
|
||||||
|
return $this->resolveTimestamp($value);
|
||||||
|
|
||||||
|
case 'string':
|
||||||
|
return (string) $value;
|
||||||
|
|
||||||
|
case 'integer':
|
||||||
|
case 'long':
|
||||||
|
return (int) $value;
|
||||||
|
|
||||||
|
case 'double':
|
||||||
|
case 'float':
|
||||||
|
return (float) $value;
|
||||||
|
|
||||||
|
case 'blob':
|
||||||
|
return $this->resolveBlob($value);
|
||||||
|
|
||||||
|
default:
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builds request URI absolute path
|
||||||
|
*
|
||||||
|
* @param string $commandName
|
||||||
|
* @param string $requestUri
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function buildRequestTarget(
|
||||||
|
string $commandName,
|
||||||
|
string $requestUri
|
||||||
|
): string
|
||||||
|
{
|
||||||
|
$requestUri = str_ends_with($requestUri, '/')
|
||||||
|
? $requestUri
|
||||||
|
: $requestUri . '/';
|
||||||
|
$targetPrefix = $this->api->getMetadata('targetPrefix');
|
||||||
|
|
||||||
|
return "{$requestUri}service/{$targetPrefix}/operation/{$commandName}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ class JsonRpcSerializer
|
||||||
$headers = [
|
$headers = [
|
||||||
'X-Amz-Target' => $this->api->getMetadata('targetPrefix') . '.' . $operationName,
|
'X-Amz-Target' => $this->api->getMetadata('targetPrefix') . '.' . $operationName,
|
||||||
'Content-Type' => $this->contentType,
|
'Content-Type' => $this->contentType,
|
||||||
'Content-Length' => strlen($body)
|
'Content-Length' => (string) strlen($body)
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($endpoint instanceof RulesetEndpoint) {
|
if ($endpoint instanceof RulesetEndpoint) {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class QuerySerializer
|
||||||
}
|
}
|
||||||
$body = http_build_query($body, '', '&', PHP_QUERY_RFC3986);
|
$body = http_build_query($body, '', '&', PHP_QUERY_RFC3986);
|
||||||
$headers = [
|
$headers = [
|
||||||
'Content-Length' => strlen($body),
|
'Content-Length' => (string) strlen($body),
|
||||||
'Content-Type' => 'application/x-www-form-urlencoded'
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
||||||
];
|
];
|
||||||
$requestUri = $operation['http']['requestUri'] ?? null;
|
$requestUri = $operation['http']['requestUri'] ?? null;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class RestJsonSerializer extends RestSerializer
|
||||||
{
|
{
|
||||||
$opts['headers']['Content-Type'] = $this->contentType;
|
$opts['headers']['Content-Type'] = $this->contentType;
|
||||||
$body = $this->jsonFormatter->build($member, $value);
|
$body = $this->jsonFormatter->build($member, $value);
|
||||||
$opts['headers']['Content-Length'] = strlen($body);
|
$opts['headers']['Content-Length'] = (string) strlen($body);
|
||||||
$opts['body'] = $body;
|
$opts['body'] = $body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ abstract class RestSerializer
|
||||||
|
|
||||||
$body = $args[$name];
|
$body = $args[$name];
|
||||||
if (!$m['streaming'] && is_string($body)) {
|
if (!$m['streaming'] && is_string($body)) {
|
||||||
$opts['headers']['Content-Length'] = strlen($body);
|
$opts['headers']['Content-Length'] = (string) strlen($body);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Streaming bodies or payloads that are strings are
|
// Streaming bodies or payloads that are strings are
|
||||||
|
|
@ -173,20 +173,36 @@ abstract class RestSerializer
|
||||||
|
|
||||||
private function applyHeader($name, Shape $member, $value, array &$opts)
|
private function applyHeader($name, Shape $member, $value, array &$opts)
|
||||||
{
|
{
|
||||||
// Handle lists by recursively applying header logic to each element
|
if ($value === null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle lists by applying header logic to each element
|
||||||
if ($member instanceof ListShape) {
|
if ($member instanceof ListShape) {
|
||||||
|
if (!is_array($value)) {
|
||||||
|
throw new \InvalidArgumentException('Header values must be scalar or an array of scalars.');
|
||||||
|
}
|
||||||
|
|
||||||
$listMember = $member->getMember();
|
$listMember = $member->getMember();
|
||||||
$headerValues = [];
|
$headerValues = [];
|
||||||
|
|
||||||
foreach ($value as $listValue) {
|
foreach ($value as $listValue) {
|
||||||
|
if ($listValue === null) {
|
||||||
|
throw new \InvalidArgumentException('Header values must be scalar or an array of scalars.');
|
||||||
|
}
|
||||||
|
|
||||||
$tempOpts = ['headers' => []];
|
$tempOpts = ['headers' => []];
|
||||||
$this->applyHeader('temp', $listMember, $listValue, $tempOpts);
|
$this->applyHeader('temp', $listMember, $listValue, $tempOpts);
|
||||||
|
if (!array_key_exists('temp', $tempOpts['headers'])) {
|
||||||
|
throw new \InvalidArgumentException('Header values must be scalar or an array of scalars.');
|
||||||
|
}
|
||||||
|
|
||||||
$convertedValue = $tempOpts['headers']['temp'];
|
$convertedValue = $tempOpts['headers']['temp'];
|
||||||
$headerValues[] = $convertedValue;
|
$headerValues[] = $convertedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = $headerValues;
|
$value = $headerValues;
|
||||||
} elseif (!is_null($value)) {
|
} else {
|
||||||
switch ($member->getType()) {
|
switch ($member->getType()) {
|
||||||
case 'timestamp':
|
case 'timestamp':
|
||||||
$timestampFormat = $member['timestampFormat'] ?? 'rfc822';
|
$timestampFormat = $member['timestampFormat'] ?? 'rfc822';
|
||||||
|
|
@ -208,7 +224,7 @@ abstract class RestSerializer
|
||||||
$value = base64_encode($value);
|
$value = base64_encode($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
$opts['headers'][$member['locationName'] ?: $name] = $value;
|
$opts['headers'][$member['locationName'] ?: $name] = self::prepareHeaderValue($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -218,10 +234,42 @@ abstract class RestSerializer
|
||||||
{
|
{
|
||||||
$prefix = $member['locationName'];
|
$prefix = $member['locationName'];
|
||||||
foreach ($value as $k => $v) {
|
foreach ($value as $k => $v) {
|
||||||
$opts['headers'][$prefix . $k] = $v;
|
if ($v === null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$opts['headers'][$prefix . $k] = self::prepareHeaderValue($v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string|string[]
|
||||||
|
*/
|
||||||
|
private static function prepareHeaderValue($value)
|
||||||
|
{
|
||||||
|
if (is_scalar($value)) {
|
||||||
|
return (string) $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_array($value)) {
|
||||||
|
if ($value === []) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($value as $key => $item) {
|
||||||
|
if (!is_scalar($item)) {
|
||||||
|
throw new \InvalidArgumentException('Header values must be scalar or an array of scalars.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$value[$key] = (string) $item;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException('Header values must be scalar or an array of scalars.');
|
||||||
|
}
|
||||||
|
|
||||||
private function applyQuery($name, Shape $member, $value, array &$opts)
|
private function applyQuery($name, Shape $member, $value, array &$opts)
|
||||||
{
|
{
|
||||||
if ($member instanceof MapShape) {
|
if ($member instanceof MapShape) {
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class RestXmlSerializer extends RestSerializer
|
||||||
{
|
{
|
||||||
$opts['headers']['Content-Type'] = 'application/xml';
|
$opts['headers']['Content-Type'] = 'application/xml';
|
||||||
$body = $this->getXmlBody($member, $value);
|
$body = $this->getXmlBody($member, $value);
|
||||||
$opts['headers']['Content-Length'] = strlen($body);
|
$opts['headers']['Content-Length'] = (string) strlen($body);
|
||||||
$opts['body'] = $body;
|
$opts['body'] = $body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
124
vendor/aws/aws-sdk-php/src/Api/Serializer/RpcV2CborSerializer.php
vendored
Normal file
124
vendor/aws/aws-sdk-php/src/Api/Serializer/RpcV2CborSerializer.php
vendored
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Api\Serializer;
|
||||||
|
|
||||||
|
use Aws\Api\Cbor\CborEncoder;
|
||||||
|
use Aws\Api\Cbor\Exception\CborException;
|
||||||
|
use Aws\Api\Exception\RpcV2CborException;
|
||||||
|
use Aws\Api\Service;
|
||||||
|
use Aws\Api\StructureShape;
|
||||||
|
use DateTimeInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializes requests according to Smithy RPC-V2 CBOR protocol standards.
|
||||||
|
*
|
||||||
|
* https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class RpcV2CborSerializer extends AbstractRpcV2Serializer
|
||||||
|
{
|
||||||
|
/** @var array|string[] */
|
||||||
|
protected static array $defaultHeaders = [
|
||||||
|
self::HEADER_SMITHY_PROTOCOL => 'rpc-v2-cbor',
|
||||||
|
self::HEADER_CONTENT_TYPE => 'application/cbor',
|
||||||
|
self::HEADER_ACCEPT => 'application/cbor',
|
||||||
|
];
|
||||||
|
|
||||||
|
/** @var CborEncoder */
|
||||||
|
private CborEncoder $encoder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Service $api Service API description
|
||||||
|
* @param string $endpoint Endpoint to connect to
|
||||||
|
*/
|
||||||
|
public function __construct(Service $api, string $endpoint)
|
||||||
|
{
|
||||||
|
$this->encoder = new CborEncoder();
|
||||||
|
parent::__construct($api, $endpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param StructureShape $inputShape
|
||||||
|
* @param array $commandArgs
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
* @throws RpcV2CborException
|
||||||
|
*/
|
||||||
|
public function serialize(
|
||||||
|
StructureShape $inputShape,
|
||||||
|
array $commandArgs
|
||||||
|
): string
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$resolvedInput = $this->resolveInputShape($inputShape, $commandArgs);
|
||||||
|
return !empty($resolvedInput)
|
||||||
|
? $this->encoder->encode($resolvedInput)
|
||||||
|
: $this->encoder->encodeEmptyIndefiniteMap();
|
||||||
|
} catch (CborException $e) {
|
||||||
|
throw new RpcV2CborException(
|
||||||
|
'Unable to encode CBOR document ' . $inputShape->getName() . ': ' .
|
||||||
|
$e->getMessage() . PHP_EOL
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps blob values in order to be encoded properly into
|
||||||
|
* byte strings.
|
||||||
|
*
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
* @throws RpcV2CborException
|
||||||
|
*/
|
||||||
|
protected function resolveBlob(mixed $value): array
|
||||||
|
{
|
||||||
|
if (is_resource($value)) {
|
||||||
|
$value = stream_get_contents($value);
|
||||||
|
if ($value === false) {
|
||||||
|
throw new RpcV2CborException(
|
||||||
|
'Failed to read resource stream value during serialization',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to differentiate byte string values during encoding
|
||||||
|
return ['__cbor_bytes' => (string) $value];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wraps timestamp values in order to be encoded properly into
|
||||||
|
* value tag 1.
|
||||||
|
*
|
||||||
|
* @param mixed $value
|
||||||
|
*
|
||||||
|
* @return string[]
|
||||||
|
* @throws RpcV2CborException
|
||||||
|
*/
|
||||||
|
protected function resolveTimestamp(
|
||||||
|
int|float|string|DateTimeInterface $value
|
||||||
|
): array
|
||||||
|
{
|
||||||
|
if (is_numeric($value)) {
|
||||||
|
return ['__cbor_timestamp' => $value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value instanceof DateTimeInterface) {
|
||||||
|
// Preserve milliseconds
|
||||||
|
$micro = (int) $value->format('u');
|
||||||
|
$value = $value->getTimestamp() + $micro / 1e6;
|
||||||
|
} else {
|
||||||
|
$timestamp = strtotime($value);
|
||||||
|
if ($timestamp === false) {
|
||||||
|
throw new RpcV2CborException(
|
||||||
|
'Request serialization failed: Invalid date/time: ' . $value,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$value = $timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper to differentiate timestamp values during encoding
|
||||||
|
return ['__cbor_timestamp' => $value];
|
||||||
|
}
|
||||||
|
}
|
||||||
9
vendor/aws/aws-sdk-php/src/Api/Service.php
vendored
9
vendor/aws/aws-sdk-php/src/Api/Service.php
vendored
|
|
@ -91,7 +91,8 @@ class Service extends AbstractModel
|
||||||
'json' => Serializer\JsonRpcSerializer::class,
|
'json' => Serializer\JsonRpcSerializer::class,
|
||||||
'query' => Serializer\QuerySerializer::class,
|
'query' => Serializer\QuerySerializer::class,
|
||||||
'rest-json' => Serializer\RestJsonSerializer::class,
|
'rest-json' => Serializer\RestJsonSerializer::class,
|
||||||
'rest-xml' => Serializer\RestXmlSerializer::class
|
'rest-xml' => Serializer\RestXmlSerializer::class,
|
||||||
|
'smithy-rpc-v2-cbor' => Serializer\RpcV2CborSerializer::class
|
||||||
];
|
];
|
||||||
|
|
||||||
$proto = $api->getProtocol();
|
$proto = $api->getProtocol();
|
||||||
|
|
@ -126,7 +127,8 @@ class Service extends AbstractModel
|
||||||
'query' => ErrorParser\XmlErrorParser::class,
|
'query' => ErrorParser\XmlErrorParser::class,
|
||||||
'rest-json' => ErrorParser\RestJsonErrorParser::class,
|
'rest-json' => ErrorParser\RestJsonErrorParser::class,
|
||||||
'rest-xml' => ErrorParser\XmlErrorParser::class,
|
'rest-xml' => ErrorParser\XmlErrorParser::class,
|
||||||
'ec2' => ErrorParser\XmlErrorParser::class
|
'ec2' => ErrorParser\XmlErrorParser::class,
|
||||||
|
'smithy-rpc-v2-cbor' => ErrorParser\RpcV2CborErrorParser::class
|
||||||
];
|
];
|
||||||
|
|
||||||
if (isset($mapping[$protocol])) {
|
if (isset($mapping[$protocol])) {
|
||||||
|
|
@ -149,7 +151,8 @@ class Service extends AbstractModel
|
||||||
'json' => Parser\JsonRpcParser::class,
|
'json' => Parser\JsonRpcParser::class,
|
||||||
'query' => Parser\QueryParser::class,
|
'query' => Parser\QueryParser::class,
|
||||||
'rest-json' => Parser\RestJsonParser::class,
|
'rest-json' => Parser\RestJsonParser::class,
|
||||||
'rest-xml' => Parser\RestXmlParser::class
|
'rest-xml' => Parser\RestXmlParser::class,
|
||||||
|
'smithy-rpc-v2-cbor' => Parser\RpcV2CborParser::class
|
||||||
];
|
];
|
||||||
|
|
||||||
$proto = $api->getProtocol();
|
$proto = $api->getProtocol();
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ namespace Aws\Api;
|
||||||
enum SupportedProtocols: string
|
enum SupportedProtocols: string
|
||||||
{
|
{
|
||||||
case JSON = 'json';
|
case JSON = 'json';
|
||||||
|
case CBOR = 'smithy-rpc-v2-cbor';
|
||||||
case REST_JSON = 'rest-json';
|
case REST_JSON = 'rest-json';
|
||||||
case REST_XML = 'rest-xml';
|
case REST_XML = 'rest-xml';
|
||||||
case QUERY = 'query';
|
case QUERY = 'query';
|
||||||
|
|
|
||||||
|
|
@ -28,16 +28,16 @@ class TimestampShape extends Shape
|
||||||
$value = $value->getTimestamp();
|
$value = $value->getTimestamp();
|
||||||
} elseif (is_string($value)) {
|
} elseif (is_string($value)) {
|
||||||
$value = strtotime($value);
|
$value = strtotime($value);
|
||||||
} elseif (!is_int($value)) {
|
} elseif (!is_int($value) && !is_float($value)) {
|
||||||
throw new \InvalidArgumentException('Unable to handle the provided'
|
throw new \InvalidArgumentException('Unable to handle the provided'
|
||||||
. ' timestamp type: ' . gettype($value));
|
. ' timestamp type: ' . gettype($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($format) {
|
switch ($format) {
|
||||||
case 'iso8601':
|
case 'iso8601':
|
||||||
return gmdate('Y-m-d\TH:i:s\Z', $value);
|
return gmdate('Y-m-d\TH:i:s\Z', (int) $value);
|
||||||
case 'rfc822':
|
case 'rfc822':
|
||||||
return gmdate('D, d M Y H:i:s \G\M\T', $value);
|
return gmdate('D, d M Y H:i:s \G\M\T', (int) $value);
|
||||||
case 'unixTimestamp':
|
case 'unixTimestamp':
|
||||||
return $value;
|
return $value;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise disassociateFleetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise disassociateFleetAsync(array $args = [])
|
||||||
* @method \Aws\Result disassociateSoftwareFromImageBuilder(array $args = [])
|
* @method \Aws\Result disassociateSoftwareFromImageBuilder(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise disassociateSoftwareFromImageBuilderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise disassociateSoftwareFromImageBuilderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result drainSessionInstance(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise drainSessionInstanceAsync(array $args = [])
|
||||||
* @method \Aws\Result enableUser(array $args = [])
|
* @method \Aws\Result enableUser(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise enableUserAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise enableUserAsync(array $args = [])
|
||||||
* @method \Aws\Result expireSession(array $args = [])
|
* @method \Aws\Result expireSession(array $args = [])
|
||||||
|
|
|
||||||
54
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
54
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
|
|
@ -283,6 +283,7 @@ class AwsClient implements AwsClientInterface
|
||||||
$args['with_resolved']($config);
|
$args['with_resolved']($config);
|
||||||
}
|
}
|
||||||
$this->addUserAgentMiddleware($config);
|
$this->addUserAgentMiddleware($config);
|
||||||
|
$this->addEventStreamHttpFlagMiddleware();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getHandlerList()
|
public function getHandlerList()
|
||||||
|
|
@ -543,7 +544,7 @@ class AwsClient implements AwsClientInterface
|
||||||
{
|
{
|
||||||
$list = $this->getHandlerList();
|
$list = $this->getHandlerList();
|
||||||
$list->appendBuild(
|
$list->appendBuild(
|
||||||
Middleware::mapRequest(function (RequestInterface $r) {
|
Middleware::mapRequest(static function (RequestInterface $r) {
|
||||||
return $r->withHeader(
|
return $r->withHeader(
|
||||||
'x-amzn-query-mode',
|
'x-amzn-query-mode',
|
||||||
"true"
|
"true"
|
||||||
|
|
@ -649,6 +650,34 @@ class AwsClient implements AwsClientInterface
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables streaming the response by using the stream flag.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private function addEventStreamHttpFlagMiddleware(): void
|
||||||
|
{
|
||||||
|
$api = $this->getApi();
|
||||||
|
$this->getHandlerList()
|
||||||
|
-> appendInit(
|
||||||
|
static function (callable $handler) use ($api) {
|
||||||
|
return static function (CommandInterface $command, $request = null) use ($handler, $api) {
|
||||||
|
$operation = $api->getOperation($command->getName());
|
||||||
|
$output = $operation->getOutput();
|
||||||
|
foreach ($output->getMembers() as $memberProps) {
|
||||||
|
if (!empty($memberProps['eventstream'])) {
|
||||||
|
$command['@http']['stream'] = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $handler($command, $request);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
'event-streaming-flag-middleware'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves client context param definition from service model,
|
* Retrieves client context param definition from service model,
|
||||||
* creates mapping of client context param names with client-provided
|
* creates mapping of client context param names with client-provided
|
||||||
|
|
@ -737,29 +766,6 @@ class AwsClient implements AwsClientInterface
|
||||||
return $this->endpointProvider instanceof EndpointProviderV2;
|
return $this->endpointProvider instanceof EndpointProviderV2;
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
|
||||||
@trigger_error(
|
|
||||||
"This installation of the SDK is using PHP version"
|
|
||||||
. " {$phpVersionString}, which will be deprecated on August"
|
|
||||||
. " 15th, 2023. Please upgrade your PHP version to a minimum of"
|
|
||||||
. " 7.2.5 before then to continue receiving updates to the AWS"
|
|
||||||
. " SDK for PHP. To disable this warning, set"
|
|
||||||
. " suppress_php_deprecation_warning to true on the client constructor"
|
|
||||||
. " or set the environment variable AWS_SUPPRESS_PHP_DEPRECATION_WARNING"
|
|
||||||
. " to true.",
|
|
||||||
E_USER_DEPRECATED
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a service model and doc model with any necessary changes
|
* Returns a service model and doc model with any necessary changes
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ trait AwsClientTrait
|
||||||
$name = $this->aliases[ucfirst($name)];
|
$name = $this->aliases[ucfirst($name)];
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = isset($args[0]) ? $args[0] : [];
|
$params = $args['args'] ?? $args[0] ?? [];
|
||||||
|
|
||||||
if (!empty($isAsync)) {
|
if (!empty($isAsync)) {
|
||||||
return $this->executeAsync(
|
return $this->executeAsync(
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,24 @@ use Aws\AwsClient;
|
||||||
* This client is used to interact with the **AWS Billing and Cost Management Dashboards** service.
|
* This client is used to interact with the **AWS Billing and Cost Management Dashboards** service.
|
||||||
* @method \Aws\Result createDashboard(array $args = [])
|
* @method \Aws\Result createDashboard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createDashboardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createDashboardAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createScheduledReport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createScheduledReportAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteDashboard(array $args = [])
|
* @method \Aws\Result deleteDashboard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteDashboardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteDashboardAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteScheduledReport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteScheduledReportAsync(array $args = [])
|
||||||
|
* @method \Aws\Result executeScheduledReport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise executeScheduledReportAsync(array $args = [])
|
||||||
* @method \Aws\Result getDashboard(array $args = [])
|
* @method \Aws\Result getDashboard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getDashboardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getDashboardAsync(array $args = [])
|
||||||
* @method \Aws\Result getResourcePolicy(array $args = [])
|
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getScheduledReport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getScheduledReportAsync(array $args = [])
|
||||||
* @method \Aws\Result listDashboards(array $args = [])
|
* @method \Aws\Result listDashboards(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listDashboardsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listDashboardsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listScheduledReports(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listScheduledReportsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
|
|
@ -23,5 +33,7 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateDashboard(array $args = [])
|
* @method \Aws\Result updateDashboard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateDashboardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateDashboardAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateScheduledReport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateScheduledReportAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
class BCMDashboardsClient extends AwsClient {}
|
class BCMDashboardsClient extends AwsClient {}
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getBackupVaultNotificationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getBackupVaultNotificationsAsync(array $args = [])
|
||||||
* @method \Aws\Result getLegalHold(array $args = [])
|
* @method \Aws\Result getLegalHold(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getLegalHoldAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getLegalHoldAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPITRMalwareScanResults(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPITRMalwareScanResultsAsync(array $args = [])
|
||||||
* @method \Aws\Result getRecoveryPointIndexDetails(array $args = [])
|
* @method \Aws\Result getRecoveryPointIndexDetails(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getRecoveryPointIndexDetailsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getRecoveryPointIndexDetailsAsync(array $args = [])
|
||||||
* @method \Aws\Result getRecoveryPointRestoreMetadata(array $args = [])
|
* @method \Aws\Result getRecoveryPointRestoreMetadata(array $args = [])
|
||||||
|
|
|
||||||
12
vendor/aws/aws-sdk-php/src/Batch/BatchClient.php
vendored
12
vendor/aws/aws-sdk-php/src/Batch/BatchClient.php
vendored
|
|
@ -13,6 +13,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createConsumableResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createConsumableResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result createJobQueue(array $args = [])
|
* @method \Aws\Result createJobQueue(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createJobQueueAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createQuotaShare(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createQuotaShareAsync(array $args = [])
|
||||||
* @method \Aws\Result createSchedulingPolicy(array $args = [])
|
* @method \Aws\Result createSchedulingPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createSchedulingPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createSchedulingPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result createServiceEnvironment(array $args = [])
|
* @method \Aws\Result createServiceEnvironment(array $args = [])
|
||||||
|
|
@ -23,6 +25,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteConsumableResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteConsumableResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteJobQueue(array $args = [])
|
* @method \Aws\Result deleteJobQueue(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteJobQueueAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteQuotaShare(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteQuotaShareAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteSchedulingPolicy(array $args = [])
|
* @method \Aws\Result deleteSchedulingPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteSchedulingPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteSchedulingPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteServiceEnvironment(array $args = [])
|
* @method \Aws\Result deleteServiceEnvironment(array $args = [])
|
||||||
|
|
@ -39,6 +43,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeJobQueuesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeJobQueuesAsync(array $args = [])
|
||||||
* @method \Aws\Result describeJobs(array $args = [])
|
* @method \Aws\Result describeJobs(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeJobsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeJobsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeQuotaShare(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeQuotaShareAsync(array $args = [])
|
||||||
* @method \Aws\Result describeSchedulingPolicies(array $args = [])
|
* @method \Aws\Result describeSchedulingPolicies(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeSchedulingPoliciesAsync(array $args = [])
|
||||||
* @method \Aws\Result describeServiceEnvironments(array $args = [])
|
* @method \Aws\Result describeServiceEnvironments(array $args = [])
|
||||||
|
|
@ -53,6 +59,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listJobsAsync(array $args = [])
|
||||||
* @method \Aws\Result listJobsByConsumableResource(array $args = [])
|
* @method \Aws\Result listJobsByConsumableResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listJobsByConsumableResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listJobsByConsumableResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listQuotaShares(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listQuotaSharesAsync(array $args = [])
|
||||||
* @method \Aws\Result listSchedulingPolicies(array $args = [])
|
* @method \Aws\Result listSchedulingPolicies(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listSchedulingPoliciesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listSchedulingPoliciesAsync(array $args = [])
|
||||||
* @method \Aws\Result listServiceJobs(array $args = [])
|
* @method \Aws\Result listServiceJobs(array $args = [])
|
||||||
|
|
@ -79,9 +87,13 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateConsumableResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateConsumableResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateJobQueue(array $args = [])
|
* @method \Aws\Result updateJobQueue(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateJobQueueAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateQuotaShare(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateQuotaShareAsync(array $args = [])
|
||||||
* @method \Aws\Result updateSchedulingPolicy(array $args = [])
|
* @method \Aws\Result updateSchedulingPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateSchedulingPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateSchedulingPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result updateServiceEnvironment(array $args = [])
|
* @method \Aws\Result updateServiceEnvironment(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateServiceEnvironmentAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateServiceEnvironmentAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateServiceJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateServiceJobAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
class BatchClient extends AwsClient {}
|
class BatchClient extends AwsClient {}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,14 @@ use Aws\AwsClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This client is used to interact with the **Amazon Bedrock** service.
|
* This client is used to interact with the **Amazon Bedrock** service.
|
||||||
|
* @method \Aws\Result batchDeleteAdvancedPromptOptimizationJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchDeleteAdvancedPromptOptimizationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result batchDeleteEvaluationJob(array $args = [])
|
* @method \Aws\Result batchDeleteEvaluationJob(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise batchDeleteEvaluationJobAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise batchDeleteEvaluationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result cancelAutomatedReasoningPolicyBuildWorkflow(array $args = [])
|
* @method \Aws\Result cancelAutomatedReasoningPolicyBuildWorkflow(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise cancelAutomatedReasoningPolicyBuildWorkflowAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise cancelAutomatedReasoningPolicyBuildWorkflowAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createAdvancedPromptOptimizationJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createAdvancedPromptOptimizationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result createAutomatedReasoningPolicy(array $args = [])
|
* @method \Aws\Result createAutomatedReasoningPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createAutomatedReasoningPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createAutomatedReasoningPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result createAutomatedReasoningPolicyTestCase(array $args = [])
|
* @method \Aws\Result createAutomatedReasoningPolicyTestCase(array $args = [])
|
||||||
|
|
@ -71,10 +75,14 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deletePromptRouterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deletePromptRouterAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
|
* @method \Aws\Result deleteProvisionedModelThroughput(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteProvisionedModelThroughputAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result deregisterMarketplaceModelEndpoint(array $args = [])
|
* @method \Aws\Result deregisterMarketplaceModelEndpoint(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deregisterMarketplaceModelEndpointAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deregisterMarketplaceModelEndpointAsync(array $args = [])
|
||||||
* @method \Aws\Result exportAutomatedReasoningPolicyVersion(array $args = [])
|
* @method \Aws\Result exportAutomatedReasoningPolicyVersion(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise exportAutomatedReasoningPolicyVersionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise exportAutomatedReasoningPolicyVersionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getAdvancedPromptOptimizationJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getAdvancedPromptOptimizationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result getAutomatedReasoningPolicy(array $args = [])
|
* @method \Aws\Result getAutomatedReasoningPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getAutomatedReasoningPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getAutomatedReasoningPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result getAutomatedReasoningPolicyAnnotations(array $args = [])
|
* @method \Aws\Result getAutomatedReasoningPolicyAnnotations(array $args = [])
|
||||||
|
|
@ -121,8 +129,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getPromptRouterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getPromptRouterAsync(array $args = [])
|
||||||
* @method \Aws\Result getProvisionedModelThroughput(array $args = [])
|
* @method \Aws\Result getProvisionedModelThroughput(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getProvisionedModelThroughputAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getProvisionedModelThroughputAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result getUseCaseForModelAccess(array $args = [])
|
* @method \Aws\Result getUseCaseForModelAccess(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getUseCaseForModelAccessAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getUseCaseForModelAccessAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listAdvancedPromptOptimizationJobs(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listAdvancedPromptOptimizationJobsAsync(array $args = [])
|
||||||
* @method \Aws\Result listAutomatedReasoningPolicies(array $args = [])
|
* @method \Aws\Result listAutomatedReasoningPolicies(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listAutomatedReasoningPoliciesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listAutomatedReasoningPoliciesAsync(array $args = [])
|
||||||
* @method \Aws\Result listAutomatedReasoningPolicyBuildWorkflows(array $args = [])
|
* @method \Aws\Result listAutomatedReasoningPolicyBuildWorkflows(array $args = [])
|
||||||
|
|
@ -169,6 +181,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise putEnforcedGuardrailConfigurationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putEnforcedGuardrailConfigurationAsync(array $args = [])
|
||||||
* @method \Aws\Result putModelInvocationLoggingConfiguration(array $args = [])
|
* @method \Aws\Result putModelInvocationLoggingConfiguration(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putModelInvocationLoggingConfigurationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putModelInvocationLoggingConfigurationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result putResourcePolicy(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result putUseCaseForModelAccess(array $args = [])
|
* @method \Aws\Result putUseCaseForModelAccess(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putUseCaseForModelAccessAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putUseCaseForModelAccessAsync(array $args = [])
|
||||||
* @method \Aws\Result registerMarketplaceModelEndpoint(array $args = [])
|
* @method \Aws\Result registerMarketplaceModelEndpoint(array $args = [])
|
||||||
|
|
@ -177,6 +191,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise startAutomatedReasoningPolicyBuildWorkflowAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startAutomatedReasoningPolicyBuildWorkflowAsync(array $args = [])
|
||||||
* @method \Aws\Result startAutomatedReasoningPolicyTestWorkflow(array $args = [])
|
* @method \Aws\Result startAutomatedReasoningPolicyTestWorkflow(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startAutomatedReasoningPolicyTestWorkflowAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startAutomatedReasoningPolicyTestWorkflowAsync(array $args = [])
|
||||||
|
* @method \Aws\Result stopAdvancedPromptOptimizationJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise stopAdvancedPromptOptimizationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result stopEvaluationJob(array $args = [])
|
* @method \Aws\Result stopEvaluationJob(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopEvaluationJobAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopEvaluationJobAsync(array $args = [])
|
||||||
* @method \Aws\Result stopModelCustomizationJob(array $args = [])
|
* @method \Aws\Result stopModelCustomizationJob(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -13,16 +13,36 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise batchUpdateMemoryRecordsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise batchUpdateMemoryRecordsAsync(array $args = [])
|
||||||
* @method \Aws\Result completeResourceTokenAuth(array $args = [])
|
* @method \Aws\Result completeResourceTokenAuth(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise completeResourceTokenAuthAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise completeResourceTokenAuthAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createABTest(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createABTestAsync(array $args = [])
|
||||||
* @method \Aws\Result createEvent(array $args = [])
|
* @method \Aws\Result createEvent(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createEventAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createEventAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPaymentInstrument(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPaymentInstrumentAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPaymentSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPaymentSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteABTest(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteABTestAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteBatchEvaluation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteBatchEvaluationAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteEvent(array $args = [])
|
* @method \Aws\Result deleteEvent(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteEventAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteEventAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteMemoryRecord(array $args = [])
|
* @method \Aws\Result deleteMemoryRecord(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteMemoryRecordAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteMemoryRecordAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePaymentInstrument(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePaymentInstrumentAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePaymentSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePaymentSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteRecommendation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteRecommendationAsync(array $args = [])
|
||||||
* @method \Aws\Result evaluate(array $args = [])
|
* @method \Aws\Result evaluate(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise evaluateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise evaluateAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getABTest(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getABTestAsync(array $args = [])
|
||||||
* @method \Aws\Result getAgentCard(array $args = [])
|
* @method \Aws\Result getAgentCard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getAgentCardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getAgentCardAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getBatchEvaluation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getBatchEvaluationAsync(array $args = [])
|
||||||
* @method \Aws\Result getBrowserSession(array $args = [])
|
* @method \Aws\Result getBrowserSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getBrowserSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getBrowserSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result getCodeInterpreterSession(array $args = [])
|
* @method \Aws\Result getCodeInterpreterSession(array $args = [])
|
||||||
|
|
@ -31,10 +51,20 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getEventAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getEventAsync(array $args = [])
|
||||||
* @method \Aws\Result getMemoryRecord(array $args = [])
|
* @method \Aws\Result getMemoryRecord(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getMemoryRecordAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMemoryRecordAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentInstrument(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentInstrumentAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentInstrumentBalance(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentInstrumentBalanceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRecommendation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRecommendationAsync(array $args = [])
|
||||||
* @method \Aws\Result getResourceApiKey(array $args = [])
|
* @method \Aws\Result getResourceApiKey(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getResourceApiKeyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getResourceApiKeyAsync(array $args = [])
|
||||||
* @method \Aws\Result getResourceOauth2Token(array $args = [])
|
* @method \Aws\Result getResourceOauth2Token(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getResourceOauth2TokenAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getResourceOauth2TokenAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getResourcePaymentToken(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getResourcePaymentTokenAsync(array $args = [])
|
||||||
* @method \Aws\Result getWorkloadAccessToken(array $args = [])
|
* @method \Aws\Result getWorkloadAccessToken(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getWorkloadAccessTokenAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getWorkloadAccessTokenAsync(array $args = [])
|
||||||
* @method \Aws\Result getWorkloadAccessTokenForJWT(array $args = [])
|
* @method \Aws\Result getWorkloadAccessTokenForJWT(array $args = [])
|
||||||
|
|
@ -43,10 +73,20 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getWorkloadAccessTokenForUserIdAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getWorkloadAccessTokenForUserIdAsync(array $args = [])
|
||||||
* @method \Aws\Result invokeAgentRuntime(array $args = [])
|
* @method \Aws\Result invokeAgentRuntime(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise invokeAgentRuntimeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise invokeAgentRuntimeAsync(array $args = [])
|
||||||
|
* @method \Aws\Result invokeAgentRuntimeCommand(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise invokeAgentRuntimeCommandAsync(array $args = [])
|
||||||
|
* @method \Aws\Result invokeBrowser(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise invokeBrowserAsync(array $args = [])
|
||||||
* @method \Aws\Result invokeCodeInterpreter(array $args = [])
|
* @method \Aws\Result invokeCodeInterpreter(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise invokeCodeInterpreterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise invokeCodeInterpreterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result invokeHarness(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise invokeHarnessAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listABTests(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listABTestsAsync(array $args = [])
|
||||||
* @method \Aws\Result listActors(array $args = [])
|
* @method \Aws\Result listActors(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listActorsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listActorsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listBatchEvaluations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listBatchEvaluationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listBrowserSessions(array $args = [])
|
* @method \Aws\Result listBrowserSessions(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listBrowserSessionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listBrowserSessionsAsync(array $args = [])
|
||||||
* @method \Aws\Result listCodeInterpreterSessions(array $args = [])
|
* @method \Aws\Result listCodeInterpreterSessions(array $args = [])
|
||||||
|
|
@ -57,22 +97,42 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listMemoryExtractionJobsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listMemoryExtractionJobsAsync(array $args = [])
|
||||||
* @method \Aws\Result listMemoryRecords(array $args = [])
|
* @method \Aws\Result listMemoryRecords(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listMemoryRecordsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listMemoryRecordsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPaymentInstruments(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPaymentInstrumentsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPaymentSessions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPaymentSessionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRecommendations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRecommendationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listSessions(array $args = [])
|
* @method \Aws\Result listSessions(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result processPayment(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise processPaymentAsync(array $args = [])
|
||||||
* @method \Aws\Result retrieveMemoryRecords(array $args = [])
|
* @method \Aws\Result retrieveMemoryRecords(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise retrieveMemoryRecordsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise retrieveMemoryRecordsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result saveBrowserSessionProfile(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise saveBrowserSessionProfileAsync(array $args = [])
|
||||||
|
* @method \Aws\Result searchRegistryRecords(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise searchRegistryRecordsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startBatchEvaluation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startBatchEvaluationAsync(array $args = [])
|
||||||
* @method \Aws\Result startBrowserSession(array $args = [])
|
* @method \Aws\Result startBrowserSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startBrowserSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startBrowserSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result startCodeInterpreterSession(array $args = [])
|
* @method \Aws\Result startCodeInterpreterSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startCodeInterpreterSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startCodeInterpreterSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result startMemoryExtractionJob(array $args = [])
|
* @method \Aws\Result startMemoryExtractionJob(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startMemoryExtractionJobAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startMemoryExtractionJobAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startRecommendation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startRecommendationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result stopBatchEvaluation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise stopBatchEvaluationAsync(array $args = [])
|
||||||
* @method \Aws\Result stopBrowserSession(array $args = [])
|
* @method \Aws\Result stopBrowserSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopBrowserSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopBrowserSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result stopCodeInterpreterSession(array $args = [])
|
* @method \Aws\Result stopCodeInterpreterSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopCodeInterpreterSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopCodeInterpreterSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result stopRuntimeSession(array $args = [])
|
* @method \Aws\Result stopRuntimeSession(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopRuntimeSessionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopRuntimeSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateABTest(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateABTestAsync(array $args = [])
|
||||||
* @method \Aws\Result updateBrowserStream(array $args = [])
|
* @method \Aws\Result updateBrowserStream(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateBrowserStreamAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateBrowserStreamAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@ use Aws\AwsClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This client is used to interact with the **Amazon Bedrock Agent Core Control Plane Fronting Layer** service.
|
* This client is used to interact with the **Amazon Bedrock Agent Core Control Plane Fronting Layer** service.
|
||||||
|
* @method \Aws\Result addDatasetExamples(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise addDatasetExamplesAsync(array $args = [])
|
||||||
* @method \Aws\Result createAgentRuntime(array $args = [])
|
* @method \Aws\Result createAgentRuntime(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createAgentRuntimeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createAgentRuntimeAsync(array $args = [])
|
||||||
* @method \Aws\Result createAgentRuntimeEndpoint(array $args = [])
|
* @method \Aws\Result createAgentRuntimeEndpoint(array $args = [])
|
||||||
|
|
@ -13,24 +15,46 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createApiKeyCredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createApiKeyCredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result createBrowser(array $args = [])
|
* @method \Aws\Result createBrowser(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createBrowserAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createBrowserAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createBrowserProfile(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createBrowserProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result createCodeInterpreter(array $args = [])
|
* @method \Aws\Result createCodeInterpreter(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createCodeInterpreterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createCodeInterpreterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createConfigurationBundle(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createConfigurationBundleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDataset(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDatasetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDatasetVersion(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDatasetVersionAsync(array $args = [])
|
||||||
* @method \Aws\Result createEvaluator(array $args = [])
|
* @method \Aws\Result createEvaluator(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createEvaluatorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createEvaluatorAsync(array $args = [])
|
||||||
* @method \Aws\Result createGateway(array $args = [])
|
* @method \Aws\Result createGateway(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createGatewayAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createGatewayAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createGatewayRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createGatewayRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result createGatewayTarget(array $args = [])
|
* @method \Aws\Result createGatewayTarget(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createGatewayTargetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createGatewayTargetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createHarness(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createHarnessAsync(array $args = [])
|
||||||
* @method \Aws\Result createMemory(array $args = [])
|
* @method \Aws\Result createMemory(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createMemoryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createMemoryAsync(array $args = [])
|
||||||
* @method \Aws\Result createOauth2CredentialProvider(array $args = [])
|
* @method \Aws\Result createOauth2CredentialProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createOauth2CredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createOauth2CredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result createOnlineEvaluationConfig(array $args = [])
|
* @method \Aws\Result createOnlineEvaluationConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createOnlineEvaluationConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createOnlineEvaluationConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPaymentConnector(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPaymentConnectorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPaymentCredentialProvider(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPaymentCredentialProviderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPaymentManager(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPaymentManagerAsync(array $args = [])
|
||||||
* @method \Aws\Result createPolicy(array $args = [])
|
* @method \Aws\Result createPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result createPolicyEngine(array $args = [])
|
* @method \Aws\Result createPolicyEngine(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createPolicyEngineAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createPolicyEngineAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createRegistry(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createRegistryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createRegistryRecord(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createRegistryRecordAsync(array $args = [])
|
||||||
* @method \Aws\Result createWorkloadIdentity(array $args = [])
|
* @method \Aws\Result createWorkloadIdentity(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createWorkloadIdentityAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createWorkloadIdentityAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteAgentRuntime(array $args = [])
|
* @method \Aws\Result deleteAgentRuntime(array $args = [])
|
||||||
|
|
@ -41,24 +65,46 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteApiKeyCredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteApiKeyCredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteBrowser(array $args = [])
|
* @method \Aws\Result deleteBrowser(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteBrowserAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteBrowserAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteBrowserProfile(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteBrowserProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteCodeInterpreter(array $args = [])
|
* @method \Aws\Result deleteCodeInterpreter(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteCodeInterpreterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteCodeInterpreterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteConfigurationBundle(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteConfigurationBundleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDataset(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDatasetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDatasetExamples(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDatasetExamplesAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteEvaluator(array $args = [])
|
* @method \Aws\Result deleteEvaluator(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteEvaluatorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteEvaluatorAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteGateway(array $args = [])
|
* @method \Aws\Result deleteGateway(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteGatewayAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteGatewayAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteGatewayRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteGatewayRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteGatewayTarget(array $args = [])
|
* @method \Aws\Result deleteGatewayTarget(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteGatewayTargetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteGatewayTargetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteHarness(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteHarnessAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteMemory(array $args = [])
|
* @method \Aws\Result deleteMemory(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteMemoryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteMemoryAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteOauth2CredentialProvider(array $args = [])
|
* @method \Aws\Result deleteOauth2CredentialProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteOauth2CredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteOauth2CredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteOnlineEvaluationConfig(array $args = [])
|
* @method \Aws\Result deleteOnlineEvaluationConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteOnlineEvaluationConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteOnlineEvaluationConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePaymentConnector(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePaymentConnectorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePaymentCredentialProvider(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePaymentCredentialProviderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePaymentManager(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePaymentManagerAsync(array $args = [])
|
||||||
* @method \Aws\Result deletePolicy(array $args = [])
|
* @method \Aws\Result deletePolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result deletePolicyEngine(array $args = [])
|
* @method \Aws\Result deletePolicyEngine(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deletePolicyEngineAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deletePolicyEngineAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteRegistry(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteRegistryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteRegistryRecord(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteRegistryRecordAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteWorkloadIdentity(array $args = [])
|
* @method \Aws\Result deleteWorkloadIdentity(array $args = [])
|
||||||
|
|
@ -71,26 +117,54 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getApiKeyCredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getApiKeyCredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result getBrowser(array $args = [])
|
* @method \Aws\Result getBrowser(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getBrowserAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getBrowserAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getBrowserProfile(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getBrowserProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result getCodeInterpreter(array $args = [])
|
* @method \Aws\Result getCodeInterpreter(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getCodeInterpreterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getCodeInterpreterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getConfigurationBundle(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getConfigurationBundleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getConfigurationBundleVersion(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getConfigurationBundleVersionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDataset(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDatasetAsync(array $args = [])
|
||||||
* @method \Aws\Result getEvaluator(array $args = [])
|
* @method \Aws\Result getEvaluator(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getEvaluatorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getEvaluatorAsync(array $args = [])
|
||||||
* @method \Aws\Result getGateway(array $args = [])
|
* @method \Aws\Result getGateway(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getGatewayAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getGatewayAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getGatewayRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getGatewayRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result getGatewayTarget(array $args = [])
|
* @method \Aws\Result getGatewayTarget(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getGatewayTargetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getGatewayTargetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getHarness(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getHarnessAsync(array $args = [])
|
||||||
* @method \Aws\Result getMemory(array $args = [])
|
* @method \Aws\Result getMemory(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getMemoryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMemoryAsync(array $args = [])
|
||||||
* @method \Aws\Result getOauth2CredentialProvider(array $args = [])
|
* @method \Aws\Result getOauth2CredentialProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getOauth2CredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getOauth2CredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result getOnlineEvaluationConfig(array $args = [])
|
* @method \Aws\Result getOnlineEvaluationConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getOnlineEvaluationConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getOnlineEvaluationConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentConnector(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentConnectorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentCredentialProvider(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentCredentialProviderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPaymentManager(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPaymentManagerAsync(array $args = [])
|
||||||
* @method \Aws\Result getPolicy(array $args = [])
|
* @method \Aws\Result getPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result getPolicyEngine(array $args = [])
|
* @method \Aws\Result getPolicyEngine(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getPolicyEngineAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getPolicyEngineAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPolicyEngineSummary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPolicyEngineSummaryAsync(array $args = [])
|
||||||
* @method \Aws\Result getPolicyGeneration(array $args = [])
|
* @method \Aws\Result getPolicyGeneration(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getPolicyGenerationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getPolicyGenerationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPolicyGenerationSummary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPolicyGenerationSummaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPolicySummary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPolicySummaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRegistry(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRegistryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRegistryRecord(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRegistryRecordAsync(array $args = [])
|
||||||
* @method \Aws\Result getResourcePolicy(array $args = [])
|
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result getTokenVault(array $args = [])
|
* @method \Aws\Result getTokenVault(array $args = [])
|
||||||
|
|
@ -105,30 +179,62 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listAgentRuntimesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listAgentRuntimesAsync(array $args = [])
|
||||||
* @method \Aws\Result listApiKeyCredentialProviders(array $args = [])
|
* @method \Aws\Result listApiKeyCredentialProviders(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listApiKeyCredentialProvidersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listApiKeyCredentialProvidersAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listBrowserProfiles(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listBrowserProfilesAsync(array $args = [])
|
||||||
* @method \Aws\Result listBrowsers(array $args = [])
|
* @method \Aws\Result listBrowsers(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listBrowsersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listBrowsersAsync(array $args = [])
|
||||||
* @method \Aws\Result listCodeInterpreters(array $args = [])
|
* @method \Aws\Result listCodeInterpreters(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listCodeInterpretersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listCodeInterpretersAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listConfigurationBundleVersions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listConfigurationBundleVersionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listConfigurationBundles(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listConfigurationBundlesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDatasetExamples(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDatasetExamplesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDatasetVersions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDatasetVersionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDatasets(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDatasetsAsync(array $args = [])
|
||||||
* @method \Aws\Result listEvaluators(array $args = [])
|
* @method \Aws\Result listEvaluators(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listEvaluatorsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listEvaluatorsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listGatewayRules(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listGatewayRulesAsync(array $args = [])
|
||||||
* @method \Aws\Result listGatewayTargets(array $args = [])
|
* @method \Aws\Result listGatewayTargets(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listGatewayTargetsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listGatewayTargetsAsync(array $args = [])
|
||||||
* @method \Aws\Result listGateways(array $args = [])
|
* @method \Aws\Result listGateways(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listGatewaysAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listGatewaysAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listHarnesses(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listHarnessesAsync(array $args = [])
|
||||||
* @method \Aws\Result listMemories(array $args = [])
|
* @method \Aws\Result listMemories(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listMemoriesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listMemoriesAsync(array $args = [])
|
||||||
* @method \Aws\Result listOauth2CredentialProviders(array $args = [])
|
* @method \Aws\Result listOauth2CredentialProviders(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listOauth2CredentialProvidersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listOauth2CredentialProvidersAsync(array $args = [])
|
||||||
* @method \Aws\Result listOnlineEvaluationConfigs(array $args = [])
|
* @method \Aws\Result listOnlineEvaluationConfigs(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listOnlineEvaluationConfigsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listOnlineEvaluationConfigsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPaymentConnectors(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPaymentConnectorsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPaymentCredentialProviders(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPaymentCredentialProvidersAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPaymentManagers(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPaymentManagersAsync(array $args = [])
|
||||||
* @method \Aws\Result listPolicies(array $args = [])
|
* @method \Aws\Result listPolicies(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPoliciesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPoliciesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPolicyEngineSummaries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPolicyEngineSummariesAsync(array $args = [])
|
||||||
* @method \Aws\Result listPolicyEngines(array $args = [])
|
* @method \Aws\Result listPolicyEngines(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPolicyEnginesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPolicyEnginesAsync(array $args = [])
|
||||||
* @method \Aws\Result listPolicyGenerationAssets(array $args = [])
|
* @method \Aws\Result listPolicyGenerationAssets(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationAssetsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationAssetsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPolicyGenerationSummaries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationSummariesAsync(array $args = [])
|
||||||
* @method \Aws\Result listPolicyGenerations(array $args = [])
|
* @method \Aws\Result listPolicyGenerations(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPolicySummaries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPolicySummariesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRegistries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRegistriesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRegistryRecords(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRegistryRecordsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result listWorkloadIdentities(array $args = [])
|
* @method \Aws\Result listWorkloadIdentities(array $args = [])
|
||||||
|
|
@ -139,6 +245,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise setTokenVaultCMKAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise setTokenVaultCMKAsync(array $args = [])
|
||||||
* @method \Aws\Result startPolicyGeneration(array $args = [])
|
* @method \Aws\Result startPolicyGeneration(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startPolicyGenerationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startPolicyGenerationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result submitRegistryRecordForApproval(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise submitRegistryRecordForApprovalAsync(array $args = [])
|
||||||
* @method \Aws\Result synchronizeGatewayTargets(array $args = [])
|
* @method \Aws\Result synchronizeGatewayTargets(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise synchronizeGatewayTargetsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise synchronizeGatewayTargetsAsync(array $args = [])
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
|
|
@ -151,22 +259,44 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateAgentRuntimeEndpointAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateAgentRuntimeEndpointAsync(array $args = [])
|
||||||
* @method \Aws\Result updateApiKeyCredentialProvider(array $args = [])
|
* @method \Aws\Result updateApiKeyCredentialProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateApiKeyCredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateApiKeyCredentialProviderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateConfigurationBundle(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateConfigurationBundleAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateDataset(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateDatasetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateDatasetExamples(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateDatasetExamplesAsync(array $args = [])
|
||||||
* @method \Aws\Result updateEvaluator(array $args = [])
|
* @method \Aws\Result updateEvaluator(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateEvaluatorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateEvaluatorAsync(array $args = [])
|
||||||
* @method \Aws\Result updateGateway(array $args = [])
|
* @method \Aws\Result updateGateway(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateGatewayAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateGatewayAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateGatewayRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateGatewayRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result updateGatewayTarget(array $args = [])
|
* @method \Aws\Result updateGatewayTarget(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateGatewayTargetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateGatewayTargetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateHarness(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateHarnessAsync(array $args = [])
|
||||||
* @method \Aws\Result updateMemory(array $args = [])
|
* @method \Aws\Result updateMemory(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateMemoryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateMemoryAsync(array $args = [])
|
||||||
* @method \Aws\Result updateOauth2CredentialProvider(array $args = [])
|
* @method \Aws\Result updateOauth2CredentialProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateOauth2CredentialProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateOauth2CredentialProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result updateOnlineEvaluationConfig(array $args = [])
|
* @method \Aws\Result updateOnlineEvaluationConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateOnlineEvaluationConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateOnlineEvaluationConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updatePaymentConnector(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updatePaymentConnectorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updatePaymentCredentialProvider(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updatePaymentCredentialProviderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updatePaymentManager(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updatePaymentManagerAsync(array $args = [])
|
||||||
* @method \Aws\Result updatePolicy(array $args = [])
|
* @method \Aws\Result updatePolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updatePolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updatePolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result updatePolicyEngine(array $args = [])
|
* @method \Aws\Result updatePolicyEngine(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updatePolicyEngineAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updatePolicyEngineAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateRegistry(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateRegistryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateRegistryRecord(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateRegistryRecordAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateRegistryRecordStatus(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateRegistryRecordStatusAsync(array $args = [])
|
||||||
* @method \Aws\Result updateWorkloadIdentity(array $args = [])
|
* @method \Aws\Result updateWorkloadIdentity(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateWorkloadIdentityAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateWorkloadIdentityAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -11,22 +11,40 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createBlueprintAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createBlueprintAsync(array $args = [])
|
||||||
* @method \Aws\Result createBlueprintVersion(array $args = [])
|
* @method \Aws\Result createBlueprintVersion(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createBlueprintVersionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createBlueprintVersionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDataAutomationLibrary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDataAutomationLibraryAsync(array $args = [])
|
||||||
* @method \Aws\Result createDataAutomationProject(array $args = [])
|
* @method \Aws\Result createDataAutomationProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createDataAutomationProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createDataAutomationProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteBlueprint(array $args = [])
|
* @method \Aws\Result deleteBlueprint(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteBlueprintAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteBlueprintAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDataAutomationLibrary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDataAutomationLibraryAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteDataAutomationProject(array $args = [])
|
* @method \Aws\Result deleteDataAutomationProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteDataAutomationProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteDataAutomationProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result getBlueprint(array $args = [])
|
* @method \Aws\Result getBlueprint(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getBlueprintAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getBlueprintAsync(array $args = [])
|
||||||
* @method \Aws\Result getBlueprintOptimizationStatus(array $args = [])
|
* @method \Aws\Result getBlueprintOptimizationStatus(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getBlueprintOptimizationStatusAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getBlueprintOptimizationStatusAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDataAutomationLibrary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDataAutomationLibraryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDataAutomationLibraryEntity(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDataAutomationLibraryEntityAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDataAutomationLibraryIngestionJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDataAutomationLibraryIngestionJobAsync(array $args = [])
|
||||||
* @method \Aws\Result getDataAutomationProject(array $args = [])
|
* @method \Aws\Result getDataAutomationProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getDataAutomationProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getDataAutomationProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result invokeBlueprintOptimizationAsync(array $args = [])
|
* @method \Aws\Result invokeBlueprintOptimizationAsync(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise invokeBlueprintOptimizationAsyncAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise invokeBlueprintOptimizationAsyncAsync(array $args = [])
|
||||||
|
* @method \Aws\Result invokeDataAutomationLibraryIngestionJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise invokeDataAutomationLibraryIngestionJobAsync(array $args = [])
|
||||||
* @method \Aws\Result listBlueprints(array $args = [])
|
* @method \Aws\Result listBlueprints(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listBlueprintsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listBlueprintsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDataAutomationLibraries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDataAutomationLibrariesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDataAutomationLibraryEntities(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDataAutomationLibraryEntitiesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDataAutomationLibraryIngestionJobs(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDataAutomationLibraryIngestionJobsAsync(array $args = [])
|
||||||
* @method \Aws\Result listDataAutomationProjects(array $args = [])
|
* @method \Aws\Result listDataAutomationProjects(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listDataAutomationProjectsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listDataAutomationProjectsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
|
|
@ -37,6 +55,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateBlueprint(array $args = [])
|
* @method \Aws\Result updateBlueprint(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateBlueprintAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateBlueprintAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateDataAutomationLibrary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateDataAutomationLibraryAsync(array $args = [])
|
||||||
* @method \Aws\Result updateDataAutomationProject(array $args = [])
|
* @method \Aws\Result updateDataAutomationProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateDataAutomationProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateDataAutomationProjectAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
664
vendor/aws/aws-sdk-php/src/Cbor/CborDecoder.php
vendored
Normal file
664
vendor/aws/aws-sdk-php/src/Cbor/CborDecoder.php
vendored
Normal file
|
|
@ -0,0 +1,664 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Cbor;
|
||||||
|
|
||||||
|
use Aws\Cbor\Exception\CborException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes Concise Binary Object Representation encoded strings
|
||||||
|
* into PHP values according to RFC 8949
|
||||||
|
*
|
||||||
|
* https://www.rfc-editor.org/rfc/rfc8949.html
|
||||||
|
*
|
||||||
|
* Supports Major types 0-7 including:
|
||||||
|
* - Type 0: Unsigned integers
|
||||||
|
* - Type 1: Negative integers
|
||||||
|
* - Type 2: Byte strings
|
||||||
|
* - Type 3: Text strings (UTF-8)
|
||||||
|
* - Type 4: Arrays
|
||||||
|
* - Type 5: Maps
|
||||||
|
* - Type 6: Tagged values (timestamps)
|
||||||
|
* - Type 7: Simple values (null, bool, float)
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class CborDecoder
|
||||||
|
{
|
||||||
|
private int $offset;
|
||||||
|
private int $length;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode CBOR binary data to PHP value
|
||||||
|
*
|
||||||
|
* @param string $data The CBOR-encoded binary data to decode
|
||||||
|
*
|
||||||
|
* @return mixed The decoded PHP value (can be any type: int, string, array, bool, null, float)
|
||||||
|
* @throws CborException If data is empty or malformed CBOR
|
||||||
|
*/
|
||||||
|
public function decode(string $data): mixed
|
||||||
|
{
|
||||||
|
if ($data === '') {
|
||||||
|
throw new CborException("No data to decode");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = 0;
|
||||||
|
$this->length = strlen($data);
|
||||||
|
|
||||||
|
return $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode multiple CBOR values from sequential binary data
|
||||||
|
*
|
||||||
|
* @param string $data The CBOR-encoded binary data containing multiple values
|
||||||
|
*
|
||||||
|
* @return array Array of decoded PHP values in the order they appear in the data
|
||||||
|
* @throws CborException If data is malformed CBOR
|
||||||
|
*/
|
||||||
|
public function decodeAll(string $data): array
|
||||||
|
{
|
||||||
|
$this->length = strlen($data);
|
||||||
|
$this->offset = 0;
|
||||||
|
$values = [];
|
||||||
|
|
||||||
|
while ($this->offset < $this->length) {
|
||||||
|
$values[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $values;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes a single CBOR value at the current offset
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return mixed The decoded value
|
||||||
|
* @throws CborException If unexpected end of data or invalid CBOR format
|
||||||
|
*/
|
||||||
|
private function decodeValue(string &$data): mixed
|
||||||
|
{
|
||||||
|
$offset = $this->offset;
|
||||||
|
$length = $this->length;
|
||||||
|
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte = ord($data[$offset++]);
|
||||||
|
$majorType = $byte >> 5;
|
||||||
|
$info = $byte & 0x1F;
|
||||||
|
|
||||||
|
switch ($majorType) {
|
||||||
|
case 0: // Unsigned integer
|
||||||
|
if ($info < 24) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 1;
|
||||||
|
|
||||||
|
return ord($data[$offset]);
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
|
||||||
|
return (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return unpack('N', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
|
||||||
|
return unpack('J', $data, $offset)[1];
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for integer: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: // Negative integer
|
||||||
|
if ($info < 24) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return -1 - $info;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 1;
|
||||||
|
|
||||||
|
return -1 - ord($data[$offset]);
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
|
||||||
|
return -1 - ((ord($data[$offset]) << 8) | ord($data[$offset + 1]));
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return -1 - unpack('N', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
$unsigned = unpack('J', $data, $offset)[1];
|
||||||
|
|
||||||
|
return ($unsigned === 9223372036854775807) ? PHP_INT_MIN : -1 - $unsigned;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for integer: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: // Byte string
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteString($data, 0x40);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for byte string: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
|
||||||
|
return substr($data, $offset, $len);
|
||||||
|
|
||||||
|
case 3: // Text string
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteString($data, 0x60);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for text string: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
|
||||||
|
return substr($data, $offset, $len);
|
||||||
|
|
||||||
|
case 4: // Array
|
||||||
|
if ($info < 24) {
|
||||||
|
$count = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteArray($data);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for array: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
$arr = [];
|
||||||
|
|
||||||
|
for ($i = 0; $i < $count; $i++) {
|
||||||
|
$arr[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $arr;
|
||||||
|
|
||||||
|
case 5: // Map
|
||||||
|
if ($info < 24) {
|
||||||
|
$count = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeIndefiniteMap($data);
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid additional info for map: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
$map = [];
|
||||||
|
|
||||||
|
for ($i = 0; $i < $count; $i++) {
|
||||||
|
$key = $this->decodeValue($data);
|
||||||
|
$map[$key] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $map;
|
||||||
|
|
||||||
|
case 6: // Tag
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
$offset++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return $this->decodeValue($data);
|
||||||
|
|
||||||
|
case 7: // Simple/float
|
||||||
|
switch ($info) {
|
||||||
|
case 20:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
|
||||||
|
case 21:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case 22:
|
||||||
|
case 23:
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
|
case 25: // Half-precision float
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 2;
|
||||||
|
$half = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$sign = ($half >> 15) & 0x01;
|
||||||
|
$exp = ($half >> 10) & 0x1F;
|
||||||
|
$mant = $half & 0x3FF;
|
||||||
|
|
||||||
|
if ($exp === 0) {
|
||||||
|
return $mant === 0
|
||||||
|
? ($sign ? -0.0 : 0.0)
|
||||||
|
: ($sign ? -1 : 1) * pow(2, -14) * ($mant / 1024);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($exp === 31) {
|
||||||
|
return $mant === 0 ? ($sign ? -INF : INF) : NAN;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (float) (($sign ? -1 : 1) * pow(2, $exp - 15) * (1 + $mant / 1024));
|
||||||
|
|
||||||
|
case 26: // Single-precision float
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 4;
|
||||||
|
|
||||||
|
return unpack('G', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 27: // Double-precision float
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->offset = $offset + 8;
|
||||||
|
|
||||||
|
return unpack('E', $data, $offset)[1];
|
||||||
|
|
||||||
|
case 31:
|
||||||
|
throw new CborException("Unexpected break");
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Unknown simple value: $info");
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Unknown major type: $majorType");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length string (byte or text)
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
* @param int $expectedMajor Expected major type (0x40 for byte string, 0x60 for text string)
|
||||||
|
*
|
||||||
|
* @return string The concatenated string from all chunks
|
||||||
|
* @throws CborException If invalid chunk format or unexpected end of data
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteString(string &$data, int $expectedMajor): string
|
||||||
|
{
|
||||||
|
$chunks = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
$offset = $this->offset;
|
||||||
|
$length = $this->length;
|
||||||
|
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$byte = ord($data[$offset++]);
|
||||||
|
|
||||||
|
if ($byte === 0xFF) {
|
||||||
|
$this->offset = $offset;
|
||||||
|
|
||||||
|
return implode('', $chunks);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (($byte & 0xE0) !== $expectedMajor) {
|
||||||
|
throw new CborException("Invalid chunk in indefinite string");
|
||||||
|
}
|
||||||
|
|
||||||
|
$info = $byte & 0x1F;
|
||||||
|
|
||||||
|
if ($info === 31) {
|
||||||
|
throw new CborException("Nested indefinite string");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($info < 24) {
|
||||||
|
$len = $info;
|
||||||
|
} else {
|
||||||
|
switch ($info) {
|
||||||
|
case 24:
|
||||||
|
if ($offset >= $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = ord($data[$offset++]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 25:
|
||||||
|
if ($offset + 2 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = (ord($data[$offset]) << 8) | ord($data[$offset + 1]);
|
||||||
|
$offset += 2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 26:
|
||||||
|
if ($offset + 4 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('N', $data, $offset)[1];
|
||||||
|
$offset += 4;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 27:
|
||||||
|
if ($offset + 8 > $length) {
|
||||||
|
throw new CborException("Not enough data");
|
||||||
|
}
|
||||||
|
|
||||||
|
$len = unpack('J', $data, $offset)[1];
|
||||||
|
$offset += 8;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Invalid chunk length info: $info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($offset + $len > $length) {
|
||||||
|
throw new CborException("Not enough data for chunk");
|
||||||
|
}
|
||||||
|
|
||||||
|
$chunks[] = substr($data, $offset, $len);
|
||||||
|
$this->offset = $offset + $len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length array
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return array The decoded array elements
|
||||||
|
* @throws CborException If unexpected end of data
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteArray(string &$data): array
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if ($this->offset >= $this->length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ord($data[$this->offset]) === 0xFF) {
|
||||||
|
$this->offset++;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result[] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decode indefinite-length map
|
||||||
|
*
|
||||||
|
* @param string $data Reference to the CBOR data being decoded
|
||||||
|
*
|
||||||
|
* @return array The decoded map as associative array
|
||||||
|
* @throws CborException If unexpected end of data or odd number of items
|
||||||
|
*/
|
||||||
|
private function decodeIndefiniteMap(string &$data): array
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if ($this->offset >= $this->length) {
|
||||||
|
throw new CborException("Unexpected end of data");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ord($data[$this->offset]) === 0xFF) {
|
||||||
|
$this->offset++;
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
$key = $this->decodeValue($data);
|
||||||
|
$result[$key] = $this->decodeValue($data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
357
vendor/aws/aws-sdk-php/src/Cbor/CborEncoder.php
vendored
Normal file
357
vendor/aws/aws-sdk-php/src/Cbor/CborEncoder.php
vendored
Normal file
|
|
@ -0,0 +1,357 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Cbor;
|
||||||
|
|
||||||
|
use Aws\Cbor\Exception\CborException;
|
||||||
|
use DateTimeInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encodes PHP values to Concise Binary Object Representation according to RFC 8949
|
||||||
|
* https://www.rfc-editor.org/rfc/rfc8949.html
|
||||||
|
*
|
||||||
|
* Supports Major types 0-7 including:
|
||||||
|
* - Type 0: Unsigned integers
|
||||||
|
* - Type 1: Negative integers
|
||||||
|
* - Type 2: Byte strings (via ['__cbor_bytes' => $data] wrappers)
|
||||||
|
* - Type 3: Text strings (UTF-8)
|
||||||
|
* - Type 4: Arrays
|
||||||
|
* - Type 5: Maps
|
||||||
|
* - Type 6: Tagged values (timestamps)
|
||||||
|
* - Type 7: Simple values (null, bool, float)
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class CborEncoder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Pre-encoded integers 0-23 (single byte) and common larger values
|
||||||
|
* CBOR major type 0 (unsigned integer)
|
||||||
|
*/
|
||||||
|
private const INT_CACHE = [
|
||||||
|
0 => "\x00", 1 => "\x01", 2 => "\x02", 3 => "\x03",
|
||||||
|
4 => "\x04", 5 => "\x05", 6 => "\x06", 7 => "\x07",
|
||||||
|
8 => "\x08", 9 => "\x09", 10 => "\x0A", 11 => "\x0B",
|
||||||
|
12 => "\x0C", 13 => "\x0D", 14 => "\x0E", 15 => "\x0F",
|
||||||
|
16 => "\x10", 17 => "\x11", 18 => "\x12", 19 => "\x13",
|
||||||
|
20 => "\x14", 21 => "\x15", 22 => "\x16", 23 => "\x17",
|
||||||
|
24 => "\x18\x18", 25 => "\x18\x19", 26 => "\x18\x1A",
|
||||||
|
32 => "\x18\x20", 50 => "\x18\x32", 64 => "\x18\x40",
|
||||||
|
100 => "\x18\x64", 128 => "\x18\x80", 200 => "\x18\xC8",
|
||||||
|
255 => "\x18\xFF", 256 => "\x19\x01\x00", 500 => "\x19\x01\xF4",
|
||||||
|
1000 => "\x19\x03\xE8", 1023 => "\x19\x03\xFF",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pre-encoded negative integers -1 to -24 and common larger values
|
||||||
|
* CBOR major type 1 (negative integer)
|
||||||
|
*/
|
||||||
|
private const NEG_CACHE = [
|
||||||
|
-1 => "\x20", -2 => "\x21", -3 => "\x22", -4 => "\x23",
|
||||||
|
-5 => "\x24", -10 => "\x29", -20 => "\x33", -24 => "\x37",
|
||||||
|
-25 => "\x38\x18", -50 => "\x38\x31", -100 => "\x38\x63",
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a PHP value to CBOR binary string
|
||||||
|
*
|
||||||
|
* @param mixed $value The value to encode
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encode(mixed $value): string
|
||||||
|
{
|
||||||
|
return $this->encodeValue($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recursively encode a value to CBOR
|
||||||
|
*
|
||||||
|
* @param mixed $value Value to encode
|
||||||
|
* @return string Encoded CBOR bytes
|
||||||
|
*/
|
||||||
|
private function encodeValue(mixed $value): string
|
||||||
|
{
|
||||||
|
switch (gettype($value)) {
|
||||||
|
case 'string':
|
||||||
|
$len = strlen($value);
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x60 | $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x78" . chr($len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeTextString($value);
|
||||||
|
|
||||||
|
case 'array':
|
||||||
|
// Encode a byte string (major type 2)
|
||||||
|
if (isset($value['__cbor_bytes'])) {
|
||||||
|
$bytes = $value['__cbor_bytes'];
|
||||||
|
$len = strlen($bytes);
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x40 | $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x58" . chr($len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x10000) {
|
||||||
|
return "\x59" . pack('n', $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x5A" . pack('N', $len) . $bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_is_list($value)) {
|
||||||
|
return $this->encodeArray($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeMap($value);
|
||||||
|
|
||||||
|
case 'integer':
|
||||||
|
if (isset(self::INT_CACHE[$value])) {
|
||||||
|
return self::INT_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset(self::NEG_CACHE[$value])) {
|
||||||
|
return self::NEG_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fast path for positive integers
|
||||||
|
// Major type 0: unsigned integer
|
||||||
|
if ($value >= 0) {
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x18" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x19" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x1A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x1B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->encodeInteger($value);
|
||||||
|
|
||||||
|
case 'double':
|
||||||
|
// Encode a float (major type 7, float 64)
|
||||||
|
return "\xFB" . pack('E', $value);
|
||||||
|
|
||||||
|
case 'boolean':
|
||||||
|
// Encode a boolean (major type 7, simple)
|
||||||
|
return $value ? "\xF5" : "\xF4";
|
||||||
|
|
||||||
|
case 'NULL':
|
||||||
|
// Encode null (major type 7, simple)
|
||||||
|
return "\xF6";
|
||||||
|
|
||||||
|
case 'object':
|
||||||
|
// Encode timestamp (major type 6, tag 1)
|
||||||
|
if ($value instanceof DateTimeInterface) {
|
||||||
|
$timestamp = $value->getTimestamp();
|
||||||
|
$micro = (int) $value->format('u');
|
||||||
|
if ($micro === 0) {
|
||||||
|
if ($timestamp >= 0 && $timestamp < 0x100000000) {
|
||||||
|
return "\xC1\x1A" . pack('N', $timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\xC1" . $this->encodeInteger($timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\xC1\xFB" . pack('E', $timestamp + $micro / 1e6);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new CborException("Cannot encode object of type: " . get_class($value));
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new CborException("Cannot encode value of type: " . gettype($value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode an integer (major type 0 or 1)
|
||||||
|
*
|
||||||
|
* @param int $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeInteger(int $value): string
|
||||||
|
{
|
||||||
|
if (isset(self::INT_CACHE[$value])) {
|
||||||
|
return self::INT_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset(self::NEG_CACHE[$value])) {
|
||||||
|
return self::NEG_CACHE[$value];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value >= 0) {
|
||||||
|
// Major type 0: unsigned integer
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x18" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x19" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x1A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x1B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Major type 1: negative integer (-1 - n)
|
||||||
|
$value = -1 - $value;
|
||||||
|
if ($value < 24) {
|
||||||
|
return chr(0x20 | $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100) {
|
||||||
|
return "\x38" . chr($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x10000) {
|
||||||
|
return "\x39" . pack('n', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($value < 0x100000000) {
|
||||||
|
return "\x3A" . pack('N', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x3B" . pack('J', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a text string (major type 3)
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeTextString(string $value): string
|
||||||
|
{
|
||||||
|
$len = strlen($value);
|
||||||
|
|
||||||
|
if ($len < 24) {
|
||||||
|
return chr(0x60 | $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100) {
|
||||||
|
return "\x78" . chr($len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x10000) {
|
||||||
|
return "\x79" . pack('n', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($len < 0x100000000) {
|
||||||
|
return "\x7A" . pack('N', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "\x7B" . pack('J', $len) . $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode an array (major type 4)
|
||||||
|
*
|
||||||
|
* @param array $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeArray(array $value): string
|
||||||
|
{
|
||||||
|
$count = count($value);
|
||||||
|
|
||||||
|
if ($count < 24) {
|
||||||
|
$result = chr(0x80 | $count);
|
||||||
|
} elseif ($count < 0x100) {
|
||||||
|
$result = "\x98" . chr($count);
|
||||||
|
} elseif ($count < 0x10000) {
|
||||||
|
$result = "\x99" . pack('n', $count);
|
||||||
|
} elseif ($count < 0x100000000) {
|
||||||
|
$result = "\x9A" . pack('N', $count);
|
||||||
|
} else {
|
||||||
|
$result = "\x9B" . pack('J', $count);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($value as $item) {
|
||||||
|
$result .= $this->encodeValue($item);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encode a map (major type 5)
|
||||||
|
*
|
||||||
|
* @param array $value
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private function encodeMap(array $value): string
|
||||||
|
{
|
||||||
|
$count = count($value);
|
||||||
|
|
||||||
|
if ($count < 24) {
|
||||||
|
$result = chr(0xA0 | $count);
|
||||||
|
} elseif ($count < 0x100) {
|
||||||
|
$result = "\xB8" . chr($count);
|
||||||
|
} elseif ($count < 0x10000) {
|
||||||
|
$result = "\xB9" . pack('n', $count);
|
||||||
|
} elseif ($count < 0x100000000) {
|
||||||
|
$result = "\xBA" . pack('N', $count);
|
||||||
|
} else {
|
||||||
|
$result = "\xBB" . pack('J', $count);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($value as $k => $v) {
|
||||||
|
if (is_int($k)) {
|
||||||
|
$result .= $this->encodeInteger($k);
|
||||||
|
} else {
|
||||||
|
$len = strlen($k);
|
||||||
|
if ($len < 24) {
|
||||||
|
$result .= chr(0x60 | $len) . $k;
|
||||||
|
} elseif ($len < 0x100) {
|
||||||
|
$result .= "\x78" . chr($len) . $k;
|
||||||
|
} else {
|
||||||
|
$result .= "\x79" . pack('n', $len) . $k;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$result .= $this->encodeValue($v);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an empty map (major type 5 with 0 elements)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encodeEmptyMap(): string
|
||||||
|
{
|
||||||
|
return "\xA0";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an empty indefinite map (major type 5 indefinite length)
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function encodeEmptyIndefiniteMap(): string
|
||||||
|
{
|
||||||
|
return "\xBF\xFF";
|
||||||
|
}
|
||||||
|
}
|
||||||
6
vendor/aws/aws-sdk-php/src/Cbor/Exception/CborException.php
vendored
Normal file
6
vendor/aws/aws-sdk-php/src/Cbor/Exception/CborException.php
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\Cbor\Exception;
|
||||||
|
|
||||||
|
use RuntimeException;
|
||||||
|
|
||||||
|
class CborException extends RuntimeException {}
|
||||||
97
vendor/aws/aws-sdk-php/src/ClientResolver.php
vendored
97
vendor/aws/aws-sdk-php/src/ClientResolver.php
vendored
|
|
@ -27,10 +27,13 @@ use Aws\Endpoint\UseFipsEndpoint\ConfigurationProvider as UseFipsConfigProvider;
|
||||||
use Aws\EndpointDiscovery\ConfigurationInterface;
|
use Aws\EndpointDiscovery\ConfigurationInterface;
|
||||||
use Aws\EndpointDiscovery\ConfigurationProvider;
|
use Aws\EndpointDiscovery\ConfigurationProvider;
|
||||||
use Aws\EndpointV2\EndpointDefinitionProvider;
|
use Aws\EndpointV2\EndpointDefinitionProvider;
|
||||||
|
use Aws\EndpointV2\EndpointProviderV2;
|
||||||
use Aws\Exception\AwsException;
|
use Aws\Exception\AwsException;
|
||||||
use Aws\Exception\InvalidRegionException;
|
use Aws\Exception\InvalidRegionException;
|
||||||
use Aws\Retry\ConfigurationInterface as RetryConfigInterface;
|
use Aws\Retry\ConfigurationInterface as RetryConfigInterface;
|
||||||
use Aws\Retry\ConfigurationProvider as RetryConfigProvider;
|
use Aws\Retry\ConfigurationProvider as RetryConfigProvider;
|
||||||
|
use Aws\Retry\V3\OptIn as NewRetriesOptIn;
|
||||||
|
use Aws\Retry\V3\RetryMiddleware as RetryV3Middleware;
|
||||||
use Aws\Signature\SignatureProvider;
|
use Aws\Signature\SignatureProvider;
|
||||||
use Aws\Token\Token;
|
use Aws\Token\Token;
|
||||||
use Aws\Token\TokenInterface;
|
use Aws\Token\TokenInterface;
|
||||||
|
|
@ -547,28 +550,42 @@ class ClientResolver
|
||||||
public static function _apply_retries($value, array &$args, HandlerList $list)
|
public static function _apply_retries($value, array &$args, HandlerList $list)
|
||||||
{
|
{
|
||||||
// A value of 0 for the config option disables retries
|
// A value of 0 for the config option disables retries
|
||||||
if ($value) {
|
if (!$value) {
|
||||||
$config = RetryConfigProvider::unwrap($value);
|
return;
|
||||||
|
|
||||||
if ($config->getMode() === 'legacy') {
|
|
||||||
// # of retries is 1 less than # of attempts
|
|
||||||
$decider = RetryMiddleware::createDefaultDecider(
|
|
||||||
$config->getMaxAttempts() - 1
|
|
||||||
);
|
|
||||||
$list->appendSign(
|
|
||||||
Middleware::retry($decider, null, $args['stats']['retries']),
|
|
||||||
'retry'
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$list->appendSign(
|
|
||||||
RetryMiddlewareV2::wrap(
|
|
||||||
$config,
|
|
||||||
['collect_stats' => $args['stats']['retries']]
|
|
||||||
),
|
|
||||||
'retry'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$config = RetryConfigProvider::unwrap($value);
|
||||||
|
|
||||||
|
if ($config->getMode() === 'legacy') {
|
||||||
|
// # of retries is 1 less than # of attempts
|
||||||
|
$decider = RetryMiddleware::createDefaultDecider(
|
||||||
|
$config->getMaxAttempts() - 1
|
||||||
|
);
|
||||||
|
$list->appendSign(
|
||||||
|
Middleware::retry($decider, null, $args['stats']['retries']),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NewRetriesOptIn::isEnabled()) {
|
||||||
|
$list->appendSign(
|
||||||
|
RetryV3Middleware::wrap($config, [
|
||||||
|
'collect_stats' => $args['stats']['retries'],
|
||||||
|
'service' => $args['service'],
|
||||||
|
]),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$list->appendSign(
|
||||||
|
RetryMiddlewareV2::wrap(
|
||||||
|
$config,
|
||||||
|
['collect_stats' => $args['stats']['retries']]
|
||||||
|
),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function _apply_defaults($value, array &$args, HandlerList $list)
|
public static function _apply_defaults($value, array &$args, HandlerList $list)
|
||||||
|
|
@ -791,7 +808,7 @@ class ClientResolver
|
||||||
public static function _apply_endpoint_provider($value, array &$args)
|
public static function _apply_endpoint_provider($value, array &$args)
|
||||||
{
|
{
|
||||||
if (!isset($args['endpoint'])) {
|
if (!isset($args['endpoint'])) {
|
||||||
if ($value instanceof \Aws\EndpointV2\EndpointProviderV2) {
|
if ($value instanceof EndpointProviderV2) {
|
||||||
$options = self::getEndpointProviderOptions($args);
|
$options = self::getEndpointProviderOptions($args);
|
||||||
$value = PartitionEndpointProvider::defaultProvider($options)
|
$value = PartitionEndpointProvider::defaultProvider($options)
|
||||||
->getPartition($args['region'], $args['service']);
|
->getPartition($args['region'], $args['service']);
|
||||||
|
|
@ -1112,14 +1129,13 @@ class ClientResolver
|
||||||
if (self::isValidService($serviceName)
|
if (self::isValidService($serviceName)
|
||||||
&& self::isValidApiVersion($serviceName, $apiVersion)
|
&& self::isValidApiVersion($serviceName, $apiVersion)
|
||||||
) {
|
) {
|
||||||
$ruleset = EndpointDefinitionProvider::getEndpointRuleset(
|
$partitions = EndpointDefinitionProvider::getPartitions();
|
||||||
|
$parsed = EndpointDefinitionProvider::getParsedRuleset(
|
||||||
$service->getServiceName(),
|
$service->getServiceName(),
|
||||||
$service->getApiVersion()
|
$service->getApiVersion(),
|
||||||
);
|
$partitions
|
||||||
return new \Aws\EndpointV2\EndpointProviderV2(
|
|
||||||
$ruleset,
|
|
||||||
EndpointDefinitionProvider::getPartitions()
|
|
||||||
);
|
);
|
||||||
|
return new EndpointProviderV2($parsed, $partitions);
|
||||||
}
|
}
|
||||||
$options = self::getEndpointProviderOptions($args);
|
$options = self::getEndpointProviderOptions($args);
|
||||||
return PartitionEndpointProvider::defaultProvider($options)
|
return PartitionEndpointProvider::defaultProvider($options)
|
||||||
|
|
@ -1167,7 +1183,7 @@ class ClientResolver
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign user's preferred auth scheme list
|
// Assign user's preferred auth scheme list
|
||||||
$args['auth_scheme_preference'] = $value;
|
$args['config']['auth_scheme_preference'] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function _default_signature_version(array &$args)
|
public static function _default_signature_version(array &$args)
|
||||||
|
|
@ -1247,12 +1263,6 @@ class ClientResolver
|
||||||
$args['suppress_php_deprecation_warning'] =
|
$args['suppress_php_deprecation_warning'] =
|
||||||
\Aws\boolean_value($_ENV["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"]);
|
\Aws\boolean_value($_ENV["AWS_SUPPRESS_PHP_DEPRECATION_WARNING"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($args['suppress_php_deprecation_warning'] === false
|
|
||||||
&& PHP_VERSION_ID < 80100
|
|
||||||
) {
|
|
||||||
self::emitDeprecationWarning();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function _default_endpoint(array &$args)
|
public static function _default_endpoint(array &$args)
|
||||||
|
|
@ -1440,21 +1450,4 @@ EOT;
|
||||||
__DIR__ . "/data/{$service}/$apiVersion"
|
__DIR__ . "/data/{$service}/$apiVersion"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function emitDeprecationWarning()
|
|
||||||
{
|
|
||||||
$phpVersionString = phpversion();
|
|
||||||
trigger_error(
|
|
||||||
"This installation of the SDK is using PHP version"
|
|
||||||
. " {$phpVersionString}, which will be deprecated on January"
|
|
||||||
. " 13th, 2025.\nPlease upgrade your PHP version to a minimum of"
|
|
||||||
. " 8.1.x to continue receiving updates for the AWS"
|
|
||||||
. " SDK for PHP.\nTo disable this warning, set"
|
|
||||||
. " suppress_php_deprecation_warning to true on the client constructor"
|
|
||||||
. " or set the environment variable AWS_SUPPRESS_PHP_DEPRECATION_WARNING"
|
|
||||||
. " to true.\nMore information can be found at: "
|
|
||||||
. "https://aws.amazon.com/blogs/developer/announcing-the-end-of-support-for-php-runtimes-8-0-x-and-below-in-the-aws-sdk-for-php/\n",
|
|
||||||
E_USER_DEPRECATED
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
vendor/aws/aws-sdk-php/src/CloudFront/Signer.php
vendored
33
vendor/aws/aws-sdk-php/src/CloudFront/Signer.php
vendored
|
|
@ -81,8 +81,10 @@ class Signer
|
||||||
$signatureHash = [];
|
$signatureHash = [];
|
||||||
if ($policy) {
|
if ($policy) {
|
||||||
$policy = preg_replace('/\s/s', '', $policy);
|
$policy = preg_replace('/\s/s', '', $policy);
|
||||||
|
self::validatePolicy($policy);
|
||||||
$signatureHash['Policy'] = $this->encode($policy);
|
$signatureHash['Policy'] = $this->encode($policy);
|
||||||
} elseif ($resource && $expires) {
|
} elseif ($resource && $expires) {
|
||||||
|
self::validateResourceUrl($resource);
|
||||||
$expires = (int) $expires; // Handle epoch passed as string
|
$expires = (int) $expires; // Handle epoch passed as string
|
||||||
$policy = $this->createCannedPolicy($resource, $expires);
|
$policy = $this->createCannedPolicy($resource, $expires);
|
||||||
$signatureHash['Expires'] = $expires;
|
$signatureHash['Expires'] = $expires;
|
||||||
|
|
@ -136,4 +138,35 @@ class Signer
|
||||||
{
|
{
|
||||||
return strtr(base64_encode($policy), '+=/', '-_~');
|
return strtr(base64_encode($policy), '+=/', '-_~');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates a customer provided json document.
|
||||||
|
*
|
||||||
|
* @param string $jsonPolicy
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private static function validatePolicy(string $jsonPolicy): void
|
||||||
|
{
|
||||||
|
$policy = json_decode($jsonPolicy, true);
|
||||||
|
foreach ($policy['Statement'] ?? [] as $statement) {
|
||||||
|
if (isset($statement['Resource'])) {
|
||||||
|
self::validateResourceUrl($statement['Resource']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $url
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
private static function validateResourceUrl(string $url): void
|
||||||
|
{
|
||||||
|
if (preg_match('/["\\\\\x00-\x1F]/', $url)) {
|
||||||
|
throw new \InvalidArgumentException(
|
||||||
|
'URL contains invalid characters: ", \\, or control characters'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class UrlSigner
|
||||||
$parts = parse_url($url);
|
$parts = parse_url($url);
|
||||||
$pathParts = pathinfo($parts['path']);
|
$pathParts = pathinfo($parts['path']);
|
||||||
$resource = ltrim(
|
$resource = ltrim(
|
||||||
$pathParts['dirname'] . '/' . $pathParts['basename'],
|
str_replace('\\', '/', $pathParts['dirname']) . '/' . $pathParts['basename'],
|
||||||
'/'
|
'/'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class CloudSearchDomainClient extends AwsClient
|
||||||
$query = $r->getUri()->getQuery();
|
$query = $r->getUri()->getQuery();
|
||||||
$req = $r->withMethod('POST')
|
$req = $r->withMethod('POST')
|
||||||
->withBody(Psr7\Utils::streamFor($query))
|
->withBody(Psr7\Utils::streamFor($query))
|
||||||
->withHeader('Content-Length', strlen($query))
|
->withHeader('Content-Length', (string) strlen($query))
|
||||||
->withHeader('Content-Type', 'application/x-www-form-urlencoded')
|
->withHeader('Content-Type', 'application/x-www-form-urlencoded')
|
||||||
->withUri($r->getUri()->withQuery(''));
|
->withUri($r->getUri()->withQuery(''));
|
||||||
return $req;
|
return $req;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ use Aws\AwsClient;
|
||||||
/**
|
/**
|
||||||
* This client is used to interact with the **Amazon CloudWatch** service.
|
* This client is used to interact with the **Amazon CloudWatch** service.
|
||||||
*
|
*
|
||||||
|
* @method \Aws\Result deleteAlarmMuteRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteAlarmMuteRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteAlarms(array $args = [])
|
* @method \Aws\Result deleteAlarms(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteAlarmsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteAlarmsAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteAnomalyDetector(array $args = [])
|
* @method \Aws\Result deleteAnomalyDetector(array $args = [])
|
||||||
|
|
@ -36,6 +38,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise enableAlarmActionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise enableAlarmActionsAsync(array $args = [])
|
||||||
* @method \Aws\Result enableInsightRules(array $args = [])
|
* @method \Aws\Result enableInsightRules(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise enableInsightRulesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise enableInsightRulesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getAlarmMuteRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getAlarmMuteRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result getDashboard(array $args = [])
|
* @method \Aws\Result getDashboard(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getDashboardAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getDashboardAsync(array $args = [])
|
||||||
* @method \Aws\Result getInsightRuleReport(array $args = [])
|
* @method \Aws\Result getInsightRuleReport(array $args = [])
|
||||||
|
|
@ -48,6 +52,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getMetricStreamAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMetricStreamAsync(array $args = [])
|
||||||
* @method \Aws\Result getMetricWidgetImage(array $args = [])
|
* @method \Aws\Result getMetricWidgetImage(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getMetricWidgetImageAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMetricWidgetImageAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getOTelEnrichment(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getOTelEnrichmentAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listAlarmMuteRules(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listAlarmMuteRulesAsync(array $args = [])
|
||||||
* @method \Aws\Result listDashboards(array $args = [])
|
* @method \Aws\Result listDashboards(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listDashboardsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listDashboardsAsync(array $args = [])
|
||||||
* @method \Aws\Result listManagedInsightRules(array $args = [])
|
* @method \Aws\Result listManagedInsightRules(array $args = [])
|
||||||
|
|
@ -58,6 +66,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listMetricsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listMetricsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result putAlarmMuteRule(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise putAlarmMuteRuleAsync(array $args = [])
|
||||||
* @method \Aws\Result putAnomalyDetector(array $args = [])
|
* @method \Aws\Result putAnomalyDetector(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putAnomalyDetectorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putAnomalyDetectorAsync(array $args = [])
|
||||||
* @method \Aws\Result putCompositeAlarm(array $args = [])
|
* @method \Aws\Result putCompositeAlarm(array $args = [])
|
||||||
|
|
@ -78,8 +88,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise setAlarmStateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise setAlarmStateAsync(array $args = [])
|
||||||
* @method \Aws\Result startMetricStreams(array $args = [])
|
* @method \Aws\Result startMetricStreams(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startMetricStreamsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startMetricStreamsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startOTelEnrichment(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startOTelEnrichmentAsync(array $args = [])
|
||||||
* @method \Aws\Result stopMetricStreams(array $args = [])
|
* @method \Aws\Result stopMetricStreams(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopMetricStreamsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopMetricStreamsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result stopOTelEnrichment(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise stopOTelEnrichmentAsync(array $args = [])
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result untagResource(array $args = [])
|
* @method \Aws\Result untagResource(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Aws\CloudWatchEvidently;
|
|
||||||
|
|
||||||
use Aws\AwsClient;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This client is used to interact with the **Amazon CloudWatch Evidently** service.
|
|
||||||
* @method \Aws\Result batchEvaluateFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise batchEvaluateFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result createExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise createExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result createFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise createFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result createLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise createLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result createProject(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
|
|
||||||
* @method \Aws\Result createSegment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise createSegmentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result deleteExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result deleteFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result deleteLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result deleteProject(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
|
|
||||||
* @method \Aws\Result deleteSegment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteSegmentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result evaluateFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise evaluateFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getExperimentResults(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getExperimentResultsAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getProject(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getProjectAsync(array $args = [])
|
|
||||||
* @method \Aws\Result getSegment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise getSegmentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listExperiments(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listExperimentsAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listFeatures(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listFeaturesAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listLaunches(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listLaunchesAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listProjects(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listProjectsAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listSegmentReferences(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listSegmentReferencesAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listSegments(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listSegmentsAsync(array $args = [])
|
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
|
||||||
* @method \Aws\Result putProjectEvents(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise putProjectEventsAsync(array $args = [])
|
|
||||||
* @method \Aws\Result startExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise startExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result startLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise startLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result stopExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise stopExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result stopLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise stopLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
|
||||||
* @method \Aws\Result testSegmentPattern(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise testSegmentPatternAsync(array $args = [])
|
|
||||||
* @method \Aws\Result untagResource(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
|
||||||
* @method \Aws\Result updateExperiment(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise updateExperimentAsync(array $args = [])
|
|
||||||
* @method \Aws\Result updateFeature(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise updateFeatureAsync(array $args = [])
|
|
||||||
* @method \Aws\Result updateLaunch(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise updateLaunchAsync(array $args = [])
|
|
||||||
* @method \Aws\Result updateProject(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
|
|
||||||
* @method \Aws\Result updateProjectDataDelivery(array $args = [])
|
|
||||||
* @method \GuzzleHttp\Promise\Promise updateProjectDataDeliveryAsync(array $args = [])
|
|
||||||
*/
|
|
||||||
class CloudWatchEvidentlyClient extends AwsClient {}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<?php
|
|
||||||
namespace Aws\CloudWatchEvidently\Exception;
|
|
||||||
|
|
||||||
use Aws\Exception\AwsException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an error interacting with the **Amazon CloudWatch Evidently** service.
|
|
||||||
*/
|
|
||||||
class CloudWatchEvidentlyException extends AwsException {}
|
|
||||||
|
|
@ -28,6 +28,8 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise createLogGroupAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createLogGroupAsync(array $args = [])
|
||||||
* @method \Aws\Result createLogStream(array $args = [])
|
* @method \Aws\Result createLogStream(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createLogStreamAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createLogStreamAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createLookupTable(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createLookupTableAsync(array $args = [])
|
||||||
* @method \Aws\Result createScheduledQuery(array $args = [])
|
* @method \Aws\Result createScheduledQuery(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createScheduledQueryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createScheduledQueryAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteAccountPolicy(array $args = [])
|
* @method \Aws\Result deleteAccountPolicy(array $args = [])
|
||||||
|
|
@ -54,6 +56,8 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteLogGroupAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteLogGroupAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteLogStream(array $args = [])
|
* @method \Aws\Result deleteLogStream(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteLogStreamAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteLogStreamAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteLookupTable(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteLookupTableAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteMetricFilter(array $args = [])
|
* @method \Aws\Result deleteMetricFilter(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteMetricFilterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteMetricFilterAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteQueryDefinition(array $args = [])
|
* @method \Aws\Result deleteQueryDefinition(array $args = [])
|
||||||
|
|
@ -94,6 +98,8 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeLogGroupsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeLogGroupsAsync(array $args = [])
|
||||||
* @method \Aws\Result describeLogStreams(array $args = [])
|
* @method \Aws\Result describeLogStreams(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeLogStreamsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeLogStreamsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeLookupTables(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeLookupTablesAsync(array $args = [])
|
||||||
* @method \Aws\Result describeMetricFilters(array $args = [])
|
* @method \Aws\Result describeMetricFilters(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeMetricFiltersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeMetricFiltersAsync(array $args = [])
|
||||||
* @method \Aws\Result describeQueries(array $args = [])
|
* @method \Aws\Result describeQueries(array $args = [])
|
||||||
|
|
@ -134,6 +140,8 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise getLogObjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getLogObjectAsync(array $args = [])
|
||||||
* @method \Aws\Result getLogRecord(array $args = [])
|
* @method \Aws\Result getLogRecord(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getLogRecordAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getLogRecordAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getLookupTable(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getLookupTableAsync(array $args = [])
|
||||||
* @method \Aws\Result getQueryResults(array $args = [])
|
* @method \Aws\Result getQueryResults(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getQueryResultsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getQueryResultsAsync(array $args = [])
|
||||||
* @method \Aws\Result getScheduledQuery(array $args = [])
|
* @method \Aws\Result getScheduledQuery(array $args = [])
|
||||||
|
|
@ -164,6 +172,8 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsLogGroupAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsLogGroupAsync(array $args = [])
|
||||||
* @method \Aws\Result putAccountPolicy(array $args = [])
|
* @method \Aws\Result putAccountPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putAccountPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putAccountPolicyAsync(array $args = [])
|
||||||
|
* @method \Aws\Result putBearerTokenAuthentication(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise putBearerTokenAuthenticationAsync(array $args = [])
|
||||||
* @method \Aws\Result putDataProtectionPolicy(array $args = [])
|
* @method \Aws\Result putDataProtectionPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putDataProtectionPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putDataProtectionPolicyAsync(array $args = [])
|
||||||
* @method \Aws\Result putDeliveryDestination(array $args = [])
|
* @method \Aws\Result putDeliveryDestination(array $args = [])
|
||||||
|
|
@ -220,41 +230,12 @@ use Generator;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateDeliveryConfigurationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateDeliveryConfigurationAsync(array $args = [])
|
||||||
* @method \Aws\Result updateLogAnomalyDetector(array $args = [])
|
* @method \Aws\Result updateLogAnomalyDetector(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateLogAnomalyDetectorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateLogAnomalyDetectorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateLookupTable(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateLookupTableAsync(array $args = [])
|
||||||
* @method \Aws\Result updateScheduledQuery(array $args = [])
|
* @method \Aws\Result updateScheduledQuery(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateScheduledQueryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateScheduledQueryAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
class CloudWatchLogsClient extends AwsClient {
|
class CloudWatchLogsClient extends AwsClient {
|
||||||
static $streamingCommands = [
|
|
||||||
'StartLiveTail' => true
|
|
||||||
];
|
|
||||||
|
|
||||||
public function __construct(array $args)
|
|
||||||
{
|
|
||||||
parent::__construct($args);
|
|
||||||
$this->addStreamingFlagMiddleware();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function addStreamingFlagMiddleware()
|
|
||||||
{
|
|
||||||
$this->getHandlerList()
|
|
||||||
-> appendInit(
|
|
||||||
$this->getStreamingFlagMiddleware(),
|
|
||||||
'streaming-flag-middleware'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private function getStreamingFlagMiddleware(): callable
|
|
||||||
{
|
|
||||||
return function (callable $handler) {
|
|
||||||
return function (CommandInterface $command, $request = null) use ($handler) {
|
|
||||||
if (!empty(self::$streamingCommands[$command->getName()])) {
|
|
||||||
$command['@http']['stream'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $handler($command, $request);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method for 'startLiveTail' operation that checks for results.
|
* Helper method for 'startLiveTail' operation that checks for results.
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ use Aws\AwsClient;
|
||||||
*
|
*
|
||||||
* @method \Aws\Result addCustomAttributes(array $args = [])
|
* @method \Aws\Result addCustomAttributes(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise addCustomAttributesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise addCustomAttributesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result addUserPoolClientSecret(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise addUserPoolClientSecretAsync(array $args = [])
|
||||||
* @method \Aws\Result adminAddUserToGroup(array $args = [])
|
* @method \Aws\Result adminAddUserToGroup(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise adminAddUserToGroupAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise adminAddUserToGroupAsync(array $args = [])
|
||||||
* @method \Aws\Result adminConfirmSignUp(array $args = [])
|
* @method \Aws\Result adminConfirmSignUp(array $args = [])
|
||||||
|
|
@ -90,6 +92,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createUserPoolClientAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createUserPoolClientAsync(array $args = [])
|
||||||
* @method \Aws\Result createUserPoolDomain(array $args = [])
|
* @method \Aws\Result createUserPoolDomain(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createUserPoolDomainAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createUserPoolDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createUserPoolReplica(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createUserPoolReplicaAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteGroup(array $args = [])
|
* @method \Aws\Result deleteGroup(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteIdentityProvider(array $args = [])
|
* @method \Aws\Result deleteIdentityProvider(array $args = [])
|
||||||
|
|
@ -108,8 +112,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteUserPoolAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteUserPoolAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteUserPoolClient(array $args = [])
|
* @method \Aws\Result deleteUserPoolClient(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteUserPoolClientAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteUserPoolClientAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteUserPoolClientSecret(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteUserPoolClientSecretAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteUserPoolDomain(array $args = [])
|
* @method \Aws\Result deleteUserPoolDomain(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteUserPoolDomainAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteUserPoolDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteUserPoolReplica(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteUserPoolReplicaAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteWebAuthnCredential(array $args = [])
|
* @method \Aws\Result deleteWebAuthnCredential(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteWebAuthnCredentialAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteWebAuthnCredentialAsync(array $args = [])
|
||||||
* @method \Aws\Result describeIdentityProvider(array $args = [])
|
* @method \Aws\Result describeIdentityProvider(array $args = [])
|
||||||
|
|
@ -178,8 +186,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listTermsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTermsAsync(array $args = [])
|
||||||
* @method \Aws\Result listUserImportJobs(array $args = [])
|
* @method \Aws\Result listUserImportJobs(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listUserImportJobsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUserImportJobsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listUserPoolClientSecrets(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listUserPoolClientSecretsAsync(array $args = [])
|
||||||
* @method \Aws\Result listUserPoolClients(array $args = [])
|
* @method \Aws\Result listUserPoolClients(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listUserPoolClientsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUserPoolClientsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listUserPoolReplicas(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listUserPoolReplicasAsync(array $args = [])
|
||||||
* @method \Aws\Result listUserPools(array $args = [])
|
* @method \Aws\Result listUserPools(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listUserPoolsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUserPoolsAsync(array $args = [])
|
||||||
* @method \Aws\Result listUsers(array $args = [])
|
* @method \Aws\Result listUsers(array $args = [])
|
||||||
|
|
@ -240,6 +252,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserPoolClientAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserPoolClientAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserPoolDomain(array $args = [])
|
* @method \Aws\Result updateUserPoolDomain(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserPoolDomainAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserPoolDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateUserPoolReplica(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateUserPoolReplicaAsync(array $args = [])
|
||||||
* @method \Aws\Result verifySoftwareToken(array $args = [])
|
* @method \Aws\Result verifySoftwareToken(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise verifySoftwareTokenAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise verifySoftwareTokenAsync(array $args = [])
|
||||||
* @method \Aws\Result verifyUserAttribute(array $args = [])
|
* @method \Aws\Result verifyUserAttribute(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise associateLexBotAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise associateLexBotAsync(array $args = [])
|
||||||
* @method \Aws\Result associatePhoneNumberContactFlow(array $args = [])
|
* @method \Aws\Result associatePhoneNumberContactFlow(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise associatePhoneNumberContactFlowAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise associatePhoneNumberContactFlowAsync(array $args = [])
|
||||||
|
* @method \Aws\Result associateQueueEmailAddresses(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise associateQueueEmailAddressesAsync(array $args = [])
|
||||||
* @method \Aws\Result associateQueueQuickConnects(array $args = [])
|
* @method \Aws\Result associateQueueQuickConnects(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise associateQueueQuickConnectsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise associateQueueQuickConnectsAsync(array $args = [])
|
||||||
* @method \Aws\Result associateRoutingProfileQueues(array $args = [])
|
* @method \Aws\Result associateRoutingProfileQueues(array $args = [])
|
||||||
|
|
@ -97,6 +99,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createInstanceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createInstanceAsync(array $args = [])
|
||||||
* @method \Aws\Result createIntegrationAssociation(array $args = [])
|
* @method \Aws\Result createIntegrationAssociation(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createIntegrationAssociationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createIntegrationAssociationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createNotification(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createNotificationAsync(array $args = [])
|
||||||
* @method \Aws\Result createParticipant(array $args = [])
|
* @method \Aws\Result createParticipant(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createParticipantAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createParticipantAsync(array $args = [])
|
||||||
* @method \Aws\Result createPersistentContactAssociation(array $args = [])
|
* @method \Aws\Result createPersistentContactAssociation(array $args = [])
|
||||||
|
|
@ -171,6 +175,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteInstanceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteInstanceAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteIntegrationAssociation(array $args = [])
|
* @method \Aws\Result deleteIntegrationAssociation(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteIntegrationAssociationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteIntegrationAssociationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteNotification(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteNotificationAsync(array $args = [])
|
||||||
* @method \Aws\Result deletePredefinedAttribute(array $args = [])
|
* @method \Aws\Result deletePredefinedAttribute(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deletePredefinedAttributeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deletePredefinedAttributeAsync(array $args = [])
|
||||||
* @method \Aws\Result deletePrompt(array $args = [])
|
* @method \Aws\Result deletePrompt(array $args = [])
|
||||||
|
|
@ -213,6 +219,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteWorkspacePageAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteWorkspacePageAsync(array $args = [])
|
||||||
* @method \Aws\Result describeAgentStatus(array $args = [])
|
* @method \Aws\Result describeAgentStatus(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeAgentStatusAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeAgentStatusAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeAttachedFilesConfiguration(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeAttachedFilesConfigurationAsync(array $args = [])
|
||||||
* @method \Aws\Result describeAuthenticationProfile(array $args = [])
|
* @method \Aws\Result describeAuthenticationProfile(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeAuthenticationProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeAuthenticationProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result describeContact(array $args = [])
|
* @method \Aws\Result describeContact(array $args = [])
|
||||||
|
|
@ -243,6 +251,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeInstanceAttributeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeInstanceAttributeAsync(array $args = [])
|
||||||
* @method \Aws\Result describeInstanceStorageConfig(array $args = [])
|
* @method \Aws\Result describeInstanceStorageConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeInstanceStorageConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeInstanceStorageConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeNotification(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeNotificationAsync(array $args = [])
|
||||||
* @method \Aws\Result describePhoneNumber(array $args = [])
|
* @method \Aws\Result describePhoneNumber(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describePhoneNumberAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describePhoneNumberAsync(array $args = [])
|
||||||
* @method \Aws\Result describePredefinedAttribute(array $args = [])
|
* @method \Aws\Result describePredefinedAttribute(array $args = [])
|
||||||
|
|
@ -295,6 +305,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise disassociateLexBotAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise disassociateLexBotAsync(array $args = [])
|
||||||
* @method \Aws\Result disassociatePhoneNumberContactFlow(array $args = [])
|
* @method \Aws\Result disassociatePhoneNumberContactFlow(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise disassociatePhoneNumberContactFlowAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise disassociatePhoneNumberContactFlowAsync(array $args = [])
|
||||||
|
* @method \Aws\Result disassociateQueueEmailAddresses(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise disassociateQueueEmailAddressesAsync(array $args = [])
|
||||||
* @method \Aws\Result disassociateQueueQuickConnects(array $args = [])
|
* @method \Aws\Result disassociateQueueQuickConnects(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise disassociateQueueQuickConnectsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise disassociateQueueQuickConnectsAsync(array $args = [])
|
||||||
* @method \Aws\Result disassociateRoutingProfileQueues(array $args = [])
|
* @method \Aws\Result disassociateRoutingProfileQueues(array $args = [])
|
||||||
|
|
@ -355,6 +367,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listApprovedOriginsAsync(array $args = [])
|
||||||
* @method \Aws\Result listAssociatedContacts(array $args = [])
|
* @method \Aws\Result listAssociatedContacts(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listAssociatedContactsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listAssociatedContactsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listAttachedFilesConfigurations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listAttachedFilesConfigurationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listAuthenticationProfiles(array $args = [])
|
* @method \Aws\Result listAuthenticationProfiles(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listAuthenticationProfilesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listAuthenticationProfilesAsync(array $args = [])
|
||||||
* @method \Aws\Result listBots(array $args = [])
|
* @method \Aws\Result listBots(array $args = [])
|
||||||
|
|
@ -409,6 +423,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listLambdaFunctionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listLambdaFunctionsAsync(array $args = [])
|
||||||
* @method \Aws\Result listLexBots(array $args = [])
|
* @method \Aws\Result listLexBots(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listLexBotsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listLexBotsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listNotifications(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listNotificationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listPhoneNumbers(array $args = [])
|
* @method \Aws\Result listPhoneNumbers(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPhoneNumbersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPhoneNumbersAsync(array $args = [])
|
||||||
* @method \Aws\Result listPhoneNumbersV2(array $args = [])
|
* @method \Aws\Result listPhoneNumbersV2(array $args = [])
|
||||||
|
|
@ -417,6 +433,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listPredefinedAttributesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPredefinedAttributesAsync(array $args = [])
|
||||||
* @method \Aws\Result listPrompts(array $args = [])
|
* @method \Aws\Result listPrompts(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listPromptsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listPromptsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listQueueEmailAddresses(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listQueueEmailAddressesAsync(array $args = [])
|
||||||
* @method \Aws\Result listQueueQuickConnects(array $args = [])
|
* @method \Aws\Result listQueueQuickConnects(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listQueueQuickConnectsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listQueueQuickConnectsAsync(array $args = [])
|
||||||
* @method \Aws\Result listQueues(array $args = [])
|
* @method \Aws\Result listQueues(array $args = [])
|
||||||
|
|
@ -461,6 +479,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listUseCasesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUseCasesAsync(array $args = [])
|
||||||
* @method \Aws\Result listUserHierarchyGroups(array $args = [])
|
* @method \Aws\Result listUserHierarchyGroups(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listUserHierarchyGroupsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUserHierarchyGroupsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listUserNotifications(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listUserNotificationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listUserProficiencies(array $args = [])
|
* @method \Aws\Result listUserProficiencies(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listUserProficienciesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listUserProficienciesAsync(array $args = [])
|
||||||
* @method \Aws\Result listUsers(array $args = [])
|
* @method \Aws\Result listUsers(array $args = [])
|
||||||
|
|
@ -511,6 +531,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise searchHoursOfOperationOverridesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise searchHoursOfOperationOverridesAsync(array $args = [])
|
||||||
* @method \Aws\Result searchHoursOfOperations(array $args = [])
|
* @method \Aws\Result searchHoursOfOperations(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise searchHoursOfOperationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise searchHoursOfOperationsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result searchNotifications(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise searchNotificationsAsync(array $args = [])
|
||||||
* @method \Aws\Result searchPredefinedAttributes(array $args = [])
|
* @method \Aws\Result searchPredefinedAttributes(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise searchPredefinedAttributesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise searchPredefinedAttributesAsync(array $args = [])
|
||||||
* @method \Aws\Result searchPrompts(array $args = [])
|
* @method \Aws\Result searchPrompts(array $args = [])
|
||||||
|
|
@ -597,6 +619,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateAgentStatus(array $args = [])
|
* @method \Aws\Result updateAgentStatus(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateAgentStatusAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateAgentStatusAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateAttachedFilesConfiguration(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateAttachedFilesConfigurationAsync(array $args = [])
|
||||||
* @method \Aws\Result updateAuthenticationProfile(array $args = [])
|
* @method \Aws\Result updateAuthenticationProfile(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateAuthenticationProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateAuthenticationProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result updateContact(array $args = [])
|
* @method \Aws\Result updateContact(array $args = [])
|
||||||
|
|
@ -639,6 +663,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateInstanceAttributeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateInstanceAttributeAsync(array $args = [])
|
||||||
* @method \Aws\Result updateInstanceStorageConfig(array $args = [])
|
* @method \Aws\Result updateInstanceStorageConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateInstanceStorageConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateInstanceStorageConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateNotificationContent(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateNotificationContentAsync(array $args = [])
|
||||||
* @method \Aws\Result updateParticipantAuthentication(array $args = [])
|
* @method \Aws\Result updateParticipantAuthentication(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateParticipantAuthenticationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateParticipantAuthenticationAsync(array $args = [])
|
||||||
* @method \Aws\Result updateParticipantRoleConfig(array $args = [])
|
* @method \Aws\Result updateParticipantRoleConfig(array $args = [])
|
||||||
|
|
@ -687,6 +713,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateTestCaseAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateTestCaseAsync(array $args = [])
|
||||||
* @method \Aws\Result updateTrafficDistribution(array $args = [])
|
* @method \Aws\Result updateTrafficDistribution(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateTrafficDistributionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateTrafficDistributionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateUserConfig(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateUserConfigAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserHierarchy(array $args = [])
|
* @method \Aws\Result updateUserHierarchy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserHierarchyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserHierarchyAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserHierarchyGroupName(array $args = [])
|
* @method \Aws\Result updateUserHierarchyGroupName(array $args = [])
|
||||||
|
|
@ -695,6 +723,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserHierarchyStructureAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserHierarchyStructureAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserIdentityInfo(array $args = [])
|
* @method \Aws\Result updateUserIdentityInfo(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserIdentityInfoAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserIdentityInfoAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateUserNotificationStatus(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateUserNotificationStatusAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserPhoneConfig(array $args = [])
|
* @method \Aws\Result updateUserPhoneConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateUserPhoneConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateUserPhoneConfigAsync(array $args = [])
|
||||||
* @method \Aws\Result updateUserProficiencies(array $args = [])
|
* @method \Aws\Result updateUserProficiencies(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteCampaignCommunicationLimitsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteCampaignCommunicationLimitsAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteCampaignCommunicationTime(array $args = [])
|
* @method \Aws\Result deleteCampaignCommunicationTime(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteCampaignCommunicationTimeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteCampaignCommunicationTimeAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteCampaignEntryLimits(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteCampaignEntryLimitsAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteConnectInstanceConfig(array $args = [])
|
* @method \Aws\Result deleteConnectInstanceConfig(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteConnectInstanceConfigAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteConnectInstanceConfigAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteConnectInstanceIntegration(array $args = [])
|
* @method \Aws\Result deleteConnectInstanceIntegration(array $args = [])
|
||||||
|
|
@ -67,6 +69,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateCampaignCommunicationLimitsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateCampaignCommunicationLimitsAsync(array $args = [])
|
||||||
* @method \Aws\Result updateCampaignCommunicationTime(array $args = [])
|
* @method \Aws\Result updateCampaignCommunicationTime(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateCampaignCommunicationTimeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateCampaignCommunicationTimeAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateCampaignEntryLimits(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateCampaignEntryLimitsAsync(array $args = [])
|
||||||
* @method \Aws\Result updateCampaignFlowAssociation(array $args = [])
|
* @method \Aws\Result updateCampaignFlowAssociation(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateCampaignFlowAssociationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateCampaignFlowAssociationAsync(array $args = [])
|
||||||
* @method \Aws\Result updateCampaignName(array $args = [])
|
* @method \Aws\Result updateCampaignName(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateFieldAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateFieldAsync(array $args = [])
|
||||||
* @method \Aws\Result updateLayout(array $args = [])
|
* @method \Aws\Result updateLayout(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateLayoutAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateLayoutAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateRelatedItem(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateRelatedItemAsync(array $args = [])
|
||||||
* @method \Aws\Result updateTemplate(array $args = [])
|
* @method \Aws\Result updateTemplate(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateTemplateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateTemplateAsync(array $args = [])
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
39
vendor/aws/aws-sdk-php/src/ConnectHealth/ConnectHealthClient.php
vendored
Normal file
39
vendor/aws/aws-sdk-php/src/ConnectHealth/ConnectHealthClient.php
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\ConnectHealth;
|
||||||
|
|
||||||
|
use Aws\AwsClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This client is used to interact with the **Connect Health** service.
|
||||||
|
* @method \Aws\Result activateSubscription(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise activateSubscriptionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDomain(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createSubscription(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createSubscriptionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deactivateSubscription(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deactivateSubscriptionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDomain(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDomain(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDomainAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getMedicalScribeListeningSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getMedicalScribeListeningSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getPatientInsightsJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getPatientInsightsJobAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getSubscription(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getSubscriptionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDomains(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDomainsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listSubscriptions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listSubscriptionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startPatientInsightsJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startPatientInsightsJobAsync(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 ConnectHealthClient extends AwsClient {}
|
||||||
9
vendor/aws/aws-sdk-php/src/ConnectHealth/Exception/ConnectHealthException.php
vendored
Normal file
9
vendor/aws/aws-sdk-php/src/ConnectHealth/Exception/ConnectHealthException.php
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\ConnectHealth\Exception;
|
||||||
|
|
||||||
|
use Aws\Exception\AwsException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an error interacting with the **Connect Health** service.
|
||||||
|
*/
|
||||||
|
class ConnectHealthException extends AwsException {}
|
||||||
|
|
@ -11,6 +11,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise batchGetCalculatedAttributeForProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise batchGetCalculatedAttributeForProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result batchGetProfile(array $args = [])
|
* @method \Aws\Result batchGetProfile(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise batchGetProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise batchGetProfileAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchPutProfileObject(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchPutProfileObjectAsync(array $args = [])
|
||||||
* @method \Aws\Result createCalculatedAttributeDefinition(array $args = [])
|
* @method \Aws\Result createCalculatedAttributeDefinition(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createCalculatedAttributeDefinitionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createCalculatedAttributeDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result createDomain(array $args = [])
|
* @method \Aws\Result createDomain(array $args = [])
|
||||||
|
|
@ -27,6 +29,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result createRecommender(array $args = [])
|
* @method \Aws\Result createRecommender(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createRecommenderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createRecommenderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createRecommenderFilter(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createRecommenderFilterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createRecommenderSchema(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createRecommenderSchemaAsync(array $args = [])
|
||||||
* @method \Aws\Result createSegmentDefinition(array $args = [])
|
* @method \Aws\Result createSegmentDefinition(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createSegmentDefinitionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createSegmentDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result createSegmentEstimate(array $args = [])
|
* @method \Aws\Result createSegmentEstimate(array $args = [])
|
||||||
|
|
@ -59,6 +65,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteProfileObjectTypeAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteProfileObjectTypeAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteRecommender(array $args = [])
|
* @method \Aws\Result deleteRecommender(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteRecommenderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteRecommenderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteRecommenderFilter(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteRecommenderFilterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteRecommenderSchema(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteRecommenderSchemaAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteSegmentDefinition(array $args = [])
|
* @method \Aws\Result deleteSegmentDefinition(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteSegmentDefinitionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteSegmentDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteWorkflow(array $args = [])
|
* @method \Aws\Result deleteWorkflow(array $args = [])
|
||||||
|
|
@ -99,6 +109,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getProfileRecommendationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getProfileRecommendationsAsync(array $args = [])
|
||||||
* @method \Aws\Result getRecommender(array $args = [])
|
* @method \Aws\Result getRecommender(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getRecommenderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getRecommenderAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRecommenderFilter(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRecommenderFilterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRecommenderSchema(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRecommenderSchemaAsync(array $args = [])
|
||||||
* @method \Aws\Result getSegmentDefinition(array $args = [])
|
* @method \Aws\Result getSegmentDefinition(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getSegmentDefinitionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getSegmentDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result getSegmentEstimate(array $args = [])
|
* @method \Aws\Result getSegmentEstimate(array $args = [])
|
||||||
|
|
@ -151,8 +165,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listProfileObjectTypesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listProfileObjectTypesAsync(array $args = [])
|
||||||
* @method \Aws\Result listProfileObjects(array $args = [])
|
* @method \Aws\Result listProfileObjects(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listProfileObjectsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listProfileObjectsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRecommenderFilters(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRecommenderFiltersAsync(array $args = [])
|
||||||
* @method \Aws\Result listRecommenderRecipes(array $args = [])
|
* @method \Aws\Result listRecommenderRecipes(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listRecommenderRecipesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listRecommenderRecipesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRecommenderSchemas(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRecommenderSchemasAsync(array $args = [])
|
||||||
* @method \Aws\Result listRecommenders(array $args = [])
|
* @method \Aws\Result listRecommenders(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listRecommendersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listRecommendersAsync(array $args = [])
|
||||||
* @method \Aws\Result listRuleBasedMatches(array $args = [])
|
* @method \Aws\Result listRuleBasedMatches(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,26 @@ use Aws\AwsClient;
|
||||||
* This client is used to interact with the **Amazon Aurora DSQL** service.
|
* This client is used to interact with the **Amazon Aurora DSQL** service.
|
||||||
* @method \Aws\Result createCluster(array $args = [])
|
* @method \Aws\Result createCluster(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createStream(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createStreamAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteCluster(array $args = [])
|
* @method \Aws\Result deleteCluster(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteClusterPolicy(array $args = [])
|
* @method \Aws\Result deleteClusterPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteClusterPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteClusterPolicyAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteStream(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteStreamAsync(array $args = [])
|
||||||
* @method \Aws\Result getCluster(array $args = [])
|
* @method \Aws\Result getCluster(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getClusterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getClusterAsync(array $args = [])
|
||||||
* @method \Aws\Result getClusterPolicy(array $args = [])
|
* @method \Aws\Result getClusterPolicy(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getClusterPolicyAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getClusterPolicyAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getStream(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getStreamAsync(array $args = [])
|
||||||
* @method \Aws\Result getVpcEndpointServiceName(array $args = [])
|
* @method \Aws\Result getVpcEndpointServiceName(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getVpcEndpointServiceNameAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getVpcEndpointServiceNameAsync(array $args = [])
|
||||||
* @method \Aws\Result listClusters(array $args = [])
|
* @method \Aws\Result listClusters(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listStreams(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listStreamsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result putClusterPolicy(array $args = [])
|
* @method \Aws\Result putClusterPolicy(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise createGroupProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createGroupProfileAsync(array $args = [])
|
||||||
* @method \Aws\Result createListingChangeSet(array $args = [])
|
* @method \Aws\Result createListingChangeSet(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createListingChangeSetAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createListingChangeSetAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createNotebook(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createNotebookAsync(array $args = [])
|
||||||
* @method \Aws\Result createProject(array $args = [])
|
* @method \Aws\Result createProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result createProjectMembership(array $args = [])
|
* @method \Aws\Result createProjectMembership(array $args = [])
|
||||||
|
|
@ -119,6 +121,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteGlossaryTermAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteGlossaryTermAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteListing(array $args = [])
|
* @method \Aws\Result deleteListing(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteListingAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteListingAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteNotebook(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteNotebookAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteProject(array $args = [])
|
* @method \Aws\Result deleteProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteProjectMembership(array $args = [])
|
* @method \Aws\Result deleteProjectMembership(array $args = [])
|
||||||
|
|
@ -193,6 +197,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getListingAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getListingAsync(array $args = [])
|
||||||
* @method \Aws\Result getMetadataGenerationRun(array $args = [])
|
* @method \Aws\Result getMetadataGenerationRun(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getMetadataGenerationRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMetadataGenerationRunAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getNotebook(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getNotebookAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getNotebookExport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getNotebookExportAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getNotebookRun(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getNotebookRunAsync(array $args = [])
|
||||||
* @method \Aws\Result getProject(array $args = [])
|
* @method \Aws\Result getProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result getProjectProfile(array $args = [])
|
* @method \Aws\Result getProjectProfile(array $args = [])
|
||||||
|
|
@ -253,6 +263,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listLineageNodeHistoryAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listLineageNodeHistoryAsync(array $args = [])
|
||||||
* @method \Aws\Result listMetadataGenerationRuns(array $args = [])
|
* @method \Aws\Result listMetadataGenerationRuns(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listMetadataGenerationRunsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listMetadataGenerationRunsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listNotebookRuns(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listNotebookRunsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listNotebooks(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listNotebooksAsync(array $args = [])
|
||||||
* @method \Aws\Result listNotifications(array $args = [])
|
* @method \Aws\Result listNotifications(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listNotificationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listNotificationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listPolicyGrants(array $args = [])
|
* @method \Aws\Result listPolicyGrants(array $args = [])
|
||||||
|
|
@ -285,6 +299,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise putDataExportConfigurationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putDataExportConfigurationAsync(array $args = [])
|
||||||
* @method \Aws\Result putEnvironmentBlueprintConfiguration(array $args = [])
|
* @method \Aws\Result putEnvironmentBlueprintConfiguration(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise putEnvironmentBlueprintConfigurationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putEnvironmentBlueprintConfigurationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result queryGraph(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise queryGraphAsync(array $args = [])
|
||||||
* @method \Aws\Result rejectPredictions(array $args = [])
|
* @method \Aws\Result rejectPredictions(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise rejectPredictionsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise rejectPredictionsAsync(array $args = [])
|
||||||
* @method \Aws\Result rejectSubscriptionRequest(array $args = [])
|
* @method \Aws\Result rejectSubscriptionRequest(array $args = [])
|
||||||
|
|
@ -309,6 +325,14 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise startDataSourceRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startDataSourceRunAsync(array $args = [])
|
||||||
* @method \Aws\Result startMetadataGenerationRun(array $args = [])
|
* @method \Aws\Result startMetadataGenerationRun(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startMetadataGenerationRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startMetadataGenerationRunAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startNotebookExport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startNotebookExportAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startNotebookImport(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startNotebookImportAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startNotebookRun(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startNotebookRunAsync(array $args = [])
|
||||||
|
* @method \Aws\Result stopNotebookRun(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise stopNotebookRunAsync(array $args = [])
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result untagResource(array $args = [])
|
* @method \Aws\Result untagResource(array $args = [])
|
||||||
|
|
@ -339,6 +363,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateGlossaryTermAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateGlossaryTermAsync(array $args = [])
|
||||||
* @method \Aws\Result updateGroupProfile(array $args = [])
|
* @method \Aws\Result updateGroupProfile(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateGroupProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateGroupProfileAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateNotebook(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateNotebookAsync(array $args = [])
|
||||||
* @method \Aws\Result updateProject(array $args = [])
|
* @method \Aws\Result updateProject(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateProjectAsync(array $args = [])
|
||||||
* @method \Aws\Result updateProjectProfile(array $args = [])
|
* @method \Aws\Result updateProjectProfile(array $args = [])
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,24 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForUserAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForUserAsync(array $args = [])
|
||||||
* @method \Aws\Result assumeQueueRoleForWorker(array $args = [])
|
* @method \Aws\Result assumeQueueRoleForWorker(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForWorkerAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise assumeQueueRoleForWorkerAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetJobAsync(array $args = [])
|
||||||
* @method \Aws\Result batchGetJobEntity(array $args = [])
|
* @method \Aws\Result batchGetJobEntity(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise batchGetJobEntityAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise batchGetJobEntityAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetSessionAction(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetSessionActionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetStep(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetStepAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetTask(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetTaskAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchGetWorker(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchGetWorkerAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchUpdateJob(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchUpdateJobAsync(array $args = [])
|
||||||
|
* @method \Aws\Result batchUpdateTask(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise batchUpdateTaskAsync(array $args = [])
|
||||||
* @method \Aws\Result copyJobTemplate(array $args = [])
|
* @method \Aws\Result copyJobTemplate(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise copyJobTemplateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise copyJobTemplateAsync(array $args = [])
|
||||||
* @method \Aws\Result createBudget(array $args = [])
|
* @method \Aws\Result createBudget(array $args = [])
|
||||||
|
|
@ -77,6 +93,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteQueueLimitAssociationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteQueueLimitAssociationAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteStorageProfile(array $args = [])
|
* @method \Aws\Result deleteStorageProfile(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteStorageProfileAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteStorageProfileAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteVolume(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteVolumeAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteWorker(array $args = [])
|
* @method \Aws\Result deleteWorker(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteWorkerAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteWorkerAsync(array $args = [])
|
||||||
* @method \Aws\Result disassociateMemberFromFarm(array $args = [])
|
* @method \Aws\Result disassociateMemberFromFarm(array $args = [])
|
||||||
|
|
@ -101,6 +119,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getLimitAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getLimitAsync(array $args = [])
|
||||||
* @method \Aws\Result getMonitor(array $args = [])
|
* @method \Aws\Result getMonitor(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getMonitorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getMonitorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getMonitorSettings(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getMonitorSettingsAsync(array $args = [])
|
||||||
* @method \Aws\Result getQueue(array $args = [])
|
* @method \Aws\Result getQueue(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getQueueAsync(array $args = [])
|
||||||
* @method \Aws\Result getQueueEnvironment(array $args = [])
|
* @method \Aws\Result getQueueEnvironment(array $args = [])
|
||||||
|
|
@ -123,6 +143,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getStorageProfileForQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getStorageProfileForQueueAsync(array $args = [])
|
||||||
* @method \Aws\Result getTask(array $args = [])
|
* @method \Aws\Result getTask(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getTaskAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getTaskAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getVolume(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getVolumeAsync(array $args = [])
|
||||||
* @method \Aws\Result getWorker(array $args = [])
|
* @method \Aws\Result getWorker(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getWorkerAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getWorkerAsync(array $args = [])
|
||||||
* @method \Aws\Result listAvailableMeteredProducts(array $args = [])
|
* @method \Aws\Result listAvailableMeteredProducts(array $args = [])
|
||||||
|
|
@ -181,6 +203,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result listTasks(array $args = [])
|
* @method \Aws\Result listTasks(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTasksAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTasksAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listVolumes(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listVolumesAsync(array $args = [])
|
||||||
* @method \Aws\Result listWorkers(array $args = [])
|
* @method \Aws\Result listWorkers(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listWorkersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listWorkersAsync(array $args = [])
|
||||||
* @method \Aws\Result putMeteredProduct(array $args = [])
|
* @method \Aws\Result putMeteredProduct(array $args = [])
|
||||||
|
|
@ -211,6 +235,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateLimitAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateLimitAsync(array $args = [])
|
||||||
* @method \Aws\Result updateMonitor(array $args = [])
|
* @method \Aws\Result updateMonitor(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateMonitorAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateMonitorAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateMonitorSettings(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateMonitorSettingsAsync(array $args = [])
|
||||||
* @method \Aws\Result updateQueue(array $args = [])
|
* @method \Aws\Result updateQueue(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateQueueAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateQueueAsync(array $args = [])
|
||||||
* @method \Aws\Result updateQueueEnvironment(array $args = [])
|
* @method \Aws\Result updateQueueEnvironment(array $args = [])
|
||||||
|
|
|
||||||
97
vendor/aws/aws-sdk-php/src/DevOpsAgent/DevOpsAgentClient.php
vendored
Normal file
97
vendor/aws/aws-sdk-php/src/DevOpsAgent/DevOpsAgentClient.php
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\DevOpsAgent;
|
||||||
|
|
||||||
|
use Aws\AwsClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This client is used to interact with the **AWS DevOps Agent Service** service.
|
||||||
|
* @method \Aws\Result associateService(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise associateServiceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createAgentSpace(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createAgentSpaceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createBacklogTask(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createBacklogTaskAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createChat(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createChatAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createPrivateConnection(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createPrivateConnectionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteAgentSpace(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteAgentSpaceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deletePrivateConnection(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deletePrivateConnectionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deregisterService(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deregisterServiceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describePrivateConnection(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describePrivateConnectionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result disableOperatorApp(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise disableOperatorAppAsync(array $args = [])
|
||||||
|
* @method \Aws\Result disassociateService(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise disassociateServiceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result enableOperatorApp(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise enableOperatorAppAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getAccountUsage(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getAccountUsageAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getAgentSpace(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getAgentSpaceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getAssociation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getAssociationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getBacklogTask(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getBacklogTaskAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getOperatorApp(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getOperatorAppAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getRecommendation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getRecommendationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getService(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getServiceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listAgentSpaces(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listAgentSpacesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listAssociations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listAssociationsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listBacklogTasks(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listBacklogTasksAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listChats(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listChatsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listExecutions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listExecutionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listGoals(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listGoalsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listJournalRecords(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listJournalRecordsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPendingMessages(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPendingMessagesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listPrivateConnections(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listPrivateConnectionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listRecommendations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listRecommendationsAsync(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 listWebhooks(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listWebhooksAsync(array $args = [])
|
||||||
|
* @method \Aws\Result registerService(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise registerServiceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result sendMessage(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise sendMessageAsync(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 updateAgentSpace(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateAgentSpaceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateAssociation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateAssociationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateBacklogTask(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateBacklogTaskAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateGoal(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateGoalAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateOperatorAppIdpConfig(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateOperatorAppIdpConfigAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updatePrivateConnectionCertificate(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updatePrivateConnectionCertificateAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateRecommendation(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateRecommendationAsync(array $args = [])
|
||||||
|
* @method \Aws\Result validateAwsAssociations(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise validateAwsAssociationsAsync(array $args = [])
|
||||||
|
*/
|
||||||
|
class DevOpsAgentClient extends AwsClient {}
|
||||||
9
vendor/aws/aws-sdk-php/src/DevOpsAgent/Exception/DevOpsAgentException.php
vendored
Normal file
9
vendor/aws/aws-sdk-php/src/DevOpsAgent/Exception/DevOpsAgentException.php
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\DevOpsAgent\Exception;
|
||||||
|
|
||||||
|
use Aws\Exception\AwsException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an error interacting with the **AWS DevOps Agent Service** service.
|
||||||
|
*/
|
||||||
|
class DevOpsAgentException extends AwsException {}
|
||||||
|
|
@ -7,8 +7,14 @@ use Aws\ClientResolver;
|
||||||
use Aws\Exception\AwsException;
|
use Aws\Exception\AwsException;
|
||||||
use Aws\HandlerList;
|
use Aws\HandlerList;
|
||||||
use Aws\Middleware;
|
use Aws\Middleware;
|
||||||
|
use Aws\Retry\Configuration as RetryConfiguration;
|
||||||
|
use Aws\Retry\ConfigurationInterface as RetryConfigurationInterface;
|
||||||
|
use Aws\Retry\ConfigurationProvider as RetryConfigurationProvider;
|
||||||
|
use Aws\Retry\V3\OptIn as NewRetriesOptIn;
|
||||||
|
use Aws\Retry\V3\RetryMiddleware as RetryV3Middleware;
|
||||||
use Aws\RetryMiddleware;
|
use Aws\RetryMiddleware;
|
||||||
use Aws\RetryMiddlewareV2;
|
use Aws\RetryMiddlewareV2;
|
||||||
|
use GuzzleHttp\Promise\Create;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This client is used to interact with the **Amazon DynamoDB** service.
|
* This client is used to interact with the **Amazon DynamoDB** service.
|
||||||
|
|
@ -130,16 +136,50 @@ use Aws\RetryMiddlewareV2;
|
||||||
*/
|
*/
|
||||||
class DynamoDbClient extends AwsClient
|
class DynamoDbClient extends AwsClient
|
||||||
{
|
{
|
||||||
|
/** @internal Default attempts for the AWS_NEW_RETRIES_2026 path. */
|
||||||
|
private const DYNAMODB_MAX_ATTEMPTS = 4;
|
||||||
|
/** @internal Base backoff in ms for the AWS_NEW_RETRIES_2026 path. */
|
||||||
|
private const DEFAULT_BASE_DELAY_MS = 25;
|
||||||
|
/**
|
||||||
|
* @internal Legacy-mode fallback when an array config does not specify
|
||||||
|
* max_attempts. Only consulted on the AWS_NEW_RETRIES_2026 path.
|
||||||
|
*/
|
||||||
|
public const DEFAULT_LEGACY_MAX_ATTEMPTS = 10;
|
||||||
|
|
||||||
public static function getArguments()
|
public static function getArguments()
|
||||||
{
|
{
|
||||||
$args = parent::getArguments();
|
$args = parent::getArguments();
|
||||||
$args['retries']['default'] = 10;
|
$args['retries']['default'] = NewRetriesOptIn::isEnabled()
|
||||||
|
? [__CLASS__, '_defaultRetries']
|
||||||
|
: self::DEFAULT_LEGACY_MAX_ATTEMPTS;
|
||||||
$args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
|
$args['retries']['fn'] = [__CLASS__, '_applyRetryConfig'];
|
||||||
$args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider'];
|
$args['api_provider']['fn'] = [__CLASS__, '_applyApiProvider'];
|
||||||
|
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal Default retry-config provider for the AWS_NEW_RETRIES_2026
|
||||||
|
* path. Falls through to env/INI before applying the DynamoDB
|
||||||
|
* default of {@see self::DYNAMODB_MAX_ATTEMPTS} attempts in
|
||||||
|
* the specs standard mode.
|
||||||
|
*/
|
||||||
|
public static function _defaultRetries()
|
||||||
|
{
|
||||||
|
return RetryConfigurationProvider::chain(
|
||||||
|
RetryConfigurationProvider::env(),
|
||||||
|
RetryConfigurationProvider::ini(),
|
||||||
|
function () {
|
||||||
|
return Create::promiseFor(
|
||||||
|
new RetryConfiguration(
|
||||||
|
RetryConfigurationProvider::getDefaultMode(),
|
||||||
|
self::DYNAMODB_MAX_ATTEMPTS
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method for instantiating and registering the DynamoDB
|
* Convenience method for instantiating and registering the DynamoDB
|
||||||
* Session handler with this DynamoDB client object.
|
* Session handler with this DynamoDB client object.
|
||||||
|
|
@ -159,40 +199,103 @@ class DynamoDbClient extends AwsClient
|
||||||
/** @internal */
|
/** @internal */
|
||||||
public static function _applyRetryConfig($value, array &$args, HandlerList $list)
|
public static function _applyRetryConfig($value, array &$args, HandlerList $list)
|
||||||
{
|
{
|
||||||
if ($value) {
|
if (!$value) {
|
||||||
$config = \Aws\Retry\ConfigurationProvider::unwrap($value);
|
return;
|
||||||
|
|
||||||
if ($config->getMode() === 'legacy') {
|
|
||||||
$list->appendSign(
|
|
||||||
Middleware::retry(
|
|
||||||
RetryMiddleware::createDefaultDecider(
|
|
||||||
$config->getMaxAttempts() - 1,
|
|
||||||
['error_codes' => ['TransactionInProgressException']]
|
|
||||||
),
|
|
||||||
function ($retries) {
|
|
||||||
return $retries
|
|
||||||
? RetryMiddleware::exponentialDelay($retries) / 2
|
|
||||||
: 0;
|
|
||||||
},
|
|
||||||
isset($args['stats']['retries'])
|
|
||||||
? (bool)$args['stats']['retries']
|
|
||||||
: false
|
|
||||||
),
|
|
||||||
'retry'
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
$list->appendSign(
|
|
||||||
RetryMiddlewareV2::wrap(
|
|
||||||
$config,
|
|
||||||
[
|
|
||||||
'collect_stats' => $args['stats']['retries'],
|
|
||||||
'transient_error_codes' => ['TransactionInProgressException']
|
|
||||||
]
|
|
||||||
),
|
|
||||||
'retry'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$config = RetryConfigurationProvider::unwrap($value);
|
||||||
|
|
||||||
|
if ($config->getMode() === 'legacy') {
|
||||||
|
self::appendLegacyModeRetries($value, $config, $args, $list);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NewRetriesOptIn::isEnabled()) {
|
||||||
|
self::appendStandardModeRetriesNew($config, $args, $list);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
self::appendStandardModeRetries($config, $args, $list);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function appendLegacyModeRetries(
|
||||||
|
$value,
|
||||||
|
RetryConfigurationInterface $config,
|
||||||
|
array &$args,
|
||||||
|
HandlerList $list
|
||||||
|
): void
|
||||||
|
{
|
||||||
|
$maxRetries = self::resolveLegacyModeMaxRetries($value, $config);
|
||||||
|
|
||||||
|
$list->appendSign(
|
||||||
|
Middleware::retry(
|
||||||
|
RetryMiddleware::createDefaultDecider(
|
||||||
|
$maxRetries,
|
||||||
|
['error_codes' => ['TransactionInProgressException']]
|
||||||
|
),
|
||||||
|
function ($retries) {
|
||||||
|
return $retries
|
||||||
|
? RetryMiddleware::exponentialDelay($retries) / 2
|
||||||
|
: 0;
|
||||||
|
},
|
||||||
|
isset($args['stats']['retries']) ? (bool) $args['stats']['retries'] : false
|
||||||
|
),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function resolveLegacyModeMaxRetries(
|
||||||
|
$value,
|
||||||
|
RetryConfigurationInterface $config
|
||||||
|
): int
|
||||||
|
{
|
||||||
|
if (
|
||||||
|
NewRetriesOptIn::isEnabled()
|
||||||
|
&& is_array($value)
|
||||||
|
&& !isset($value['max_attempts'])
|
||||||
|
) {
|
||||||
|
return self::DEFAULT_LEGACY_MAX_ATTEMPTS;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $config->getMaxAttempts() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function appendStandardModeRetries(
|
||||||
|
RetryConfigurationInterface $config,
|
||||||
|
array &$args,
|
||||||
|
HandlerList $list
|
||||||
|
): void
|
||||||
|
{
|
||||||
|
$list->appendSign(
|
||||||
|
RetryMiddlewareV2::wrap(
|
||||||
|
$config,
|
||||||
|
[
|
||||||
|
'collect_stats' => $args['stats']['retries'],
|
||||||
|
'transient_error_codes' => ['TransactionInProgressException'],
|
||||||
|
]
|
||||||
|
),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function appendStandardModeRetriesNew(
|
||||||
|
RetryConfigurationInterface $config,
|
||||||
|
array &$args,
|
||||||
|
HandlerList $list
|
||||||
|
): void
|
||||||
|
{
|
||||||
|
$list->appendSign(
|
||||||
|
RetryV3Middleware::wrap(
|
||||||
|
$config,
|
||||||
|
[
|
||||||
|
'collect_stats' => $args['stats']['retries'],
|
||||||
|
'service' => $args['service'],
|
||||||
|
'base_delay' => self::DEFAULT_BASE_DELAY_MS,
|
||||||
|
'transient_error_codes' => ['TransactionInProgressException'],
|
||||||
|
]
|
||||||
|
),
|
||||||
|
'retry'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @internal */
|
/** @internal */
|
||||||
|
|
|
||||||
|
|
@ -17,22 +17,34 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise getDashboardForJobRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getDashboardForJobRunAsync(array $args = [])
|
||||||
* @method \Aws\Result getJobRun(array $args = [])
|
* @method \Aws\Result getJobRun(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise getJobRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise getJobRunAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getResourceDashboard(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getResourceDashboardAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getSessionAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getSessionEndpoint(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getSessionEndpointAsync(array $args = [])
|
||||||
* @method \Aws\Result listApplications(array $args = [])
|
* @method \Aws\Result listApplications(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listApplicationsAsync(array $args = [])
|
||||||
* @method \Aws\Result listJobRunAttempts(array $args = [])
|
* @method \Aws\Result listJobRunAttempts(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listJobRunAttemptsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listJobRunAttemptsAsync(array $args = [])
|
||||||
* @method \Aws\Result listJobRuns(array $args = [])
|
* @method \Aws\Result listJobRuns(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listJobRunsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listJobRunsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listSessions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listSessionsAsync(array $args = [])
|
||||||
* @method \Aws\Result listTagsForResource(array $args = [])
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result startApplication(array $args = [])
|
* @method \Aws\Result startApplication(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startApplicationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startApplicationAsync(array $args = [])
|
||||||
* @method \Aws\Result startJobRun(array $args = [])
|
* @method \Aws\Result startJobRun(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise startJobRunAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise startJobRunAsync(array $args = [])
|
||||||
|
* @method \Aws\Result startSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise startSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result stopApplication(array $args = [])
|
* @method \Aws\Result stopApplication(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise stopApplicationAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise stopApplicationAsync(array $args = [])
|
||||||
* @method \Aws\Result tagResource(array $args = [])
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result terminateSession(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise terminateSessionAsync(array $args = [])
|
||||||
* @method \Aws\Result untagResource(array $args = [])
|
* @method \Aws\Result untagResource(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateApplication(array $args = [])
|
* @method \Aws\Result updateApplication(array $args = [])
|
||||||
|
|
|
||||||
32
vendor/aws/aws-sdk-php/src/Ec2/Ec2Client.php
vendored
32
vendor/aws/aws-sdk-php/src/Ec2/Ec2Client.php
vendored
|
|
@ -438,6 +438,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise acceptAddressTransferAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise acceptAddressTransferAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result acceptCapacityReservationBillingOwnership(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result acceptCapacityReservationBillingOwnership(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise acceptCapacityReservationBillingOwnershipAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise acceptCapacityReservationBillingOwnershipAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result acceptTransitGatewayClientVpnAttachment(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise acceptTransitGatewayClientVpnAttachmentAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result acceptTransitGatewayMulticastDomainAssociations(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result acceptTransitGatewayMulticastDomainAssociations(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise acceptTransitGatewayMulticastDomainAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise acceptTransitGatewayMulticastDomainAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result acceptTransitGatewayPeeringAttachment(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result acceptTransitGatewayPeeringAttachment(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -596,6 +598,10 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise createRouteServerEndpointAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise createRouteServerEndpointAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result createRouteServerPeer(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result createRouteServerPeer(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise createRouteServerPeerAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise createRouteServerPeerAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result createSecondaryNetwork(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createSecondaryNetworkAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result createSecondarySubnet(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createSecondarySubnetAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result createSnapshots(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result createSnapshots(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise createSnapshotsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise createSnapshotsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result createStoreImageTask(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result createStoreImageTask(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -732,6 +738,10 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteRouteServerEndpointAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteRouteServerEndpointAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteRouteServerPeer(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteRouteServerPeer(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteRouteServerPeerAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteRouteServerPeerAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result deleteSecondaryNetwork(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteSecondaryNetworkAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result deleteSecondarySubnet(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteSecondarySubnetAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteSubnetCidrReservation(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteSubnetCidrReservation(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteSubnetCidrReservationAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteSubnetCidrReservationAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteTrafficMirrorFilter(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteTrafficMirrorFilter(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -744,6 +754,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteTrafficMirrorTargetAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteTrafficMirrorTargetAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteTransitGateway(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteTransitGateway(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteTransitGatewayAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteTransitGatewayAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result deleteTransitGatewayClientVpnAttachment(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteTransitGatewayClientVpnAttachmentAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteTransitGatewayConnect(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteTransitGatewayConnect(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteTransitGatewayConnectAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise deleteTransitGatewayConnectAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result deleteTransitGatewayConnectPeer(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result deleteTransitGatewayConnectPeer(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -900,6 +912,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeIpamExternalResourceVerificationTokensAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeIpamExternalResourceVerificationTokensAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeIpamPolicies(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeIpamPolicies(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise describeIpamPoliciesAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeIpamPoliciesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result describeIpamPoolAllocations(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeIpamPoolAllocationsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeIpamPools(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeIpamPools(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise describeIpamPoolsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeIpamPoolsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeIpamPrefixListResolverTargets(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeIpamPrefixListResolverTargets(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -964,6 +978,12 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeRouteServerPeersAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeRouteServerPeersAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeRouteServers(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeRouteServers(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise describeRouteServersAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeRouteServersAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result describeSecondaryInterfaces(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeSecondaryInterfacesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result describeSecondaryNetworks(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeSecondaryNetworksAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result describeSecondarySubnets(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeSecondarySubnetsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeSecurityGroupRules(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeSecurityGroupRules(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise describeSecurityGroupRulesAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise describeSecurityGroupRulesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result describeSecurityGroupVpcAssociations(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result describeSecurityGroupVpcAssociations(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1170,6 +1190,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise getCapacityManagerMetricDataAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getCapacityManagerMetricDataAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getCapacityManagerMetricDimensions(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getCapacityManagerMetricDimensions(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise getCapacityManagerMetricDimensionsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getCapacityManagerMetricDimensionsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result getCapacityManagerMonitoredTagKeys(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getCapacityManagerMonitoredTagKeysAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getCapacityReservationUsage(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getCapacityReservationUsage(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise getCapacityReservationUsageAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getCapacityReservationUsageAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getCoipPoolUsage(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getCoipPoolUsage(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1230,6 +1252,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise getManagedPrefixListAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getManagedPrefixListAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getManagedPrefixListEntries(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getManagedPrefixListEntries(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise getManagedPrefixListEntriesAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getManagedPrefixListEntriesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result getManagedResourceVisibility(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getManagedResourceVisibilityAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getNetworkInsightsAccessScopeAnalysisFindings(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getNetworkInsightsAccessScopeAnalysisFindings(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise getNetworkInsightsAccessScopeAnalysisFindingsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise getNetworkInsightsAccessScopeAnalysisFindingsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result getNetworkInsightsAccessScopeContent(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result getNetworkInsightsAccessScopeContent(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1334,6 +1358,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyIpamPolicyAllocationRulesAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyIpamPolicyAllocationRulesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyIpamPool(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyIpamPool(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyIpamPoolAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyIpamPoolAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result modifyIpamPoolAllocation(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise modifyIpamPoolAllocationAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyIpamPrefixListResolver(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyIpamPrefixListResolver(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyIpamPrefixListResolverAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyIpamPrefixListResolverAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyIpamPrefixListResolverTarget(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyIpamPrefixListResolverTarget(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1350,6 +1376,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyLocalGatewayRouteAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyLocalGatewayRouteAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyManagedPrefixList(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyManagedPrefixList(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyManagedPrefixListAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyManagedPrefixListAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result modifyManagedResourceVisibility(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise modifyManagedResourceVisibilityAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyPrivateDnsNameOptions(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyPrivateDnsNameOptions(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise modifyPrivateDnsNameOptionsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise modifyPrivateDnsNameOptionsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result modifyPublicIpDnsNameOptions(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result modifyPublicIpDnsNameOptions(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1438,6 +1466,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise registerTransitGatewayMulticastGroupSourcesAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise registerTransitGatewayMulticastGroupSourcesAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result rejectCapacityReservationBillingOwnership(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result rejectCapacityReservationBillingOwnership(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise rejectCapacityReservationBillingOwnershipAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise rejectCapacityReservationBillingOwnershipAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result rejectTransitGatewayClientVpnAttachment(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise rejectTransitGatewayClientVpnAttachmentAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result rejectTransitGatewayMulticastDomainAssociations(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result rejectTransitGatewayMulticastDomainAssociations(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise rejectTransitGatewayMulticastDomainAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise rejectTransitGatewayMulticastDomainAssociationsAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result rejectTransitGatewayPeeringAttachment(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result rejectTransitGatewayPeeringAttachment(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
@ -1498,6 +1528,8 @@ use Aws\PresignUrlMiddleware;
|
||||||
* @method \GuzzleHttp\Promise\Promise unassignPrivateNatGatewayAddressAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise unassignPrivateNatGatewayAddressAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result unlockSnapshot(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result unlockSnapshot(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise unlockSnapshotAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise unlockSnapshotAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \Aws\Result updateCapacityManagerMonitoredTagKeys(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateCapacityManagerMonitoredTagKeysAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result updateCapacityManagerOrganizationsAccess(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result updateCapacityManagerOrganizationsAccess(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \GuzzleHttp\Promise\Promise updateCapacityManagerOrganizationsAccessAsync(array $args = []) (supported in versions 2016-11-15)
|
* @method \GuzzleHttp\Promise\Promise updateCapacityManagerOrganizationsAccessAsync(array $args = []) (supported in versions 2016-11-15)
|
||||||
* @method \Aws\Result updateInterruptibleCapacityReservationAllocation(array $args = []) (supported in versions 2016-11-15)
|
* @method \Aws\Result updateInterruptibleCapacityReservationAllocation(array $args = []) (supported in versions 2016-11-15)
|
||||||
|
|
|
||||||
26
vendor/aws/aws-sdk-php/src/Ecs/EcsClient.php
vendored
26
vendor/aws/aws-sdk-php/src/Ecs/EcsClient.php
vendored
|
|
@ -6,10 +6,14 @@ use Aws\AwsClient;
|
||||||
/**
|
/**
|
||||||
* This client is used to interact with **Amazon ECS**.
|
* This client is used to interact with **Amazon ECS**.
|
||||||
*
|
*
|
||||||
|
* @method \Aws\Result continueServiceDeployment(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise continueServiceDeploymentAsync(array $args = [])
|
||||||
* @method \Aws\Result createCapacityProvider(array $args = [])
|
* @method \Aws\Result createCapacityProvider(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createCapacityProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createCapacityProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result createCluster(array $args = [])
|
* @method \Aws\Result createCluster(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDaemon(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDaemonAsync(array $args = [])
|
||||||
* @method \Aws\Result createExpressGatewayService(array $args = [])
|
* @method \Aws\Result createExpressGatewayService(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise createExpressGatewayServiceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise createExpressGatewayServiceAsync(array $args = [])
|
||||||
* @method \Aws\Result createService(array $args = [])
|
* @method \Aws\Result createService(array $args = [])
|
||||||
|
|
@ -24,6 +28,10 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteCapacityProviderAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteCapacityProviderAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteCluster(array $args = [])
|
* @method \Aws\Result deleteCluster(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDaemon(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDaemonAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDaemonTaskDefinition(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDaemonTaskDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteExpressGatewayService(array $args = [])
|
* @method \Aws\Result deleteExpressGatewayService(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise deleteExpressGatewayServiceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise deleteExpressGatewayServiceAsync(array $args = [])
|
||||||
* @method \Aws\Result deleteService(array $args = [])
|
* @method \Aws\Result deleteService(array $args = [])
|
||||||
|
|
@ -42,6 +50,14 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeClustersAsync(array $args = [])
|
||||||
* @method \Aws\Result describeContainerInstances(array $args = [])
|
* @method \Aws\Result describeContainerInstances(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeContainerInstancesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeContainerInstancesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeDaemon(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeDaemonAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeDaemonDeployments(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeDaemonDeploymentsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeDaemonRevisions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeDaemonRevisionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result describeDaemonTaskDefinition(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise describeDaemonTaskDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result describeExpressGatewayService(array $args = [])
|
* @method \Aws\Result describeExpressGatewayService(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise describeExpressGatewayServiceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise describeExpressGatewayServiceAsync(array $args = [])
|
||||||
* @method \Aws\Result describeServiceDeployments(array $args = [])
|
* @method \Aws\Result describeServiceDeployments(array $args = [])
|
||||||
|
|
@ -70,6 +86,12 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
|
||||||
* @method \Aws\Result listContainerInstances(array $args = [])
|
* @method \Aws\Result listContainerInstances(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listContainerInstancesAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listContainerInstancesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDaemonDeployments(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDaemonDeploymentsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDaemonTaskDefinitions(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDaemonTaskDefinitionsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDaemons(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDaemonsAsync(array $args = [])
|
||||||
* @method \Aws\Result listServiceDeployments(array $args = [])
|
* @method \Aws\Result listServiceDeployments(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise listServiceDeploymentsAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise listServiceDeploymentsAsync(array $args = [])
|
||||||
* @method \Aws\Result listServices(array $args = [])
|
* @method \Aws\Result listServices(array $args = [])
|
||||||
|
|
@ -94,6 +116,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise putClusterCapacityProvidersAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise putClusterCapacityProvidersAsync(array $args = [])
|
||||||
* @method \Aws\Result registerContainerInstance(array $args = [])
|
* @method \Aws\Result registerContainerInstance(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise registerContainerInstanceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise registerContainerInstanceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result registerDaemonTaskDefinition(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise registerDaemonTaskDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result registerTaskDefinition(array $args = [])
|
* @method \Aws\Result registerTaskDefinition(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise registerTaskDefinitionAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise registerTaskDefinitionAsync(array $args = [])
|
||||||
* @method \Aws\Result runTask(array $args = [])
|
* @method \Aws\Result runTask(array $args = [])
|
||||||
|
|
@ -124,6 +148,8 @@ use Aws\AwsClient;
|
||||||
* @method \GuzzleHttp\Promise\Promise updateContainerAgentAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateContainerAgentAsync(array $args = [])
|
||||||
* @method \Aws\Result updateContainerInstancesState(array $args = [])
|
* @method \Aws\Result updateContainerInstancesState(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateContainerInstancesStateAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateContainerInstancesStateAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateDaemon(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateDaemonAsync(array $args = [])
|
||||||
* @method \Aws\Result updateExpressGatewayService(array $args = [])
|
* @method \Aws\Result updateExpressGatewayService(array $args = [])
|
||||||
* @method \GuzzleHttp\Promise\Promise updateExpressGatewayServiceAsync(array $args = [])
|
* @method \GuzzleHttp\Promise\Promise updateExpressGatewayServiceAsync(array $args = [])
|
||||||
* @method \Aws\Result updateService(array $args = [])
|
* @method \Aws\Result updateService(array $args = [])
|
||||||
|
|
|
||||||
41
vendor/aws/aws-sdk-php/src/ElementalInference/ElementalInferenceClient.php
vendored
Normal file
41
vendor/aws/aws-sdk-php/src/ElementalInference/ElementalInferenceClient.php
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\ElementalInference;
|
||||||
|
|
||||||
|
use Aws\AwsClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This client is used to interact with the **AWS Elemental Inference** service.
|
||||||
|
* @method \Aws\Result associateFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise associateFeedAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createDictionary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createDictionaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result createFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise createFeedAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteDictionary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteDictionaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result deleteFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise deleteFeedAsync(array $args = [])
|
||||||
|
* @method \Aws\Result disassociateFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise disassociateFeedAsync(array $args = [])
|
||||||
|
* @method \Aws\Result exportDictionaryEntries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise exportDictionaryEntriesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getDictionary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getDictionaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result getFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise getFeedAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listDictionaries(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listDictionariesAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listFeeds(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listFeedsAsync(array $args = [])
|
||||||
|
* @method \Aws\Result listTagsForResource(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result tagResource(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result untagResource(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateDictionary(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateDictionaryAsync(array $args = [])
|
||||||
|
* @method \Aws\Result updateFeed(array $args = [])
|
||||||
|
* @method \GuzzleHttp\Promise\Promise updateFeedAsync(array $args = [])
|
||||||
|
*/
|
||||||
|
class ElementalInferenceClient extends AwsClient {}
|
||||||
9
vendor/aws/aws-sdk-php/src/ElementalInference/Exception/ElementalInferenceException.php
vendored
Normal file
9
vendor/aws/aws-sdk-php/src/ElementalInference/Exception/ElementalInferenceException.php
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?php
|
||||||
|
namespace Aws\ElementalInference\Exception;
|
||||||
|
|
||||||
|
use Aws\Exception\AwsException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an error interacting with the **AWS Elemental Inference** service.
|
||||||
|
*/
|
||||||
|
class ElementalInferenceException extends AwsException {}
|
||||||
|
|
@ -21,7 +21,7 @@ class EndpointDiscoveryMiddleware
|
||||||
private static $discoveryCooldown = 60;
|
private static $discoveryCooldown = 60;
|
||||||
|
|
||||||
private $args;
|
private $args;
|
||||||
private $client;
|
private \WeakReference $client;
|
||||||
private $config;
|
private $config;
|
||||||
private $discoveryTimes = [];
|
private $discoveryTimes = [];
|
||||||
private $nextHandler;
|
private $nextHandler;
|
||||||
|
|
@ -32,7 +32,7 @@ class EndpointDiscoveryMiddleware
|
||||||
$args,
|
$args,
|
||||||
$config
|
$config
|
||||||
) {
|
) {
|
||||||
return function (callable $handler) use (
|
return static function (callable $handler) use (
|
||||||
$client,
|
$client,
|
||||||
$args,
|
$args,
|
||||||
$config
|
$config
|
||||||
|
|
@ -53,7 +53,7 @@ class EndpointDiscoveryMiddleware
|
||||||
$config
|
$config
|
||||||
) {
|
) {
|
||||||
$this->nextHandler = $handler;
|
$this->nextHandler = $handler;
|
||||||
$this->client = $client;
|
$this->client = \WeakReference::create($client);
|
||||||
$this->args = $args;
|
$this->args = $args;
|
||||||
$this->service = $client->getApi();
|
$this->service = $client->getApi();
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
|
@ -91,7 +91,7 @@ class EndpointDiscoveryMiddleware
|
||||||
$identifiers = $this->getIdentifiers($op);
|
$identifiers = $this->getIdentifiers($op);
|
||||||
|
|
||||||
$cacheKey = $this->getCacheKey(
|
$cacheKey = $this->getCacheKey(
|
||||||
$this->client->getCredentials()->wait(),
|
$this->client->get()->getCredentials()->wait(),
|
||||||
$cmd,
|
$cmd,
|
||||||
$identifiers
|
$identifiers
|
||||||
);
|
);
|
||||||
|
|
@ -178,7 +178,7 @@ class EndpointDiscoveryMiddleware
|
||||||
) {
|
) {
|
||||||
$discCmd = $this->getDiscoveryCommand($cmd, $identifiers);
|
$discCmd = $this->getDiscoveryCommand($cmd, $identifiers);
|
||||||
$this->discoveryTimes[$cacheKey] = time();
|
$this->discoveryTimes[$cacheKey] = time();
|
||||||
$result = $this->client->execute($discCmd);
|
$result = $this->client->get()->execute($discCmd);
|
||||||
|
|
||||||
if (isset($result['Endpoints'])) {
|
if (isset($result['Endpoints'])) {
|
||||||
$endpointData = [];
|
$endpointData = [];
|
||||||
|
|
@ -237,7 +237,7 @@ class EndpointDiscoveryMiddleware
|
||||||
$params['Identifiers'][$identifier] = $cmd[$identifier];
|
$params['Identifiers'][$identifier] = $cmd[$identifier];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$command = $this->client->getCommand($endpointOperation, $params);
|
$command = $this->client->get()->getCommand($endpointOperation, $params);
|
||||||
$command->getHandlerList()->appendBuild(
|
$command->getHandlerList()->appendBuild(
|
||||||
Middleware::mapRequest(function (RequestInterface $r) {
|
Middleware::mapRequest(function (RequestInterface $r) {
|
||||||
return $r->withHeader(
|
return $r->withHeader(
|
||||||
|
|
|
||||||
79
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddEvaluator.php
vendored
Normal file
79
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddEvaluator.php
vendored
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Aws\EndpointV2\Bdd;
|
||||||
|
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||||
|
use Aws\Exception\UnresolvedEndpointException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Walks an endpoint BDD to produce a {@see RulesetEndpoint} or throw an
|
||||||
|
* {@see UnresolvedEndpointException}.
|
||||||
|
*
|
||||||
|
* The traversal follows the smithy rules-engine reference algorithm:
|
||||||
|
* each reference is either a node pointer (optionally complemented with a
|
||||||
|
* negative sign), one of the two terminals (`1` / `-1`), or a result pointer
|
||||||
|
* (offset by {@see self::RESULT_OFFSET}). Nodes are laid out as contiguous
|
||||||
|
* triples `[conditionIndex, highRef, lowRef]` inside the ruleset's flat
|
||||||
|
* node array.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class BddEvaluator
|
||||||
|
{
|
||||||
|
private const TERMINAL_TRUE = 1;
|
||||||
|
private const TERMINAL_FALSE = -1;
|
||||||
|
private const RESULT_OFFSET = 100_000_000;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
private readonly BddRuleset $ruleset,
|
||||||
|
private readonly BddResultResolver $resultResolver
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resolves an endpoint from the BDD for the given input parameters.
|
||||||
|
*
|
||||||
|
* @throws UnresolvedEndpointException when resolution reaches the no-match
|
||||||
|
* terminal or an error result rule.
|
||||||
|
*/
|
||||||
|
public function evaluate(array $inputParameters): RulesetEndpoint
|
||||||
|
{
|
||||||
|
$this->ruleset->applyParameterDefaults($inputParameters);
|
||||||
|
|
||||||
|
$nodes = $this->ruleset->getNodes();
|
||||||
|
$conditions = $this->ruleset->getConditions();
|
||||||
|
$library = $this->ruleset->standardLibrary;
|
||||||
|
|
||||||
|
$ref = $this->ruleset->getRoot();
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
if ($ref >= self::RESULT_OFFSET) {
|
||||||
|
return $this->resultResolver->resolve(
|
||||||
|
$ref - self::RESULT_OFFSET,
|
||||||
|
$inputParameters
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($ref === self::TERMINAL_TRUE || $ref === self::TERMINAL_FALSE) {
|
||||||
|
// Throws exception
|
||||||
|
$this->resultResolver->resolveNoMatch($inputParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
$isComplement = $ref < 0;
|
||||||
|
$base = ($isComplement ? -$ref : $ref) * 3 - 3;
|
||||||
|
|
||||||
|
$condIndex = $nodes[$base];
|
||||||
|
$value = $library->callFunction(
|
||||||
|
$conditions[$condIndex],
|
||||||
|
$inputParameters
|
||||||
|
);
|
||||||
|
|
||||||
|
$condResult = ($value !== null && $value !== false);
|
||||||
|
// Complement edges invert the high/low selection without
|
||||||
|
// duplicating nodes in the BDD.
|
||||||
|
$ref = ($condResult xor $isComplement)
|
||||||
|
? $nodes[$base + 1]
|
||||||
|
: $nodes[$base + 2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
68
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddNodeDecoder.php
vendored
Normal file
68
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddNodeDecoder.php
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Aws\EndpointV2\Bdd;
|
||||||
|
|
||||||
|
use Aws\Exception\UnresolvedEndpointException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes the base64 `nodes` string shipped in the endpointBdd trait into a
|
||||||
|
* flat array of signed 32-bit integers. Every node occupies three slots:
|
||||||
|
* `[conditionIndex, highRef, lowRef]`.
|
||||||
|
*
|
||||||
|
* The flat representation is intentional — indexing into an int array is
|
||||||
|
* cheaper per step than materialising a node object for every traversal,
|
||||||
|
* and the evaluator hot loop references thousands of slots for a large BDD.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class BddNodeDecoder
|
||||||
|
{
|
||||||
|
private const BYTES_PER_NODE = 12;
|
||||||
|
private const INT_32_MAX = 2147483647;
|
||||||
|
private const INT_32_OFFSET = 4294967296;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decodes `$encoded` and verifies that the byte count matches
|
||||||
|
* `$expectedNodeCount`. Returns a flat int array of length
|
||||||
|
* `3 * $expectedNodeCount`.
|
||||||
|
*
|
||||||
|
* @throws UnresolvedEndpointException when the payload is not valid base64
|
||||||
|
* or its length does not match the declared node count.
|
||||||
|
*/
|
||||||
|
public static function decode(string $encoded, int $expectedNodeCount): array
|
||||||
|
{
|
||||||
|
$bytes = base64_decode($encoded, true);
|
||||||
|
if ($bytes === false) {
|
||||||
|
throw new UnresolvedEndpointException(
|
||||||
|
'Endpoint BDD nodes are not valid base64.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$expectedBytes = $expectedNodeCount * self::BYTES_PER_NODE;
|
||||||
|
if (strlen($bytes) !== $expectedBytes) {
|
||||||
|
throw new UnresolvedEndpointException(sprintf(
|
||||||
|
'Endpoint BDD node payload is %d bytes but %d were expected'
|
||||||
|
. ' for %d nodes.',
|
||||||
|
strlen($bytes),
|
||||||
|
$expectedBytes,
|
||||||
|
$expectedNodeCount
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($expectedNodeCount === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
// unpack() with 'N' returns unsigned 32-bit big-endian ints. We fold
|
||||||
|
// values above INT_32_MAX back into signed space to match the trait.
|
||||||
|
$unsigned = unpack('N*', $bytes);
|
||||||
|
$flat = [];
|
||||||
|
foreach ($unsigned as $value) {
|
||||||
|
$flat[] = $value > self::INT_32_MAX
|
||||||
|
? $value - self::INT_32_OFFSET
|
||||||
|
: $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $flat;
|
||||||
|
}
|
||||||
|
}
|
||||||
140
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddResultResolver.php
vendored
Normal file
140
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddResultResolver.php
vendored
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Aws\EndpointV2\Bdd;
|
||||||
|
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetStandardLibrary;
|
||||||
|
use Aws\Exception\UnresolvedEndpointException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turns a BDD result reference into a {@see RulesetEndpoint} or throws the
|
||||||
|
* appropriate {@see UnresolvedEndpointException}. The behavior matches the
|
||||||
|
* tree evaluator's endpoint and error rules so downstream middleware cannot
|
||||||
|
* tell which evaluator produced the result.
|
||||||
|
*
|
||||||
|
* Result index `0` is reserved for the implicit no-match rule defined by the
|
||||||
|
* trait. The BDD may also reach a no-match via either terminal reference,
|
||||||
|
* which is handled by {@see resolveNoMatch()}.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class BddResultResolver
|
||||||
|
{
|
||||||
|
public function __construct(
|
||||||
|
private readonly BddRuleset $ruleset
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws UnresolvedEndpointException
|
||||||
|
*/
|
||||||
|
public function resolve(int $resultIndex, array $inputParameters): RulesetEndpoint
|
||||||
|
{
|
||||||
|
if ($resultIndex === 0) {
|
||||||
|
$this->resolveNoMatch($inputParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The serialized `results` array omits the implicit no-match rule,
|
||||||
|
// so defined result index N lives at array offset N - 1.
|
||||||
|
$results = $this->ruleset->getResults();
|
||||||
|
$result = $results[$resultIndex - 1] ?? null;
|
||||||
|
|
||||||
|
if ($result === null) {
|
||||||
|
throw new UnresolvedEndpointException(sprintf(
|
||||||
|
'Endpoint BDD referenced unknown result index %d.',
|
||||||
|
$resultIndex
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($result['error'])) {
|
||||||
|
$this->throwError($result, $inputParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($result['endpoint'])) {
|
||||||
|
throw new UnresolvedEndpointException(
|
||||||
|
'Endpoint BDD result is missing an `endpoint` or `error` block.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->buildEndpoint($result['endpoint'], $inputParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws UnresolvedEndpointException
|
||||||
|
*/
|
||||||
|
public function resolveNoMatch(array $inputParameters): never
|
||||||
|
{
|
||||||
|
throw new UnresolvedEndpointException(
|
||||||
|
'Unable to resolve an endpoint using the provider arguments: '
|
||||||
|
. json_encode($inputParameters)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws UnresolvedEndpointException
|
||||||
|
*/
|
||||||
|
private function throwError(array $result, array $inputParameters): never
|
||||||
|
{
|
||||||
|
$message = $this->ruleset->standardLibrary->resolveValue(
|
||||||
|
$result['error'],
|
||||||
|
$inputParameters
|
||||||
|
);
|
||||||
|
throw new UnresolvedEndpointException((string) $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildEndpoint(array $endpoint, array $inputParameters): RulesetEndpoint
|
||||||
|
{
|
||||||
|
$library = $this->ruleset->standardLibrary;
|
||||||
|
|
||||||
|
$url = $library->resolveValue($endpoint['url'], $inputParameters);
|
||||||
|
$properties = isset($endpoint['properties'])
|
||||||
|
? $this->resolveProperties($endpoint['properties'], $inputParameters, $library)
|
||||||
|
: null;
|
||||||
|
$headers = isset($endpoint['headers'])
|
||||||
|
? $this->resolveHeaders($endpoint['headers'], $inputParameters, $library)
|
||||||
|
: null;
|
||||||
|
|
||||||
|
return new RulesetEndpoint($url, $properties, $headers);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function resolveProperties(
|
||||||
|
$properties,
|
||||||
|
array $inputParameters,
|
||||||
|
RulesetStandardLibrary $library
|
||||||
|
) {
|
||||||
|
if (is_array($properties)) {
|
||||||
|
$resolved = [];
|
||||||
|
foreach ($properties as $key => $value) {
|
||||||
|
$resolved[$key] = $this->resolveProperties(
|
||||||
|
$value,
|
||||||
|
$inputParameters,
|
||||||
|
$library
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return $resolved;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inline some of the isTemplate check here to avoid unnecessary resolution attempts on simple strings
|
||||||
|
if (is_string($properties) && str_contains($properties, '{') && $library->isTemplate($properties)) {
|
||||||
|
return $library->resolveTemplateString($properties, $inputParameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function resolveHeaders(
|
||||||
|
array $headers,
|
||||||
|
array $inputParameters,
|
||||||
|
RulesetStandardLibrary $library
|
||||||
|
): array {
|
||||||
|
$resolved = [];
|
||||||
|
foreach ($headers as $name => $values) {
|
||||||
|
$resolvedValues = [];
|
||||||
|
foreach ($values as $value) {
|
||||||
|
$resolvedValues[] = $library->resolveValue($value, $inputParameters);
|
||||||
|
}
|
||||||
|
$resolved[$name] = $resolvedValues;
|
||||||
|
}
|
||||||
|
return $resolved;
|
||||||
|
}
|
||||||
|
}
|
||||||
127
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddRuleset.php
vendored
Normal file
127
vendor/aws/aws-sdk-php/src/EndpointV2/Bdd/BddRuleset.php
vendored
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Aws\EndpointV2\Bdd;
|
||||||
|
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetParameter;
|
||||||
|
use Aws\EndpointV2\Ruleset\RulesetStandardLibrary;
|
||||||
|
use Aws\Exception\UnresolvedEndpointException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parsed form of the `smithy.rules#endpointBdd` trait. Reuses
|
||||||
|
* {@see RulesetParameter} so parameter coercion and validation behave
|
||||||
|
* identically to the tree-based ruleset.
|
||||||
|
*
|
||||||
|
* Instances are immutable after construction. A single instance is shared
|
||||||
|
* across all requests for a given service/client pair.
|
||||||
|
*
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
final class BddRuleset
|
||||||
|
{
|
||||||
|
private const REQUIRED_FIELDS = [
|
||||||
|
'conditions', 'results', 'nodes', 'root', 'nodeCount'
|
||||||
|
];
|
||||||
|
|
||||||
|
/** @var array<string, RulesetParameter> */
|
||||||
|
private array $parameters;
|
||||||
|
|
||||||
|
/** @var array<int, array> */
|
||||||
|
private array $conditions;
|
||||||
|
|
||||||
|
/** @var array<int, array> */
|
||||||
|
private array $results;
|
||||||
|
|
||||||
|
/** @var int[] Flat triples: [condIdx, hi, lo, condIdx, hi, lo, ...] */
|
||||||
|
private array $nodes;
|
||||||
|
|
||||||
|
private int $root;
|
||||||
|
|
||||||
|
public readonly RulesetStandardLibrary $standardLibrary;
|
||||||
|
|
||||||
|
public function __construct(array $definition, array $partitions)
|
||||||
|
{
|
||||||
|
foreach (self::REQUIRED_FIELDS as $key) {
|
||||||
|
if (!array_key_exists($key, $definition)) {
|
||||||
|
throw new UnresolvedEndpointException(
|
||||||
|
"Endpoint BDD definition is missing `{$key}`."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->parameters = $this->buildParameters($definition['parameters'] ?? []);
|
||||||
|
$this->conditions = $definition['conditions'];
|
||||||
|
$this->results = $definition['results'];
|
||||||
|
$this->root = (int) $definition['root'];
|
||||||
|
$nodeCount = $definition['nodeCount'];
|
||||||
|
$this->nodes = BddNodeDecoder::decode(
|
||||||
|
(string) $definition['nodes'],
|
||||||
|
$nodeCount
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->standardLibrary = new RulesetStandardLibrary($partitions);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, RulesetParameter>
|
||||||
|
*/
|
||||||
|
public function getParameters(): array
|
||||||
|
{
|
||||||
|
return $this->parameters;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, array>
|
||||||
|
*/
|
||||||
|
public function getConditions(): array
|
||||||
|
{
|
||||||
|
return $this->conditions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<int, array>
|
||||||
|
*/
|
||||||
|
public function getResults(): array
|
||||||
|
{
|
||||||
|
return $this->results;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int[]
|
||||||
|
*/
|
||||||
|
public function getNodes(): array
|
||||||
|
{
|
||||||
|
return $this->nodes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRoot(): int
|
||||||
|
{
|
||||||
|
return $this->root;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies parameter defaults and type checks. Mirrors the tree ruleset so
|
||||||
|
* services migrating from one shape to the other see identical input
|
||||||
|
* validation behavior.
|
||||||
|
*/
|
||||||
|
public function applyParameterDefaults(array &$inputParameters): void
|
||||||
|
{
|
||||||
|
foreach ($this->parameters as $name => $param) {
|
||||||
|
$value = $inputParameters[$name] ?? null;
|
||||||
|
|
||||||
|
if (is_null($value) && !is_null($param->getDefault())) {
|
||||||
|
$inputParameters[$name] = $param->getDefault();
|
||||||
|
} elseif (!is_null($value)) {
|
||||||
|
$param->validateInputParam($value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function buildParameters(array $parameters): array
|
||||||
|
{
|
||||||
|
$built = [];
|
||||||
|
foreach ($parameters as $name => $definition) {
|
||||||
|
$built[$name] = new RulesetParameter($name, $definition);
|
||||||
|
}
|
||||||
|
return $built;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,17 +2,63 @@
|
||||||
|
|
||||||
namespace Aws\EndpointV2;
|
namespace Aws\EndpointV2;
|
||||||
|
|
||||||
|
use Aws\EndpointV2\Bdd\BddRuleset;
|
||||||
|
use Aws\EndpointV2\Ruleset\Ruleset;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides Endpoint-related artifacts used for endpoint resolution
|
* Provides Endpoint-related artifacts used for endpoint resolution
|
||||||
* and testing.
|
* and testing.
|
||||||
*/
|
*/
|
||||||
class EndpointDefinitionProvider
|
class EndpointDefinitionProvider
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Returns a parsed ruleset for the service — either a {@see BddRuleset}
|
||||||
|
* if a compiled BDD is shipped, or a {@see Ruleset} otherwise. Selection
|
||||||
|
* is driven by which file is packaged, so callers get a typed object
|
||||||
|
* rather than having to inspect the raw array.
|
||||||
|
*
|
||||||
|
* @param $service
|
||||||
|
* @param $apiVersion
|
||||||
|
* @param array $partitions
|
||||||
|
* @param null $baseDir
|
||||||
|
*
|
||||||
|
* @return Ruleset|BddRuleset
|
||||||
|
*/
|
||||||
|
public static function getParsedRuleset(
|
||||||
|
$service,
|
||||||
|
$apiVersion,
|
||||||
|
array $partitions,
|
||||||
|
$baseDir = null
|
||||||
|
): BddRuleset|Ruleset
|
||||||
|
{
|
||||||
|
$bdd = self::getEndpointBdd($service, $apiVersion, $baseDir, false);
|
||||||
|
if ($bdd !== null) {
|
||||||
|
return new BddRuleset($bdd, $partitions);
|
||||||
|
}
|
||||||
|
return new Ruleset(
|
||||||
|
self::getEndpointRuleset($service, $apiVersion, $baseDir),
|
||||||
|
$partitions
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static function getEndpointRuleset($service, $apiVersion, $baseDir = null)
|
public static function getEndpointRuleset($service, $apiVersion, $baseDir = null)
|
||||||
{
|
{
|
||||||
return self::getData($service, $apiVersion, 'ruleset', $baseDir);
|
return self::getData($service, $apiVersion, 'ruleset', $baseDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the parsed endpoint BDD for a service, or null when
|
||||||
|
* `$throwIfMissing` is false and no BDD file is packaged.
|
||||||
|
*/
|
||||||
|
public static function getEndpointBdd(
|
||||||
|
$service,
|
||||||
|
$apiVersion,
|
||||||
|
$baseDir = null,
|
||||||
|
$throwIfMissing = true
|
||||||
|
) {
|
||||||
|
return self::getData($service, $apiVersion, 'bdd', $baseDir, $throwIfMissing);
|
||||||
|
}
|
||||||
|
|
||||||
public static function getEndpointTests($service, $apiVersion, $baseDir = null)
|
public static function getEndpointTests($service, $apiVersion, $baseDir = null)
|
||||||
{
|
{
|
||||||
return self::getData($service, $apiVersion, 'tests', $baseDir);
|
return self::getData($service, $apiVersion, 'tests', $baseDir);
|
||||||
|
|
@ -30,11 +76,14 @@ class EndpointDefinitionProvider
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getData($service, $apiVersion, $type, $baseDir)
|
private static function getData($service, $apiVersion, $type, $baseDir, $throwIfMissing = true)
|
||||||
{
|
{
|
||||||
$basePath = $baseDir ? $baseDir : __DIR__ . '/../data';
|
$basePath = $baseDir ?: __DIR__ . '/../data';
|
||||||
$serviceDir = $basePath . "/{$service}";
|
$serviceDir = $basePath . "/{$service}";
|
||||||
if (!is_dir($serviceDir)) {
|
if (!is_dir($serviceDir)) {
|
||||||
|
if (!$throwIfMissing) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
'Invalid service name.'
|
'Invalid service name.'
|
||||||
);
|
);
|
||||||
|
|
@ -46,21 +95,39 @@ class EndpointDefinitionProvider
|
||||||
|
|
||||||
$rulesetPath = $serviceDir . '/' . $apiVersion;
|
$rulesetPath = $serviceDir . '/' . $apiVersion;
|
||||||
if (!is_dir($rulesetPath)) {
|
if (!is_dir($rulesetPath)) {
|
||||||
|
if (!$throwIfMissing) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
throw new \InvalidArgumentException(
|
throw new \InvalidArgumentException(
|
||||||
'Invalid api version.'
|
'Invalid api version.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$fileName = $type === 'tests' ? '/endpoint-tests-1' : '/endpoint-rule-set-1';
|
|
||||||
|
$fileName = self::getFileName($type);
|
||||||
|
|
||||||
if (file_exists($rulesetPath . $fileName . '.json.php')) {
|
if (file_exists($rulesetPath . $fileName . '.json.php')) {
|
||||||
return require($rulesetPath . $fileName . '.json.php');
|
return require($rulesetPath . $fileName . '.json.php');
|
||||||
} elseif (file_exists($rulesetPath . $fileName . '.json')) {
|
} elseif (file_exists($rulesetPath . $fileName . '.json')) {
|
||||||
return json_decode(file_get_contents($rulesetPath . $fileName . '.json'), true);
|
return json_decode(file_get_contents($rulesetPath . $fileName . '.json'), true);
|
||||||
} else {
|
|
||||||
throw new \InvalidArgumentException(
|
|
||||||
'Specified ' . $type . ' endpoint file for ' . $service . ' with api version ' . $apiVersion . ' does not exist.'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$throwIfMissing) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new \InvalidArgumentException(
|
||||||
|
'Specified ' . $type . ' endpoint file for ' . $service
|
||||||
|
. ' with api version ' . $apiVersion . ' does not exist.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static function getFileName($type): string
|
||||||
|
{
|
||||||
|
return match ($type) {
|
||||||
|
'tests' => '/endpoint-tests-1',
|
||||||
|
'bdd' => '/endpoint-bdd',
|
||||||
|
default => '/endpoint-rule-set-1',
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static function getLatest($service)
|
private static function getLatest($service)
|
||||||
|
|
@ -68,4 +135,4 @@ class EndpointDefinitionProvider
|
||||||
$manifest = \Aws\manifest();
|
$manifest = \Aws\manifest();
|
||||||
return $manifest[$service]['versions']['latest'];
|
return $manifest[$service]['versions']['latest'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,32 +2,75 @@
|
||||||
|
|
||||||
namespace Aws\EndpointV2;
|
namespace Aws\EndpointV2;
|
||||||
|
|
||||||
|
use Aws\EndpointV2\Bdd\BddEvaluator;
|
||||||
|
use Aws\EndpointV2\Bdd\BddResultResolver;
|
||||||
|
use Aws\EndpointV2\Bdd\BddRuleset;
|
||||||
use Aws\EndpointV2\Ruleset\Ruleset;
|
use Aws\EndpointV2\Ruleset\Ruleset;
|
||||||
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
use Aws\EndpointV2\Ruleset\RulesetEndpoint;
|
||||||
use Aws\Exception\UnresolvedEndpointException;
|
use Aws\Exception\UnresolvedEndpointException;
|
||||||
use Aws\LruArrayCache;
|
use Aws\LruArrayCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a service's Ruleset and client-provided input parameters, provides
|
* Given a service's ruleset and client-provided input parameters, provides
|
||||||
* either an object reflecting the properties of a resolved endpoint,
|
* either an object reflecting the properties of a resolved endpoint,
|
||||||
* or throws an error.
|
* or throws an error.
|
||||||
|
*
|
||||||
|
* Supports both the classic decision tree ruleset (`endpointRuleSet` trait)
|
||||||
|
* and the binary decision diagram ruleset (`endpointBdd` trait). A raw
|
||||||
|
* definition array is always interpreted as a tree ruleset; to use a BDD,
|
||||||
|
* construct a {@see BddRuleset} and hand it in directly.
|
||||||
*/
|
*/
|
||||||
class EndpointProviderV2
|
class EndpointProviderV2
|
||||||
{
|
{
|
||||||
/** @var Ruleset */
|
/** @var Ruleset|null */
|
||||||
private $ruleset;
|
private $ruleset;
|
||||||
|
|
||||||
|
/** @var BddRuleset|null */
|
||||||
|
private $bddRuleset;
|
||||||
|
|
||||||
|
/** @var BddEvaluator|null */
|
||||||
|
private $bddEvaluator;
|
||||||
|
|
||||||
/** @var LruArrayCache */
|
/** @var LruArrayCache */
|
||||||
private $cache;
|
private $cache;
|
||||||
|
|
||||||
public function __construct(array $ruleset, array $partitions)
|
/**
|
||||||
|
* @param array|Ruleset|BddRuleset $ruleset A parsed ruleset instance, or
|
||||||
|
* a raw tree ruleset array from the service model.
|
||||||
|
* @param array $partitions AWS partitions data. Ignored when $ruleset is
|
||||||
|
* already a parsed instance, since the instance carries its own
|
||||||
|
* partition data.
|
||||||
|
*/
|
||||||
|
public function __construct($ruleset, array $partitions)
|
||||||
{
|
{
|
||||||
$this->ruleset = new Ruleset($ruleset, $partitions);
|
if ($ruleset instanceof BddRuleset) {
|
||||||
|
$this->bddRuleset = $ruleset;
|
||||||
|
$this->bddEvaluator = new BddEvaluator(
|
||||||
|
$ruleset,
|
||||||
|
new BddResultResolver($ruleset)
|
||||||
|
);
|
||||||
|
} elseif ($ruleset instanceof Ruleset) {
|
||||||
|
$this->ruleset = $ruleset;
|
||||||
|
} elseif (is_array($ruleset)) {
|
||||||
|
$this->ruleset = new Ruleset($ruleset, $partitions);
|
||||||
|
} else {
|
||||||
|
throw new \InvalidArgumentException(
|
||||||
|
'EndpointProviderV2 expects an array, Ruleset, or BddRuleset'
|
||||||
|
. ' but received ' . (is_object($ruleset)
|
||||||
|
? get_class($ruleset)
|
||||||
|
: gettype($ruleset))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->cache = new LruArrayCache(100);
|
$this->cache = new LruArrayCache(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Ruleset
|
* Returns the parsed tree ruleset for services using the legacy
|
||||||
|
* `endpointRuleSet` trait. Returns null when the provider was built from
|
||||||
|
* an `endpointBdd` trait.
|
||||||
|
*
|
||||||
|
* @return Ruleset|null
|
||||||
*/
|
*/
|
||||||
public function getRuleset()
|
public function getRuleset()
|
||||||
{
|
{
|
||||||
|
|
@ -35,8 +78,17 @@ class EndpointProviderV2
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a Ruleset and input parameters, determines the correct endpoint
|
* Returns the parsed BDD ruleset for services using the `endpointBdd`
|
||||||
* or an error to be thrown for a given request.
|
* trait, or null when the provider was built from a tree ruleset.
|
||||||
|
*/
|
||||||
|
public function getBddRuleset(): ?BddRuleset
|
||||||
|
{
|
||||||
|
return $this->bddRuleset;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given input parameters, determines the correct endpoint or an error
|
||||||
|
* to be thrown for a given request.
|
||||||
*
|
*
|
||||||
* @return RulesetEndpoint
|
* @return RulesetEndpoint
|
||||||
* @throws UnresolvedEndpointException
|
* @throws UnresolvedEndpointException
|
||||||
|
|
@ -50,13 +102,19 @@ class EndpointProviderV2
|
||||||
return $match;
|
return $match;
|
||||||
}
|
}
|
||||||
|
|
||||||
$endpoint = $this->ruleset->evaluate($inputParameters);
|
$endpoint = $this->bddEvaluator !== null
|
||||||
|
? $this->bddEvaluator->evaluate($inputParameters)
|
||||||
|
: $this->ruleset->evaluate($inputParameters);
|
||||||
|
|
||||||
|
// This condition just applies to endpoint resolution
|
||||||
|
// through the decision tree evaluation process.
|
||||||
if ($endpoint === false) {
|
if ($endpoint === false) {
|
||||||
throw new UnresolvedEndpointException(
|
throw new UnresolvedEndpointException(
|
||||||
'Unable to resolve an endpoint using the provider arguments: '
|
'Unable to resolve an endpoint using the provider arguments: '
|
||||||
. json_encode($inputParameters)
|
. json_encode($inputParameters)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->cache->set($hashedParams, $endpoint);
|
$this->cache->set($hashedParams, $endpoint);
|
||||||
|
|
||||||
return $endpoint;
|
return $endpoint;
|
||||||
|
|
@ -66,4 +124,16 @@ class EndpointProviderV2
|
||||||
{
|
{
|
||||||
return md5(serialize($inputParameters));
|
return md5(serialize($inputParameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function getActiveParameters(): array
|
||||||
|
{
|
||||||
|
if ($this->bddRuleset !== null) {
|
||||||
|
return $this->bddRuleset->getParameters();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->ruleset->getParameters();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ class EndpointV2Middleware
|
||||||
*/
|
*/
|
||||||
private function resolveArgs(array $commandArgs, Operation $operation): array
|
private function resolveArgs(array $commandArgs, Operation $operation): array
|
||||||
{
|
{
|
||||||
$rulesetParams = $this->endpointProvider->getRuleset()->getParameters();
|
$rulesetParams = $this->endpointProvider->getActiveParameters();
|
||||||
|
|
||||||
if (isset($rulesetParams[self::ACCOUNT_ID_PARAM])
|
if (isset($rulesetParams[self::ACCOUNT_ID_PARAM])
|
||||||
&& isset($rulesetParams[self::ACCOUNT_ID_ENDPOINT_MODE_PARAM])) {
|
&& isset($rulesetParams[self::ACCOUNT_ID_ENDPOINT_MODE_PARAM])) {
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue