Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions src/Service/BedrockRuntime/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Service/BedrockRuntime/src/BedrockRuntimeClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
*
Expand Down
19 changes: 19 additions & 0 deletions src/Service/BedrockRuntime/src/Enum/ServiceTierType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace AsyncAws\BedrockRuntime\Enum;

final class ServiceTierType
{
public const DEFAULT = 'default';
public const FLEX = 'flex';
public const PRIORITY = 'priority';

public static function exists(string $value): bool
{
return isset([
self::DEFAULT => true,
self::FLEX => true,
self::PRIORITY => true,
][$value]);
}
}
35 changes: 35 additions & 0 deletions src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -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
*/
Expand All @@ -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);
}

Expand All @@ -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
*/
Expand Down Expand Up @@ -185,6 +196,14 @@ public function getPerformanceConfigLatency(): ?string
return $this->performanceConfigLatency;
}

/**
* @return ServiceTierType::*|null
*/
public function getServiceTier(): ?string
{
return $this->serviceTier;
}

/**
* @return Trace::*|null
*/
Expand Down Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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
*/
Expand Down
19 changes: 19 additions & 0 deletions src/Service/BedrockRuntime/src/Result/InvokeModelResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand All @@ -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();
}
Expand Down
1 change: 1 addition & 0 deletions src/Service/CloudFormation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. Also, a DeploymentMode parameter for the CreateChangeSet API that enables creation of drift-aware change sets for safe drift management.

### Dependency bumped

Expand Down
25 changes: 25 additions & 0 deletions src/Service/CloudFormation/src/Enum/OperationType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace AsyncAws\CloudFormation\Enum;

final class OperationType
{
public const CONTINUE_ROLLBACK = 'CONTINUE_ROLLBACK';
public const CREATE_CHANGESET = 'CREATE_CHANGESET';
public const CREATE_STACK = 'CREATE_STACK';
public const DELETE_STACK = 'DELETE_STACK';
public const ROLLBACK = 'ROLLBACK';
public const UPDATE_STACK = 'UPDATE_STACK';

public static function exists(string $value): bool
{
return isset([
self::CONTINUE_ROLLBACK => true,
self::CREATE_CHANGESET => true,
self::CREATE_STACK => true,
self::DELETE_STACK => true,
self::ROLLBACK => true,
self::UPDATE_STACK => true,
][$value]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
23 changes: 23 additions & 0 deletions src/Service/CloudFormation/src/Result/DescribeStacksOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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[]
*/
Expand All @@ -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([
Expand Down Expand Up @@ -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),
]);
}

Expand Down
61 changes: 61 additions & 0 deletions src/Service/CloudFormation/src/ValueObject/OperationEntry.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

namespace AsyncAws\CloudFormation\ValueObject;

use AsyncAws\CloudFormation\Enum\OperationType;

/**
* Contains information about a CloudFormation operation.
*/
final class OperationEntry
{
/**
* The type of operation.
*
* @var OperationType::*|null
*/
private $operationType;

/**
* The unique identifier for the operation.
*
* @var string|null
*/
private $operationId;

/**
* @param array{
* OperationType?: OperationType::*|null,
* OperationId?: string|null,
* } $input
*/
public function __construct(array $input)
{
$this->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;
}
}
18 changes: 18 additions & 0 deletions src/Service/CloudFormation/src/ValueObject/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -251,6 +258,7 @@ final class Stack
* RetainExceptOnCreate?: bool|null,
* DeletionMode?: DeletionMode::*|null,
* DetailedStatus?: DetailedStatus::*|null,
* LastOperations?: array<OperationEntry|array>|null,
* } $input
*/
public function __construct(array $input)
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -309,6 +318,7 @@ public function __construct(array $input)
* RetainExceptOnCreate?: bool|null,
* DeletionMode?: DeletionMode::*|null,
* DetailedStatus?: DetailedStatus::*|null,
* LastOperations?: array<OperationEntry|array>|null,
* }|Stack $input
*/
public static function create($input): self
Expand Down Expand Up @@ -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;
Expand Down
Loading