diff --git a/manifest.json b/manifest.json index 9fb088537..46f2b5683 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.359.12" + "${LATEST}": "3.360.1" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/BedrockRuntime/CHANGELOG.md b/src/Service/BedrockRuntime/CHANGELOG.md index d19c6cff4..171d6e999 100644 --- a/src/Service/BedrockRuntime/CHANGELOG.md +++ b/src/Service/BedrockRuntime/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Amazon Bedrock Runtime Service Tier Support Launch + ### Dependency bumped - Drop support for PHP versions lower than 8.2 diff --git a/src/Service/BedrockRuntime/src/BedrockRuntimeClient.php b/src/Service/BedrockRuntime/src/BedrockRuntimeClient.php index 6e16c345e..998164e95 100644 --- a/src/Service/BedrockRuntime/src/BedrockRuntimeClient.php +++ b/src/Service/BedrockRuntime/src/BedrockRuntimeClient.php @@ -3,6 +3,7 @@ namespace AsyncAws\BedrockRuntime; use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency; +use AsyncAws\BedrockRuntime\Enum\ServiceTierType; use AsyncAws\BedrockRuntime\Enum\Trace; use AsyncAws\BedrockRuntime\Exception\AccessDeniedException; use AsyncAws\BedrockRuntime\Exception\InternalServerException; @@ -57,6 +58,7 @@ class BedrockRuntimeClient extends AbstractApi * guardrailIdentifier?: string|null, * guardrailVersion?: string|null, * performanceConfigLatency?: PerformanceConfigLatency::*|null, + * serviceTier?: ServiceTierType::*|null, * '@region'?: string|null, * }|InvokeModelRequest $input * diff --git a/src/Service/BedrockRuntime/src/Enum/ServiceTierType.php b/src/Service/BedrockRuntime/src/Enum/ServiceTierType.php new file mode 100644 index 000000000..fa0fd4112 --- /dev/null +++ b/src/Service/BedrockRuntime/src/Enum/ServiceTierType.php @@ -0,0 +1,19 @@ + true, + self::FLEX => true, + self::PRIORITY => true, + ][$value]); + } +} diff --git a/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php b/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php index 2d9adc3f4..20a8952a9 100644 --- a/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php +++ b/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php @@ -3,6 +3,7 @@ namespace AsyncAws\BedrockRuntime\Input; use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency; +use AsyncAws\BedrockRuntime\Enum\ServiceTierType; use AsyncAws\BedrockRuntime\Enum\Trace; use AsyncAws\Core\Exception\InvalidArgument; use AsyncAws\Core\Input; @@ -103,6 +104,13 @@ final class InvokeModelRequest extends Input */ private $performanceConfigLatency; + /** + * Specifies the processing tier type used for serving the request. + * + * @var ServiceTierType::*|null + */ + private $serviceTier; + /** * @param array{ * body?: string|null, @@ -113,6 +121,7 @@ final class InvokeModelRequest extends Input * guardrailIdentifier?: string|null, * guardrailVersion?: string|null, * performanceConfigLatency?: PerformanceConfigLatency::*|null, + * serviceTier?: ServiceTierType::*|null, * '@region'?: string|null, * } $input */ @@ -126,6 +135,7 @@ public function __construct(array $input = []) $this->guardrailIdentifier = $input['guardrailIdentifier'] ?? null; $this->guardrailVersion = $input['guardrailVersion'] ?? null; $this->performanceConfigLatency = $input['performanceConfigLatency'] ?? null; + $this->serviceTier = $input['serviceTier'] ?? null; parent::__construct($input); } @@ -139,6 +149,7 @@ public function __construct(array $input = []) * guardrailIdentifier?: string|null, * guardrailVersion?: string|null, * performanceConfigLatency?: PerformanceConfigLatency::*|null, + * serviceTier?: ServiceTierType::*|null, * '@region'?: string|null, * }|InvokeModelRequest $input */ @@ -185,6 +196,14 @@ public function getPerformanceConfigLatency(): ?string return $this->performanceConfigLatency; } + /** + * @return ServiceTierType::*|null + */ + public function getServiceTier(): ?string + { + return $this->serviceTier; + } + /** * @return Trace::*|null */ @@ -227,6 +246,12 @@ public function request(): Request } $headers['X-Amzn-Bedrock-PerformanceConfig-Latency'] = $this->performanceConfigLatency; } + if (null !== $this->serviceTier) { + if (!ServiceTierType::exists($this->serviceTier)) { + throw new InvalidArgument(\sprintf('Invalid parameter "serviceTier" for "%s". The value "%s" is not a valid "ServiceTierType".', __CLASS__, $this->serviceTier)); + } + $headers['X-Amzn-Bedrock-Service-Tier'] = $this->serviceTier; + } // Prepare query $query = []; @@ -298,6 +323,16 @@ public function setPerformanceConfigLatency(?string $value): self return $this; } + /** + * @param ServiceTierType::*|null $value + */ + public function setServiceTier(?string $value): self + { + $this->serviceTier = $value; + + return $this; + } + /** * @param Trace::*|null $value */ diff --git a/src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php b/src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php index f63c11e92..02a290344 100644 --- a/src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php +++ b/src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php @@ -3,6 +3,7 @@ namespace AsyncAws\BedrockRuntime\Result; use AsyncAws\BedrockRuntime\Enum\PerformanceConfigLatency; +use AsyncAws\BedrockRuntime\Enum\ServiceTierType; use AsyncAws\Core\Response; use AsyncAws\Core\Result; @@ -32,6 +33,13 @@ class InvokeModelResponse extends Result */ private $performanceConfigLatency; + /** + * Specifies the processing tier type used for serving the request. + * + * @var ServiceTierType::*|null + */ + private $serviceTier; + public function getBody(): string { $this->initialize(); @@ -56,12 +64,23 @@ public function getPerformanceConfigLatency(): ?string return $this->performanceConfigLatency; } + /** + * @return ServiceTierType::*|null + */ + public function getServiceTier(): ?string + { + $this->initialize(); + + return $this->serviceTier; + } + protected function populateResult(Response $response): void { $headers = $response->getHeaders(); $this->contentType = $headers['content-type'][0]; $this->performanceConfigLatency = $headers['x-amzn-bedrock-performanceconfig-latency'][0] ?? null; + $this->serviceTier = $headers['x-amzn-bedrock-service-tier'][0] ?? null; $this->body = $response->getContent(); } diff --git a/src/Service/CloudFormation/CHANGELOG.md b/src/Service/CloudFormation/CHANGELOG.md index af4c8f524..e8f390a57 100644 --- a/src/Service/CloudFormation/CHANGELOG.md +++ b/src/Service/CloudFormation/CHANGELOG.md @@ -10,6 +10,7 @@ - AWS api-change: Update endpoint ruleset parameters casing - AWS apu-change: Added `us-isob-west-1` region +- AWS api-change: New CloudFormation DescribeEvents API with operation ID tracking and failure filtering capabilities to quickly identify root causes of deployment failures. ### Dependency bumped diff --git a/src/Service/CloudFormation/src/Enum/OperationType.php b/src/Service/CloudFormation/src/Enum/OperationType.php new file mode 100644 index 000000000..43a6fbcbb --- /dev/null +++ b/src/Service/CloudFormation/src/Enum/OperationType.php @@ -0,0 +1,25 @@ + true, + self::CREATE_CHANGESET => true, + self::CREATE_STACK => true, + self::DELETE_STACK => true, + self::ROLLBACK => true, + self::UPDATE_STACK => true, + ][$value]); + } +} diff --git a/src/Service/CloudFormation/src/Result/DescribeStackEventsOutput.php b/src/Service/CloudFormation/src/Result/DescribeStackEventsOutput.php index 22c02a0f2..cf88c0712 100644 --- a/src/Service/CloudFormation/src/Result/DescribeStackEventsOutput.php +++ b/src/Service/CloudFormation/src/Result/DescribeStackEventsOutput.php @@ -107,6 +107,7 @@ private function populateResultStackEvent(\SimpleXMLElement $xml): StackEvent 'StackId' => (string) $xml->StackId, 'EventId' => (string) $xml->EventId, 'StackName' => (string) $xml->StackName, + 'OperationId' => (null !== $v = $xml->OperationId[0]) ? (string) $v : null, 'LogicalResourceId' => (null !== $v = $xml->LogicalResourceId[0]) ? (string) $v : null, 'PhysicalResourceId' => (null !== $v = $xml->PhysicalResourceId[0]) ? (string) $v : null, 'ResourceType' => (null !== $v = $xml->ResourceType[0]) ? (string) $v : null, diff --git a/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php b/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php index ff4fa1c91..27782d168 100644 --- a/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php +++ b/src/Service/CloudFormation/src/Result/DescribeStacksOutput.php @@ -5,6 +5,7 @@ use AsyncAws\CloudFormation\CloudFormationClient; use AsyncAws\CloudFormation\Enum\Capability; use AsyncAws\CloudFormation\Input\DescribeStacksInput; +use AsyncAws\CloudFormation\ValueObject\OperationEntry; use AsyncAws\CloudFormation\ValueObject\Output; use AsyncAws\CloudFormation\ValueObject\Parameter; use AsyncAws\CloudFormation\ValueObject\RollbackConfiguration; @@ -121,6 +122,19 @@ private function populateResultCapabilities(\SimpleXMLElement $xml): array return $items; } + /** + * @return OperationEntry[] + */ + private function populateResultLastOperations(\SimpleXMLElement $xml): array + { + $items = []; + foreach ($xml->member as $item) { + $items[] = $this->populateResultOperationEntry($item); + } + + return $items; + } + /** * @return string[] */ @@ -134,6 +148,14 @@ private function populateResultNotificationARNs(\SimpleXMLElement $xml): array return $items; } + private function populateResultOperationEntry(\SimpleXMLElement $xml): OperationEntry + { + return new OperationEntry([ + 'OperationType' => (null !== $v = $xml->OperationType[0]) ? (string) $v : null, + 'OperationId' => (null !== $v = $xml->OperationId[0]) ? (string) $v : null, + ]); + } + private function populateResultOutput(\SimpleXMLElement $xml): Output { return new Output([ @@ -237,6 +259,7 @@ private function populateResultStack(\SimpleXMLElement $xml): Stack 'RetainExceptOnCreate' => (null !== $v = $xml->RetainExceptOnCreate[0]) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null, 'DeletionMode' => (null !== $v = $xml->DeletionMode[0]) ? (string) $v : null, 'DetailedStatus' => (null !== $v = $xml->DetailedStatus[0]) ? (string) $v : null, + 'LastOperations' => (0 === ($v = $xml->LastOperations)->count()) ? null : $this->populateResultLastOperations($v), ]); } diff --git a/src/Service/CloudFormation/src/ValueObject/OperationEntry.php b/src/Service/CloudFormation/src/ValueObject/OperationEntry.php new file mode 100644 index 000000000..df0b16f10 --- /dev/null +++ b/src/Service/CloudFormation/src/ValueObject/OperationEntry.php @@ -0,0 +1,61 @@ +operationType = $input['OperationType'] ?? null; + $this->operationId = $input['OperationId'] ?? null; + } + + /** + * @param array{ + * OperationType?: OperationType::*|null, + * OperationId?: string|null, + * }|OperationEntry $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getOperationId(): ?string + { + return $this->operationId; + } + + /** + * @return OperationType::*|null + */ + public function getOperationType(): ?string + { + return $this->operationType; + } +} diff --git a/src/Service/CloudFormation/src/ValueObject/Stack.php b/src/Service/CloudFormation/src/ValueObject/Stack.php index 5bbf755f3..dac4597a3 100644 --- a/src/Service/CloudFormation/src/ValueObject/Stack.php +++ b/src/Service/CloudFormation/src/ValueObject/Stack.php @@ -224,6 +224,13 @@ final class Stack */ private $detailedStatus; + /** + * Information about the most recent operations performed on this stack. + * + * @var OperationEntry[]|null + */ + private $lastOperations; + /** * @param array{ * StackId?: string|null, @@ -251,6 +258,7 @@ final class Stack * RetainExceptOnCreate?: bool|null, * DeletionMode?: DeletionMode::*|null, * DetailedStatus?: DetailedStatus::*|null, + * LastOperations?: array|null, * } $input */ public function __construct(array $input) @@ -280,6 +288,7 @@ public function __construct(array $input) $this->retainExceptOnCreate = $input['RetainExceptOnCreate'] ?? null; $this->deletionMode = $input['DeletionMode'] ?? null; $this->detailedStatus = $input['DetailedStatus'] ?? null; + $this->lastOperations = isset($input['LastOperations']) ? array_map([OperationEntry::class, 'create'], $input['LastOperations']) : null; } /** @@ -309,6 +318,7 @@ public function __construct(array $input) * RetainExceptOnCreate?: bool|null, * DeletionMode?: DeletionMode::*|null, * DetailedStatus?: DetailedStatus::*|null, + * LastOperations?: array|null, * }|Stack $input */ public static function create($input): self @@ -375,6 +385,14 @@ public function getEnableTerminationProtection(): ?bool return $this->enableTerminationProtection; } + /** + * @return OperationEntry[] + */ + public function getLastOperations(): array + { + return $this->lastOperations ?? []; + } + public function getLastUpdatedTime(): ?\DateTimeImmutable { return $this->lastUpdatedTime; diff --git a/src/Service/CloudFormation/src/ValueObject/StackEvent.php b/src/Service/CloudFormation/src/ValueObject/StackEvent.php index 97c99468d..f79e2cc46 100644 --- a/src/Service/CloudFormation/src/ValueObject/StackEvent.php +++ b/src/Service/CloudFormation/src/ValueObject/StackEvent.php @@ -35,6 +35,13 @@ final class StackEvent */ private $stackName; + /** + * The unique identifier of the operation that generated this stack event. + * + * @var string|null + */ + private $operationId; + /** * The logical name of the resource specified in the template. * @@ -168,6 +175,7 @@ final class StackEvent * StackId: string, * EventId: string, * StackName: string, + * OperationId?: string|null, * LogicalResourceId?: string|null, * PhysicalResourceId?: string|null, * ResourceType?: string|null, @@ -190,6 +198,7 @@ public function __construct(array $input) $this->stackId = $input['StackId'] ?? $this->throwException(new InvalidArgument('Missing required field "StackId".')); $this->eventId = $input['EventId'] ?? $this->throwException(new InvalidArgument('Missing required field "EventId".')); $this->stackName = $input['StackName'] ?? $this->throwException(new InvalidArgument('Missing required field "StackName".')); + $this->operationId = $input['OperationId'] ?? null; $this->logicalResourceId = $input['LogicalResourceId'] ?? null; $this->physicalResourceId = $input['PhysicalResourceId'] ?? null; $this->resourceType = $input['ResourceType'] ?? null; @@ -212,6 +221,7 @@ public function __construct(array $input) * StackId: string, * EventId: string, * StackName: string, + * OperationId?: string|null, * LogicalResourceId?: string|null, * PhysicalResourceId?: string|null, * ResourceType?: string|null, @@ -296,6 +306,11 @@ public function getLogicalResourceId(): ?string return $this->logicalResourceId; } + public function getOperationId(): ?string + { + return $this->operationId; + } + public function getPhysicalResourceId(): ?string { return $this->physicalResourceId;