diff --git a/manifest.json b/manifest.json index bfd66314b..0970c7e82 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.348.1" + "${LATEST}": "3.348.2" }, "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 204aaa002..d28e7365e 100644 --- a/src/Service/BedrockRuntime/CHANGELOG.md +++ b/src/Service/BedrockRuntime/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- AWS enhancement: Documentation updates. + ## 1.1.0 ### Added diff --git a/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php b/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php index 24196e74e..bc99d2edc 100644 --- a/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php +++ b/src/Service/BedrockRuntime/src/Input/InvokeModelRequest.php @@ -48,9 +48,9 @@ final class InvokeModelRequest extends Input * see Supported Regions and models for cross-region inference [^2] in the Amazon Bedrock User Guide. * - If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run * inference using a Provisioned Throughput [^3] in the Amazon Bedrock User Guide. - * - If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting - * provisioned model. For more information, see Use a custom model in Amazon Bedrock [^4] in the Amazon Bedrock User - * Guide. + * - If you use a custom model, specify the ARN of the custom model deployment (for on-demand inference) or the ARN of + * your provisioned model (for Provisioned Throughput). For more information, see Use a custom model in Amazon Bedrock + * [^4] in the Amazon Bedrock User Guide. * - If you use an imported model [^5], specify the ARN of the imported model. You can get the model ARN from a * successful call to CreateModelImportJob [^6] or from the Imported models page in the Amazon Bedrock console. * diff --git a/src/Service/CloudFormation/CHANGELOG.md b/src/Service/CloudFormation/CHANGELOG.md index 4bbab8647..21ecf9ad9 100644 --- a/src/Service/CloudFormation/CHANGELOG.md +++ b/src/Service/CloudFormation/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Changed + +- AWS enhancement: Documentation updates. + ## 1.9.0 ### Added diff --git a/src/Service/CloudFormation/src/Result/DescribeStackDriftDetectionStatusOutput.php b/src/Service/CloudFormation/src/Result/DescribeStackDriftDetectionStatusOutput.php index 252659b28..865df49f8 100644 --- a/src/Service/CloudFormation/src/Result/DescribeStackDriftDetectionStatusOutput.php +++ b/src/Service/CloudFormation/src/Result/DescribeStackDriftDetectionStatusOutput.php @@ -33,7 +33,8 @@ class DescribeStackDriftDetectionStatusOutput extends Result * or more of its resources have drifted. * - `NOT_CHECKED`: CloudFormation hasn't checked if the stack differs from its expected template configuration. * - `IN_SYNC`: The stack's actual configuration matches its expected template configuration. - * - `UNKNOWN`: This value is reserved for future use. + * - `UNKNOWN`: CloudFormation could not run drift detection for a resource in the stack. See the + * `DetectionStatusReason` for details. * * @var StackDriftStatus::*|null */ diff --git a/src/Service/CloudFormation/src/ValueObject/RollbackConfiguration.php b/src/Service/CloudFormation/src/ValueObject/RollbackConfiguration.php index 6a10b5a48..f204adb46 100644 --- a/src/Service/CloudFormation/src/ValueObject/RollbackConfiguration.php +++ b/src/Service/CloudFormation/src/ValueObject/RollbackConfiguration.php @@ -3,7 +3,7 @@ namespace AsyncAws\CloudFormation\ValueObject; /** - * Structure containing the rollback triggers for CloudFormation to monitor during stack creation and updating + * Structure that contains the rollback triggers for CloudFormation to monitor during stack creation and updating * operations, and for the specified monitoring period afterwards. * * Rollback triggers enable you to have CloudFormation monitor the state of your application during stack creation and diff --git a/src/Service/CloudFormation/src/ValueObject/RollbackTrigger.php b/src/Service/CloudFormation/src/ValueObject/RollbackTrigger.php index 0fa4dae7c..e863491d9 100644 --- a/src/Service/CloudFormation/src/ValueObject/RollbackTrigger.php +++ b/src/Service/CloudFormation/src/ValueObject/RollbackTrigger.php @@ -24,8 +24,8 @@ final class RollbackTrigger * The resource type of the rollback trigger. Specify either AWS::CloudWatch::Alarm [^1] or * AWS::CloudWatch::CompositeAlarm [^2] resource types. * - * [^1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html - * [^2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-compositealarm.html + * [^1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-cloudwatch-alarm.html + * [^2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-cloudwatch-compositealarm.html * * @var string */ diff --git a/src/Service/CloudFormation/src/ValueObject/Stack.php b/src/Service/CloudFormation/src/ValueObject/Stack.php index 428b3a466..1e9a9e9ef 100644 --- a/src/Service/CloudFormation/src/ValueObject/Stack.php +++ b/src/Service/CloudFormation/src/ValueObject/Stack.php @@ -159,11 +159,10 @@ final class Stack private $enableTerminationProtection; /** - * For nested stacks--stacks created as resources for another stack--the stack ID of the direct parent of this stack. - * For the first level of nested stacks, the root stack is also the parent stack. + * For nested stacks, the stack ID of the direct parent of this stack. For the first level of nested stacks, the root + * stack is also the parent stack. * - * For more information, see Embed stacks within other stacks using nested stacks [^1] in the *CloudFormation User - * Guide*. + * For more information, see Nested stacks [^1] in the *CloudFormation User Guide*. * * [^1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html * @@ -172,11 +171,9 @@ final class Stack private $parentId; /** - * For nested stacks--stacks created as resources for another stack--the stack ID of the top-level stack to which the - * nested stack ultimately belongs. + * For nested stacks, the stack ID of the top-level stack to which the nested stack ultimately belongs. * - * For more information, see Embed stacks within other stacks using nested stacks [^1] in the *CloudFormation User - * Guide*. + * For more information, see Nested stacks [^1] in the *CloudFormation User Guide*. * * [^1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html * diff --git a/src/Service/CloudFormation/src/ValueObject/StackDriftInformation.php b/src/Service/CloudFormation/src/ValueObject/StackDriftInformation.php index f47c0b2d5..cbb06b036 100644 --- a/src/Service/CloudFormation/src/ValueObject/StackDriftInformation.php +++ b/src/Service/CloudFormation/src/ValueObject/StackDriftInformation.php @@ -19,7 +19,7 @@ final class StackDriftInformation * or more of its resources have drifted. * - `NOT_CHECKED`: CloudFormation hasn't checked if the stack differs from its expected template configuration. * - `IN_SYNC`: The stack's actual configuration matches its expected template configuration. - * - `UNKNOWN`: This value is reserved for future use. + * - `UNKNOWN`: CloudFormation could not run drift detection for a resource in the stack. * * @var StackDriftStatus::* */ diff --git a/src/Service/CloudFormation/src/ValueObject/StackEvent.php b/src/Service/CloudFormation/src/ValueObject/StackEvent.php index d5c6357d2..ad2c5d8a4 100644 --- a/src/Service/CloudFormation/src/ValueObject/StackEvent.php +++ b/src/Service/CloudFormation/src/ValueObject/StackEvent.php @@ -142,7 +142,7 @@ final class StackEvent private $hookFailureMode; /** - * An optional field containing information about the detailed status of the stack event. + * An optional field that contains information about the detailed status of the stack event. * * - `CONFIGURATION_COMPLETE` - all of the resources in the stack have reached that event. For more information, see * Understand CloudFormation stack creation events [^1] in the *CloudFormation User Guide*. diff --git a/src/Service/CloudFormation/src/ValueObject/Tag.php b/src/Service/CloudFormation/src/ValueObject/Tag.php index 22abcc5a7..e1cd13194 100644 --- a/src/Service/CloudFormation/src/ValueObject/Tag.php +++ b/src/Service/CloudFormation/src/ValueObject/Tag.php @@ -19,7 +19,8 @@ final class Tag private $key; /** - * *Required*. A string containing the value for this tag. You can specify a maximum of 256 characters for a tag value. + * *Required*. A string that contains the value for this tag. You can specify a maximum of 256 characters for a tag + * value. * * @var string */ diff --git a/src/Service/DynamoDb/CHANGELOG.md b/src/Service/DynamoDb/CHANGELOG.md index 846737034..1fd74b8d6 100644 --- a/src/Service/DynamoDb/CHANGELOG.md +++ b/src/Service/DynamoDb/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: This change adds support for witnesses in global tables. It also adds a new table status, REPLICATION_NOT_AUTHORIZED. This status will indicate scenarios where global replicas table can't be utilized for data plane operations. + ## 3.6.0 ### Added diff --git a/src/Service/DynamoDb/composer.json b/src/Service/DynamoDb/composer.json index 81b4ee065..bbd595c75 100644 --- a/src/Service/DynamoDb/composer.json +++ b/src/Service/DynamoDb/composer.json @@ -32,7 +32,7 @@ }, "extra": { "branch-alias": { - "dev-master": "3.6-dev" + "dev-master": "3.7-dev" } } } diff --git a/src/Service/DynamoDb/src/DynamoDbClient.php b/src/Service/DynamoDb/src/DynamoDbClient.php index 360461932..d3d72e130 100644 --- a/src/Service/DynamoDb/src/DynamoDbClient.php +++ b/src/Service/DynamoDb/src/DynamoDbClient.php @@ -73,6 +73,7 @@ use AsyncAws\DynamoDb\ValueObject\ExpectedAttributeValue; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndex; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexUpdate; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessGroupUpdate; use AsyncAws\DynamoDb\ValueObject\KeysAndAttributes; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndex; @@ -241,6 +242,7 @@ public function batchGetItem($input): BatchGetItemOutput * @throws InternalServerErrorException * @throws ItemCollectionSizeLimitExceededException * @throws ProvisionedThroughputExceededException + * @throws ReplicatedWriteConflictException * @throws RequestLimitExceededException * @throws ResourceNotFoundException */ @@ -251,6 +253,7 @@ public function batchWriteItem($input): BatchWriteItemOutput 'InternalServerError' => InternalServerErrorException::class, 'ItemCollectionSizeLimitExceededException' => ItemCollectionSizeLimitExceededException::class, 'ProvisionedThroughputExceededException' => ProvisionedThroughputExceededException::class, + 'ReplicatedWriteConflictException' => ReplicatedWriteConflictException::class, 'RequestLimitExceeded' => RequestLimitExceededException::class, 'ResourceNotFoundException' => ResourceNotFoundException::class, ], 'usesEndpointDiscovery' => true])); @@ -375,8 +378,6 @@ public function deleteItem($input): DeleteItemOutput * specified table does not exist, DynamoDB returns a `ResourceNotFoundException`. If table is already in the `DELETING` * state, no error is returned. * - * ! For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version). - * * > DynamoDB might continue to accept data read and write operations, such as `GetItem` and `PutItem`, on a table in * > the `DELETING` state until the table deletion is complete. For the full list of table states, see TableStatus [^1]. * @@ -440,8 +441,6 @@ public function describeEndpoints($input = []): DescribeEndpointsResponse * Returns information about the table, including the current status of the table, when it was created, the primary key * schema, and any indexes on the table. * - * ! For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version). - * * > If you issue a `DescribeTable` request immediately after a `CreateTable` request, DynamoDB might return a * > `ResourceNotFoundException`. This is because `DescribeTable` uses an eventually consistent query, and the metadata * > for your table might not be available at that moment. Wait for a few seconds, and then try the `DescribeTable` @@ -984,8 +983,6 @@ public function updateItem($input): UpdateItemOutput * Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given * table. * - * ! For global tables, this operation only applies to global tables using Version 2019.11.21 (Current version). - * * You can only perform one of the following operations at once: * * - Modify the provisioned throughput settings of the table. @@ -1012,6 +1009,7 @@ public function updateItem($input): UpdateItemOutput * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * MultiRegionConsistency?: null|MultiRegionConsistency::*, + * GlobalTableWitnessUpdates?: null|array, * OnDemandThroughput?: null|OnDemandThroughput|array, * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, diff --git a/src/Service/DynamoDb/src/Enum/ReplicaStatus.php b/src/Service/DynamoDb/src/Enum/ReplicaStatus.php index 2581d7074..db9be6839 100644 --- a/src/Service/DynamoDb/src/Enum/ReplicaStatus.php +++ b/src/Service/DynamoDb/src/Enum/ReplicaStatus.php @@ -5,22 +5,28 @@ final class ReplicaStatus { public const ACTIVE = 'ACTIVE'; + public const ARCHIVED = 'ARCHIVED'; + public const ARCHIVING = 'ARCHIVING'; public const CREATING = 'CREATING'; public const CREATION_FAILED = 'CREATION_FAILED'; public const DELETING = 'DELETING'; public const INACCESSIBLE_ENCRYPTION_CREDENTIALS = 'INACCESSIBLE_ENCRYPTION_CREDENTIALS'; public const REGION_DISABLED = 'REGION_DISABLED'; + public const REPLICATION_NOT_AUTHORIZED = 'REPLICATION_NOT_AUTHORIZED'; public const UPDATING = 'UPDATING'; public static function exists(string $value): bool { return isset([ self::ACTIVE => true, + self::ARCHIVED => true, + self::ARCHIVING => true, self::CREATING => true, self::CREATION_FAILED => true, self::DELETING => true, self::INACCESSIBLE_ENCRYPTION_CREDENTIALS => true, self::REGION_DISABLED => true, + self::REPLICATION_NOT_AUTHORIZED => true, self::UPDATING => true, ][$value]); } diff --git a/src/Service/DynamoDb/src/Enum/TableStatus.php b/src/Service/DynamoDb/src/Enum/TableStatus.php index 048e3d889..6cf1ccd9e 100644 --- a/src/Service/DynamoDb/src/Enum/TableStatus.php +++ b/src/Service/DynamoDb/src/Enum/TableStatus.php @@ -10,6 +10,7 @@ final class TableStatus public const CREATING = 'CREATING'; public const DELETING = 'DELETING'; public const INACCESSIBLE_ENCRYPTION_CREDENTIALS = 'INACCESSIBLE_ENCRYPTION_CREDENTIALS'; + public const REPLICATION_NOT_AUTHORIZED = 'REPLICATION_NOT_AUTHORIZED'; public const UPDATING = 'UPDATING'; public static function exists(string $value): bool @@ -21,6 +22,7 @@ public static function exists(string $value): bool self::CREATING => true, self::DELETING => true, self::INACCESSIBLE_ENCRYPTION_CREDENTIALS => true, + self::REPLICATION_NOT_AUTHORIZED => true, self::UPDATING => true, ][$value]); } diff --git a/src/Service/DynamoDb/src/Enum/WitnessStatus.php b/src/Service/DynamoDb/src/Enum/WitnessStatus.php new file mode 100644 index 000000000..ff9e38660 --- /dev/null +++ b/src/Service/DynamoDb/src/Enum/WitnessStatus.php @@ -0,0 +1,19 @@ + true, + self::CREATING => true, + self::DELETING => true, + ][$value]); + } +} diff --git a/src/Service/DynamoDb/src/Input/UpdateTableInput.php b/src/Service/DynamoDb/src/Input/UpdateTableInput.php index 28ef9125c..4d61f6541 100644 --- a/src/Service/DynamoDb/src/Input/UpdateTableInput.php +++ b/src/Service/DynamoDb/src/Input/UpdateTableInput.php @@ -11,6 +11,7 @@ use AsyncAws\DynamoDb\Enum\TableClass; use AsyncAws\DynamoDb\ValueObject\AttributeDefinition; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexUpdate; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessGroupUpdate; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; use AsyncAws\DynamoDb\ValueObject\ProvisionedThroughput; use AsyncAws\DynamoDb\ValueObject\ReplicationGroupUpdate; @@ -104,8 +105,6 @@ final class UpdateTableInput extends Input /** * A list of replica update actions (create, delete, or update) for the table. * - * > For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). - * * @var ReplicationGroupUpdate[]|null */ private $replicaUpdates; @@ -130,24 +129,39 @@ final class UpdateTableInput extends Input * * You can specify one of the following consistency modes: * - * - `EVENTUAL`: Configures a new global table for multi-Region eventual consistency. This is the default consistency - * mode for global tables. - * - `STRONG`: Configures a new global table for multi-Region strong consistency (preview). - * - * > Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview - * > mode. For more information, see Global tables multi-Region strong consistency [^3]. + * - `EVENTUAL`: Configures a new global table for multi-Region eventual consistency (MREC). This is the default + * consistency mode for global tables. + * - `STRONG`: Configures a new global table for multi-Region strong consistency (MRSC). * - * - * If you don't specify this parameter, the global table consistency mode defaults to `EVENTUAL`. + * If you don't specify this field, the global table consistency mode defaults to `EVENTUAL`. For more information about + * global tables consistency modes, see Consistency modes [^3] in DynamoDB developer guide. * * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ReplicationGroupUpdate.html#DDB-Type-ReplicationGroupUpdate-Create * [^2]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateTable.html#DDB-UpdateTable-request-ReplicaUpdates - * [^3]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt + * [^3]: https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes * * @var MultiRegionConsistency::*|null */ private $multiRegionConsistency; + /** + * A list of witness updates for a MRSC global table. A witness provides a cost-effective alternative to a full replica + * in a MRSC global table by maintaining replicated change data written to global table replicas. You cannot perform + * read or write operations on a witness. For each witness, you can request one action: + * + * - `Create` - add a new witness to the global table. + * - `Delete` - remove a witness from the global table. + * + * You can create or delete only one witness per `UpdateTable` operation. + * + * For more information, see Multi-Region strong consistency (MRSC) [^1] in the Amazon DynamoDB Developer Guide + * + * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes + * + * @var GlobalTableWitnessGroupUpdate[]|null + */ + private $globalTableWitnessUpdates; + /** * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use * this parameter, you must specify `MaxReadRequestUnits`, `MaxWriteRequestUnits`, or both. @@ -176,6 +190,7 @@ final class UpdateTableInput extends Input * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * MultiRegionConsistency?: null|MultiRegionConsistency::*, + * GlobalTableWitnessUpdates?: null|array, * OnDemandThroughput?: null|OnDemandThroughput|array, * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, @@ -194,6 +209,7 @@ public function __construct(array $input = []) $this->tableClass = $input['TableClass'] ?? null; $this->deletionProtectionEnabled = $input['DeletionProtectionEnabled'] ?? null; $this->multiRegionConsistency = $input['MultiRegionConsistency'] ?? null; + $this->globalTableWitnessUpdates = isset($input['GlobalTableWitnessUpdates']) ? array_map([GlobalTableWitnessGroupUpdate::class, 'create'], $input['GlobalTableWitnessUpdates']) : null; $this->onDemandThroughput = isset($input['OnDemandThroughput']) ? OnDemandThroughput::create($input['OnDemandThroughput']) : null; $this->warmThroughput = isset($input['WarmThroughput']) ? WarmThroughput::create($input['WarmThroughput']) : null; parent::__construct($input); @@ -212,6 +228,7 @@ public function __construct(array $input = []) * TableClass?: null|TableClass::*, * DeletionProtectionEnabled?: null|bool, * MultiRegionConsistency?: null|MultiRegionConsistency::*, + * GlobalTableWitnessUpdates?: null|array, * OnDemandThroughput?: null|OnDemandThroughput|array, * WarmThroughput?: null|WarmThroughput|array, * '@region'?: string|null, @@ -251,6 +268,14 @@ public function getGlobalSecondaryIndexUpdates(): array return $this->globalSecondaryIndexUpdates ?? []; } + /** + * @return GlobalTableWitnessGroupUpdate[] + */ + public function getGlobalTableWitnessUpdates(): array + { + return $this->globalTableWitnessUpdates ?? []; + } + /** * @return MultiRegionConsistency::*|null */ @@ -368,6 +393,16 @@ public function setGlobalSecondaryIndexUpdates(array $value): self return $this; } + /** + * @param GlobalTableWitnessGroupUpdate[] $value + */ + public function setGlobalTableWitnessUpdates(array $value): self + { + $this->globalTableWitnessUpdates = $value; + + return $this; + } + /** * @param MultiRegionConsistency::*|null $value */ @@ -501,6 +536,14 @@ private function requestBody(): array } $payload['MultiRegionConsistency'] = $v; } + if (null !== $v = $this->globalTableWitnessUpdates) { + $index = -1; + $payload['GlobalTableWitnessUpdates'] = []; + foreach ($v as $listValue) { + ++$index; + $payload['GlobalTableWitnessUpdates'][$index] = $listValue->requestBody(); + } + } if (null !== $v = $this->onDemandThroughput) { $payload['OnDemandThroughput'] = $v->requestBody(); } diff --git a/src/Service/DynamoDb/src/Result/CreateTableOutput.php b/src/Service/DynamoDb/src/Result/CreateTableOutput.php index b487133a5..7a8618881 100644 --- a/src/Service/DynamoDb/src/Result/CreateTableOutput.php +++ b/src/Service/DynamoDb/src/Result/CreateTableOutput.php @@ -9,6 +9,7 @@ use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -128,6 +129,27 @@ private function populateResultGlobalSecondaryIndexWarmThroughputDescription(arr ]); } + private function populateResultGlobalTableWitnessDescription(array $json): GlobalTableWitnessDescription + { + return new GlobalTableWitnessDescription([ + 'RegionName' => isset($json['RegionName']) ? (string) $json['RegionName'] : null, + 'WitnessStatus' => isset($json['WitnessStatus']) ? (string) $json['WitnessStatus'] : null, + ]); + } + + /** + * @return GlobalTableWitnessDescription[] + */ + private function populateResultGlobalTableWitnessDescriptionList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultGlobalTableWitnessDescription($item); + } + + return $items; + } + /** * @return KeySchemaElement[] */ @@ -341,6 +363,7 @@ private function populateResultTableDescription(array $json): TableDescription 'LatestStreamArn' => isset($json['LatestStreamArn']) ? (string) $json['LatestStreamArn'] : null, 'GlobalTableVersion' => isset($json['GlobalTableVersion']) ? (string) $json['GlobalTableVersion'] : null, 'Replicas' => !isset($json['Replicas']) ? null : $this->populateResultReplicaDescriptionList($json['Replicas']), + 'GlobalTableWitnesses' => !isset($json['GlobalTableWitnesses']) ? null : $this->populateResultGlobalTableWitnessDescriptionList($json['GlobalTableWitnesses']), 'RestoreSummary' => empty($json['RestoreSummary']) ? null : $this->populateResultRestoreSummary($json['RestoreSummary']), 'SSEDescription' => empty($json['SSEDescription']) ? null : $this->populateResultSSEDescription($json['SSEDescription']), 'ArchivalSummary' => empty($json['ArchivalSummary']) ? null : $this->populateResultArchivalSummary($json['ArchivalSummary']), diff --git a/src/Service/DynamoDb/src/Result/DeleteTableOutput.php b/src/Service/DynamoDb/src/Result/DeleteTableOutput.php index 9b97d18ae..345f20d40 100644 --- a/src/Service/DynamoDb/src/Result/DeleteTableOutput.php +++ b/src/Service/DynamoDb/src/Result/DeleteTableOutput.php @@ -9,6 +9,7 @@ use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -128,6 +129,27 @@ private function populateResultGlobalSecondaryIndexWarmThroughputDescription(arr ]); } + private function populateResultGlobalTableWitnessDescription(array $json): GlobalTableWitnessDescription + { + return new GlobalTableWitnessDescription([ + 'RegionName' => isset($json['RegionName']) ? (string) $json['RegionName'] : null, + 'WitnessStatus' => isset($json['WitnessStatus']) ? (string) $json['WitnessStatus'] : null, + ]); + } + + /** + * @return GlobalTableWitnessDescription[] + */ + private function populateResultGlobalTableWitnessDescriptionList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultGlobalTableWitnessDescription($item); + } + + return $items; + } + /** * @return KeySchemaElement[] */ @@ -341,6 +363,7 @@ private function populateResultTableDescription(array $json): TableDescription 'LatestStreamArn' => isset($json['LatestStreamArn']) ? (string) $json['LatestStreamArn'] : null, 'GlobalTableVersion' => isset($json['GlobalTableVersion']) ? (string) $json['GlobalTableVersion'] : null, 'Replicas' => !isset($json['Replicas']) ? null : $this->populateResultReplicaDescriptionList($json['Replicas']), + 'GlobalTableWitnesses' => !isset($json['GlobalTableWitnesses']) ? null : $this->populateResultGlobalTableWitnessDescriptionList($json['GlobalTableWitnesses']), 'RestoreSummary' => empty($json['RestoreSummary']) ? null : $this->populateResultRestoreSummary($json['RestoreSummary']), 'SSEDescription' => empty($json['SSEDescription']) ? null : $this->populateResultSSEDescription($json['SSEDescription']), 'ArchivalSummary' => empty($json['ArchivalSummary']) ? null : $this->populateResultArchivalSummary($json['ArchivalSummary']), diff --git a/src/Service/DynamoDb/src/Result/DescribeTableOutput.php b/src/Service/DynamoDb/src/Result/DescribeTableOutput.php index e21aa0c26..29482a078 100644 --- a/src/Service/DynamoDb/src/Result/DescribeTableOutput.php +++ b/src/Service/DynamoDb/src/Result/DescribeTableOutput.php @@ -9,6 +9,7 @@ use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -128,6 +129,27 @@ private function populateResultGlobalSecondaryIndexWarmThroughputDescription(arr ]); } + private function populateResultGlobalTableWitnessDescription(array $json): GlobalTableWitnessDescription + { + return new GlobalTableWitnessDescription([ + 'RegionName' => isset($json['RegionName']) ? (string) $json['RegionName'] : null, + 'WitnessStatus' => isset($json['WitnessStatus']) ? (string) $json['WitnessStatus'] : null, + ]); + } + + /** + * @return GlobalTableWitnessDescription[] + */ + private function populateResultGlobalTableWitnessDescriptionList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultGlobalTableWitnessDescription($item); + } + + return $items; + } + /** * @return KeySchemaElement[] */ @@ -341,6 +363,7 @@ private function populateResultTableDescription(array $json): TableDescription 'LatestStreamArn' => isset($json['LatestStreamArn']) ? (string) $json['LatestStreamArn'] : null, 'GlobalTableVersion' => isset($json['GlobalTableVersion']) ? (string) $json['GlobalTableVersion'] : null, 'Replicas' => !isset($json['Replicas']) ? null : $this->populateResultReplicaDescriptionList($json['Replicas']), + 'GlobalTableWitnesses' => !isset($json['GlobalTableWitnesses']) ? null : $this->populateResultGlobalTableWitnessDescriptionList($json['GlobalTableWitnesses']), 'RestoreSummary' => empty($json['RestoreSummary']) ? null : $this->populateResultRestoreSummary($json['RestoreSummary']), 'SSEDescription' => empty($json['SSEDescription']) ? null : $this->populateResultSSEDescription($json['SSEDescription']), 'ArchivalSummary' => empty($json['ArchivalSummary']) ? null : $this->populateResultArchivalSummary($json['ArchivalSummary']), diff --git a/src/Service/DynamoDb/src/Result/UpdateTableOutput.php b/src/Service/DynamoDb/src/Result/UpdateTableOutput.php index 529c11306..cf7ab2d23 100644 --- a/src/Service/DynamoDb/src/Result/UpdateTableOutput.php +++ b/src/Service/DynamoDb/src/Result/UpdateTableOutput.php @@ -9,6 +9,7 @@ use AsyncAws\DynamoDb\ValueObject\BillingModeSummary; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\GlobalSecondaryIndexWarmThroughputDescription; +use AsyncAws\DynamoDb\ValueObject\GlobalTableWitnessDescription; use AsyncAws\DynamoDb\ValueObject\KeySchemaElement; use AsyncAws\DynamoDb\ValueObject\LocalSecondaryIndexDescription; use AsyncAws\DynamoDb\ValueObject\OnDemandThroughput; @@ -128,6 +129,27 @@ private function populateResultGlobalSecondaryIndexWarmThroughputDescription(arr ]); } + private function populateResultGlobalTableWitnessDescription(array $json): GlobalTableWitnessDescription + { + return new GlobalTableWitnessDescription([ + 'RegionName' => isset($json['RegionName']) ? (string) $json['RegionName'] : null, + 'WitnessStatus' => isset($json['WitnessStatus']) ? (string) $json['WitnessStatus'] : null, + ]); + } + + /** + * @return GlobalTableWitnessDescription[] + */ + private function populateResultGlobalTableWitnessDescriptionList(array $json): array + { + $items = []; + foreach ($json as $item) { + $items[] = $this->populateResultGlobalTableWitnessDescription($item); + } + + return $items; + } + /** * @return KeySchemaElement[] */ @@ -341,6 +363,7 @@ private function populateResultTableDescription(array $json): TableDescription 'LatestStreamArn' => isset($json['LatestStreamArn']) ? (string) $json['LatestStreamArn'] : null, 'GlobalTableVersion' => isset($json['GlobalTableVersion']) ? (string) $json['GlobalTableVersion'] : null, 'Replicas' => !isset($json['Replicas']) ? null : $this->populateResultReplicaDescriptionList($json['Replicas']), + 'GlobalTableWitnesses' => !isset($json['GlobalTableWitnesses']) ? null : $this->populateResultGlobalTableWitnessDescriptionList($json['GlobalTableWitnesses']), 'RestoreSummary' => empty($json['RestoreSummary']) ? null : $this->populateResultRestoreSummary($json['RestoreSummary']), 'SSEDescription' => empty($json['SSEDescription']) ? null : $this->populateResultSSEDescription($json['SSEDescription']), 'ArchivalSummary' => empty($json['ArchivalSummary']) ? null : $this->populateResultArchivalSummary($json['ArchivalSummary']), diff --git a/src/Service/DynamoDb/src/ValueObject/CreateGlobalTableWitnessGroupMemberAction.php b/src/Service/DynamoDb/src/ValueObject/CreateGlobalTableWitnessGroupMemberAction.php new file mode 100644 index 000000000..7182bfd5f --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/CreateGlobalTableWitnessGroupMemberAction.php @@ -0,0 +1,69 @@ +regionName = $input['RegionName'] ?? $this->throwException(new InvalidArgument('Missing required field "RegionName".')); + } + + /** + * @param array{ + * RegionName: string, + * }|CreateGlobalTableWitnessGroupMemberAction $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getRegionName(): string + { + return $this->regionName; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + $v = $this->regionName; + $payload['RegionName'] = $v; + + return $payload; + } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/DeleteGlobalTableWitnessGroupMemberAction.php b/src/Service/DynamoDb/src/ValueObject/DeleteGlobalTableWitnessGroupMemberAction.php new file mode 100644 index 000000000..961210aff --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/DeleteGlobalTableWitnessGroupMemberAction.php @@ -0,0 +1,65 @@ +regionName = $input['RegionName'] ?? $this->throwException(new InvalidArgument('Missing required field "RegionName".')); + } + + /** + * @param array{ + * RegionName: string, + * }|DeleteGlobalTableWitnessGroupMemberAction $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getRegionName(): string + { + return $this->regionName; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + $v = $this->regionName; + $payload['RegionName'] = $v; + + return $payload; + } + + /** + * @return never + */ + private function throwException(\Throwable $exception) + { + throw $exception; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessDescription.php b/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessDescription.php new file mode 100644 index 000000000..a8afcc6d6 --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessDescription.php @@ -0,0 +1,61 @@ +regionName = $input['RegionName'] ?? null; + $this->witnessStatus = $input['WitnessStatus'] ?? null; + } + + /** + * @param array{ + * RegionName?: null|string, + * WitnessStatus?: null|WitnessStatus::*, + * }|GlobalTableWitnessDescription $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getRegionName(): ?string + { + return $this->regionName; + } + + /** + * @return WitnessStatus::*|null + */ + public function getWitnessStatus(): ?string + { + return $this->witnessStatus; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessGroupUpdate.php b/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessGroupUpdate.php new file mode 100644 index 000000000..f12547192 --- /dev/null +++ b/src/Service/DynamoDb/src/ValueObject/GlobalTableWitnessGroupUpdate.php @@ -0,0 +1,79 @@ +create = isset($input['Create']) ? CreateGlobalTableWitnessGroupMemberAction::create($input['Create']) : null; + $this->delete = isset($input['Delete']) ? DeleteGlobalTableWitnessGroupMemberAction::create($input['Delete']) : null; + } + + /** + * @param array{ + * Create?: null|CreateGlobalTableWitnessGroupMemberAction|array, + * Delete?: null|DeleteGlobalTableWitnessGroupMemberAction|array, + * }|GlobalTableWitnessGroupUpdate $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + public function getCreate(): ?CreateGlobalTableWitnessGroupMemberAction + { + return $this->create; + } + + public function getDelete(): ?DeleteGlobalTableWitnessGroupMemberAction + { + return $this->delete; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->create) { + $payload['Create'] = $v->requestBody(); + } + if (null !== $v = $this->delete) { + $payload['Delete'] = $v->requestBody(); + } + + return $payload; + } +} diff --git a/src/Service/DynamoDb/src/ValueObject/TableDescription.php b/src/Service/DynamoDb/src/ValueObject/TableDescription.php index b7f09cd98..edb3d6e92 100644 --- a/src/Service/DynamoDb/src/ValueObject/TableDescription.php +++ b/src/Service/DynamoDb/src/ValueObject/TableDescription.php @@ -263,6 +263,14 @@ final class TableDescription */ private $replicas; + /** + * The witness Region and its current status in the MRSC global table. Only one witness Region can be configured per + * MRSC global table. + * + * @var GlobalTableWitnessDescription[]|null + */ + private $globalTableWitnesses; + /** * Contains details for the restore. * @@ -316,16 +324,13 @@ final class TableDescription /** * Indicates one of the following consistency modes for a global table: * - * - `EVENTUAL`: Indicates that the global table is configured for multi-Region eventual consistency. - * - `STRONG`: Indicates that the global table is configured for multi-Region strong consistency (preview). - * - * > Multi-Region strong consistency (MRSC) is a new DynamoDB global tables capability currently available in preview - * > mode. For more information, see Global tables multi-Region strong consistency [^1]. - * + * - `EVENTUAL`: Indicates that the global table is configured for multi-Region eventual consistency (MREC). + * - `STRONG`: Indicates that the global table is configured for multi-Region strong consistency (MRSC). * - * If you don't specify this field, the global table consistency mode defaults to `EVENTUAL`. + * If you don't specify this field, the global table consistency mode defaults to `EVENTUAL`. For more information about + * global tables consistency modes, see Consistency modes [^1] in DynamoDB developer guide. * - * [^1]: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PreviewFeatures.html#multi-region-strong-consistency-gt + * [^1]: https://docs.aws.amazon.com/V2globaltables_HowItWorks.html#V2globaltables_HowItWorks.consistency-modes * * @var MultiRegionConsistency::*|null */ @@ -351,6 +356,7 @@ final class TableDescription * LatestStreamArn?: null|string, * GlobalTableVersion?: null|string, * Replicas?: null|array, + * GlobalTableWitnesses?: null|array, * RestoreSummary?: null|RestoreSummary|array, * SSEDescription?: null|SSEDescription|array, * ArchivalSummary?: null|ArchivalSummary|array, @@ -381,6 +387,7 @@ public function __construct(array $input) $this->latestStreamArn = $input['LatestStreamArn'] ?? null; $this->globalTableVersion = $input['GlobalTableVersion'] ?? null; $this->replicas = isset($input['Replicas']) ? array_map([ReplicaDescription::class, 'create'], $input['Replicas']) : null; + $this->globalTableWitnesses = isset($input['GlobalTableWitnesses']) ? array_map([GlobalTableWitnessDescription::class, 'create'], $input['GlobalTableWitnesses']) : null; $this->restoreSummary = isset($input['RestoreSummary']) ? RestoreSummary::create($input['RestoreSummary']) : null; $this->sseDescription = isset($input['SSEDescription']) ? SSEDescription::create($input['SSEDescription']) : null; $this->archivalSummary = isset($input['ArchivalSummary']) ? ArchivalSummary::create($input['ArchivalSummary']) : null; @@ -411,6 +418,7 @@ public function __construct(array $input) * LatestStreamArn?: null|string, * GlobalTableVersion?: null|string, * Replicas?: null|array, + * GlobalTableWitnesses?: null|array, * RestoreSummary?: null|RestoreSummary|array, * SSEDescription?: null|SSEDescription|array, * ArchivalSummary?: null|ArchivalSummary|array, @@ -467,6 +475,14 @@ public function getGlobalTableVersion(): ?string return $this->globalTableVersion; } + /** + * @return GlobalTableWitnessDescription[] + */ + public function getGlobalTableWitnesses(): array + { + return $this->globalTableWitnesses ?? []; + } + public function getItemCount(): ?int { return $this->itemCount; diff --git a/src/Service/Iam/CHANGELOG.md b/src/Service/Iam/CHANGELOG.md index d359a9e7e..613dc9e5a 100644 --- a/src/Service/Iam/CHANGELOG.md +++ b/src/Service/Iam/CHANGELOG.md @@ -2,6 +2,10 @@ ## NOT RELEASED +### Added + +- AWS api-change: Updated IAM ServiceSpecificCredential support to include expiration, API Key output format instead of username and password for services that will support API keys, and the ability to list credentials for all users in the account for a given service configuration. + ## 1.6.1 ### Changed diff --git a/src/Service/Iam/composer.json b/src/Service/Iam/composer.json index 9a3d9c7c0..30264004d 100644 --- a/src/Service/Iam/composer.json +++ b/src/Service/Iam/composer.json @@ -31,7 +31,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.6-dev" + "dev-master": "1.7-dev" } } } diff --git a/src/Service/Iam/src/Enum/StatusType.php b/src/Service/Iam/src/Enum/StatusType.php index d3719a656..c3a80ec8a 100644 --- a/src/Service/Iam/src/Enum/StatusType.php +++ b/src/Service/Iam/src/Enum/StatusType.php @@ -5,12 +5,14 @@ final class StatusType { public const ACTIVE = 'Active'; + public const EXPIRED = 'Expired'; public const INACTIVE = 'Inactive'; public static function exists(string $value): bool { return isset([ self::ACTIVE => true, + self::EXPIRED => true, self::INACTIVE => true, ][$value]); } diff --git a/src/Service/Iam/src/IamClient.php b/src/Service/Iam/src/IamClient.php index 4294721b1..d6d094f67 100644 --- a/src/Service/Iam/src/IamClient.php +++ b/src/Service/Iam/src/IamClient.php @@ -117,14 +117,16 @@ public function createAccessKey($input = []): CreateAccessKeyResponse * * You can have a maximum of two sets of service-specific credentials for each supported service per user. * - * You can create service-specific credentials for CodeCommit and Amazon Keyspaces (for Apache Cassandra). + * You can create service-specific credentials for Amazon Bedrock, CodeCommit and Amazon Keyspaces (for Apache + * Cassandra). * - * You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential. + * You can reset the password to a new service-generated value by calling ResetServiceSpecificCredential [^1]. * - * For more information about service-specific credentials, see Using IAM with CodeCommit: Git credentials, SSH keys, - * and Amazon Web Services access keys [^1] in the *IAM User Guide*. + * For more information about service-specific credentials, see Service-specific credentials for IAM users [^2] in the + * *IAM User Guide*. * - * [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ResetServiceSpecificCredential.html + * [^2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bedrock.html * * @see https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateServiceSpecificCredential.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-iam-2010-05-08.html#createservicespecificcredential @@ -132,6 +134,7 @@ public function createAccessKey($input = []): CreateAccessKeyResponse * @param array{ * UserName: string, * ServiceName: string, + * CredentialAgeDays?: null|int, * '@region'?: string|null, * }|CreateServiceSpecificCredentialRequest $input * @@ -254,17 +257,27 @@ public function deleteServiceSpecificCredential($input): Result * programmatically, you must delete the items attached to the user manually, or the deletion fails. For more * information, see Deleting an IAM user [^1]. Before attempting to delete a user, remove the following items: * - * - Password (DeleteLoginProfile) - * - Access keys (DeleteAccessKey) - * - Signing certificate (DeleteSigningCertificate) - * - SSH public key (DeleteSSHPublicKey) - * - Git credentials (DeleteServiceSpecificCredential) - * - Multi-factor authentication (MFA) device (DeactivateMFADevice, DeleteVirtualMFADevice) - * - Inline policies (DeleteUserPolicy) - * - Attached managed policies (DetachUserPolicy) - * - Group memberships (RemoveUserFromGroup) + * - Password (DeleteLoginProfile [^2]) + * - Access keys (DeleteAccessKey [^3]) + * - Signing certificate (DeleteSigningCertificate [^4]) + * - SSH public key (DeleteSSHPublicKey [^5]) + * - Git credentials (DeleteServiceSpecificCredential [^6]) + * - Multi-factor authentication (MFA) device (DeactivateMFADevice [^7], DeleteVirtualMFADevice [^8]) + * - Inline policies (DeleteUserPolicy [^9]) + * - Attached managed policies (DetachUserPolicy [^10]) + * - Group memberships (RemoveUserFromGroup [^11]) * * [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_manage.html#id_users_deleting_cli + * [^2]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteLoginProfile.html + * [^3]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteAccessKey.html + * [^4]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteSigningCertificate.html + * [^5]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteSSHPublicKey.html + * [^6]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteServiceSpecificCredential.html + * [^7]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeactivateMFADevice.html + * [^8]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteVirtualMFADevice.html + * [^9]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUserPolicy.html + * [^10]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DetachUserPolicy.html + * [^11]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_RemoveUserFromGroup.html * * @see https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUser.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-iam-2010-05-08.html#deleteuser @@ -297,10 +310,12 @@ public function deleteUser($input): Result /** * Deletes the specified inline policy that is embedded in the specified IAM user. * - * A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy. - * For more information about policies, refer to Managed policies and inline policies [^1] in the *IAM User Guide*. + * A user can also have managed policies attached to it. To detach a managed policy from a user, use DetachUserPolicy + * [^1]. For more information about policies, refer to Managed policies and inline policies [^2] in the *IAM User + * Guide*. * - * [^1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_DetachUserPolicy.html + * [^2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html * * @see https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUserPolicy.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-iam-2010-05-08.html#deleteuserpolicy @@ -370,6 +385,9 @@ public function getUser($input = []): GetUserResponse * @param array{ * UserName?: null|string, * ServiceName?: null|string, + * AllUsers?: null|bool, + * Marker?: null|string, + * MaxItems?: null|int, * '@region'?: string|null, * }|ListServiceSpecificCredentialsRequest $input * @@ -397,10 +415,12 @@ public function listServiceSpecificCredentials($input = []): ListServiceSpecific * > - PermissionsBoundary * > - Tags * > - * > To view all of the information for a user, see GetUser. + * > To view all of the information for a user, see GetUser [^1]. * * You can paginate the results using the `MaxItems` and `Marker` parameters. * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html + * * @see https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html * @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-iam-2010-05-08.html#listusers * diff --git a/src/Service/Iam/src/Input/CreateServiceSpecificCredentialRequest.php b/src/Service/Iam/src/Input/CreateServiceSpecificCredentialRequest.php index ab2f1d012..dc561ba5e 100644 --- a/src/Service/Iam/src/Input/CreateServiceSpecificCredentialRequest.php +++ b/src/Service/Iam/src/Input/CreateServiceSpecificCredentialRequest.php @@ -34,10 +34,19 @@ final class CreateServiceSpecificCredentialRequest extends Input */ private $serviceName; + /** + * The number of days until the service specific credential expires. This field is only valid for Bedrock API keys and + * must be a positive integer. When not specified, the credential will not expire. + * + * @var int|null + */ + private $credentialAgeDays; + /** * @param array{ * UserName?: string, * ServiceName?: string, + * CredentialAgeDays?: null|int, * '@region'?: string|null, * } $input */ @@ -45,6 +54,7 @@ public function __construct(array $input = []) { $this->userName = $input['UserName'] ?? null; $this->serviceName = $input['ServiceName'] ?? null; + $this->credentialAgeDays = $input['CredentialAgeDays'] ?? null; parent::__construct($input); } @@ -52,6 +62,7 @@ public function __construct(array $input = []) * @param array{ * UserName?: string, * ServiceName?: string, + * CredentialAgeDays?: null|int, * '@region'?: string|null, * }|CreateServiceSpecificCredentialRequest $input */ @@ -60,6 +71,11 @@ public static function create($input): self return $input instanceof self ? $input : new self($input); } + public function getCredentialAgeDays(): ?int + { + return $this->credentialAgeDays; + } + public function getServiceName(): ?string { return $this->serviceName; @@ -91,6 +107,13 @@ public function request(): Request return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body)); } + public function setCredentialAgeDays(?int $value): self + { + $this->credentialAgeDays = $value; + + return $this; + } + public function setServiceName(?string $value): self { $this->serviceName = $value; @@ -116,6 +139,9 @@ private function requestBody(): array throw new InvalidArgument(\sprintf('Missing parameter "ServiceName" for "%s". The value cannot be null.', __CLASS__)); } $payload['ServiceName'] = $v; + if (null !== $v = $this->credentialAgeDays) { + $payload['CredentialAgeDays'] = $v; + } return $payload; } diff --git a/src/Service/Iam/src/Input/DeleteServiceSpecificCredentialRequest.php b/src/Service/Iam/src/Input/DeleteServiceSpecificCredentialRequest.php index 3117804c6..77c12b914 100644 --- a/src/Service/Iam/src/Input/DeleteServiceSpecificCredentialRequest.php +++ b/src/Service/Iam/src/Input/DeleteServiceSpecificCredentialRequest.php @@ -24,12 +24,13 @@ final class DeleteServiceSpecificCredentialRequest extends Input /** * The unique identifier of the service-specific credential. You can get this value by calling - * ListServiceSpecificCredentials. + * ListServiceSpecificCredentials [^1]. * - * This parameter allows (through its regex pattern [^1]) a string of characters that can consist of any upper or + * This parameter allows (through its regex pattern [^2]) a string of characters that can consist of any upper or * lowercased letter or digit. * - * [^1]: http://wikipedia.org/wiki/regex + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListServiceSpecificCredentials.html + * [^2]: http://wikipedia.org/wiki/regex * * @required * diff --git a/src/Service/Iam/src/Input/ListServiceSpecificCredentialsRequest.php b/src/Service/Iam/src/Input/ListServiceSpecificCredentialsRequest.php index 81278cc2f..9e6694095 100644 --- a/src/Service/Iam/src/Input/ListServiceSpecificCredentialsRequest.php +++ b/src/Service/Iam/src/Input/ListServiceSpecificCredentialsRequest.php @@ -29,10 +29,38 @@ final class ListServiceSpecificCredentialsRequest extends Input */ private $serviceName; + /** + * A flag indicating whether to list service specific credentials for all users. This parameter cannot be specified + * together with UserName. When true, returns all credentials associated with the specified service. + * + * @var bool|null + */ + private $allUsers; + + /** + * Use this parameter only when paginating results and only after you receive a response indicating that the results are + * truncated. Set it to the value of the Marker from the response that you received to indicate where the next call + * should start. + * + * @var string|null + */ + private $marker; + + /** + * Use this only when paginating results to indicate the maximum number of items you want in the response. If additional + * items exist beyond the maximum you specify, the IsTruncated response element is true. + * + * @var int|null + */ + private $maxItems; + /** * @param array{ * UserName?: null|string, * ServiceName?: null|string, + * AllUsers?: null|bool, + * Marker?: null|string, + * MaxItems?: null|int, * '@region'?: string|null, * } $input */ @@ -40,6 +68,9 @@ public function __construct(array $input = []) { $this->userName = $input['UserName'] ?? null; $this->serviceName = $input['ServiceName'] ?? null; + $this->allUsers = $input['AllUsers'] ?? null; + $this->marker = $input['Marker'] ?? null; + $this->maxItems = $input['MaxItems'] ?? null; parent::__construct($input); } @@ -47,6 +78,9 @@ public function __construct(array $input = []) * @param array{ * UserName?: null|string, * ServiceName?: null|string, + * AllUsers?: null|bool, + * Marker?: null|string, + * MaxItems?: null|int, * '@region'?: string|null, * }|ListServiceSpecificCredentialsRequest $input */ @@ -55,6 +89,21 @@ public static function create($input): self return $input instanceof self ? $input : new self($input); } + public function getAllUsers(): ?bool + { + return $this->allUsers; + } + + public function getMarker(): ?string + { + return $this->marker; + } + + public function getMaxItems(): ?int + { + return $this->maxItems; + } + public function getServiceName(): ?string { return $this->serviceName; @@ -86,6 +135,27 @@ public function request(): Request return new Request('POST', $uriString, $query, $headers, StreamFactory::create($body)); } + public function setAllUsers(?bool $value): self + { + $this->allUsers = $value; + + return $this; + } + + public function setMarker(?string $value): self + { + $this->marker = $value; + + return $this; + } + + public function setMaxItems(?int $value): self + { + $this->maxItems = $value; + + return $this; + } + public function setServiceName(?string $value): self { $this->serviceName = $value; @@ -109,6 +179,15 @@ private function requestBody(): array if (null !== $v = $this->serviceName) { $payload['ServiceName'] = $v; } + if (null !== $v = $this->allUsers) { + $payload['AllUsers'] = $v ? 'true' : 'false'; + } + if (null !== $v = $this->marker) { + $payload['Marker'] = $v; + } + if (null !== $v = $this->maxItems) { + $payload['MaxItems'] = $v; + } return $payload; } diff --git a/src/Service/Iam/src/Result/CreateAccessKeyResponse.php b/src/Service/Iam/src/Result/CreateAccessKeyResponse.php index 3195bf07b..8f506094a 100644 --- a/src/Service/Iam/src/Result/CreateAccessKeyResponse.php +++ b/src/Service/Iam/src/Result/CreateAccessKeyResponse.php @@ -7,7 +7,9 @@ use AsyncAws\Iam\ValueObject\AccessKey; /** - * Contains the response to a successful CreateAccessKey request. + * Contains the response to a successful CreateAccessKey [^1] request. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html */ class CreateAccessKeyResponse extends Result { diff --git a/src/Service/Iam/src/Result/CreateServiceSpecificCredentialResponse.php b/src/Service/Iam/src/Result/CreateServiceSpecificCredentialResponse.php index 4390623ae..0e5f4358f 100644 --- a/src/Service/Iam/src/Result/CreateServiceSpecificCredentialResponse.php +++ b/src/Service/Iam/src/Result/CreateServiceSpecificCredentialResponse.php @@ -12,7 +12,9 @@ class CreateServiceSpecificCredentialResponse extends Result * A structure that contains information about the newly created service-specific credential. * * ! This is the only time that the password for this credential set is available. It cannot be recovered later. - * ! Instead, you must reset the password with ResetServiceSpecificCredential. + * ! Instead, you must reset the password with ResetServiceSpecificCredential [^1]. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ResetServiceSpecificCredential.html * * @var ServiceSpecificCredential|null */ @@ -37,9 +39,12 @@ private function populateResultServiceSpecificCredential(\SimpleXMLElement $xml) { return new ServiceSpecificCredential([ 'CreateDate' => new \DateTimeImmutable((string) $xml->CreateDate), + 'ExpirationDate' => (null !== $v = $xml->ExpirationDate[0]) ? new \DateTimeImmutable((string) $v) : null, 'ServiceName' => (string) $xml->ServiceName, - 'ServiceUserName' => (string) $xml->ServiceUserName, - 'ServicePassword' => (string) $xml->ServicePassword, + 'ServiceUserName' => (null !== $v = $xml->ServiceUserName[0]) ? (string) $v : null, + 'ServicePassword' => (null !== $v = $xml->ServicePassword[0]) ? (string) $v : null, + 'ServiceCredentialAlias' => (null !== $v = $xml->ServiceCredentialAlias[0]) ? (string) $v : null, + 'ServiceCredentialSecret' => (null !== $v = $xml->ServiceCredentialSecret[0]) ? (string) $v : null, 'ServiceSpecificCredentialId' => (string) $xml->ServiceSpecificCredentialId, 'UserName' => (string) $xml->UserName, 'Status' => (string) $xml->Status, diff --git a/src/Service/Iam/src/Result/CreateUserResponse.php b/src/Service/Iam/src/Result/CreateUserResponse.php index 828657494..5ea5c15f7 100644 --- a/src/Service/Iam/src/Result/CreateUserResponse.php +++ b/src/Service/Iam/src/Result/CreateUserResponse.php @@ -9,7 +9,9 @@ use AsyncAws\Iam\ValueObject\User; /** - * Contains the response to a successful CreateUser request. + * Contains the response to a successful CreateUser [^1] request. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html */ class CreateUserResponse extends Result { diff --git a/src/Service/Iam/src/Result/GetUserResponse.php b/src/Service/Iam/src/Result/GetUserResponse.php index 60b0eb5f6..216232db9 100644 --- a/src/Service/Iam/src/Result/GetUserResponse.php +++ b/src/Service/Iam/src/Result/GetUserResponse.php @@ -9,7 +9,9 @@ use AsyncAws\Iam\ValueObject\User; /** - * Contains the response to a successful GetUser request. + * Contains the response to a successful GetUser [^1] request. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html */ class GetUserResponse extends Result { diff --git a/src/Service/Iam/src/Result/ListServiceSpecificCredentialsResponse.php b/src/Service/Iam/src/Result/ListServiceSpecificCredentialsResponse.php index 311cc8c04..d4191f82e 100644 --- a/src/Service/Iam/src/Result/ListServiceSpecificCredentialsResponse.php +++ b/src/Service/Iam/src/Result/ListServiceSpecificCredentialsResponse.php @@ -15,6 +15,36 @@ class ListServiceSpecificCredentialsResponse extends Result */ private $serviceSpecificCredentials; + /** + * When IsTruncated is true, this element is present and contains the value to use for the Marker parameter in a + * subsequent pagination request. + * + * @var string|null + */ + private $marker; + + /** + * A flag that indicates whether there are more items to return. If your results were truncated, you can make a + * subsequent pagination request using the Marker request parameter to retrieve more items. + * + * @var bool|null + */ + private $isTruncated; + + public function getIsTruncated(): ?bool + { + $this->initialize(); + + return $this->isTruncated; + } + + public function getMarker(): ?string + { + $this->initialize(); + + return $this->marker; + } + /** * @return ServiceSpecificCredentialMetadata[] */ @@ -31,6 +61,8 @@ protected function populateResult(Response $response): void $data = $data->ListServiceSpecificCredentialsResult; $this->serviceSpecificCredentials = (0 === ($v = $data->ServiceSpecificCredentials)->count()) ? [] : $this->populateResultServiceSpecificCredentialsListType($v); + $this->marker = (null !== $v = $data->Marker[0]) ? (string) $v : null; + $this->isTruncated = (null !== $v = $data->IsTruncated[0]) ? filter_var((string) $v, \FILTER_VALIDATE_BOOLEAN) : null; } private function populateResultServiceSpecificCredentialMetadata(\SimpleXMLElement $xml): ServiceSpecificCredentialMetadata @@ -38,8 +70,10 @@ private function populateResultServiceSpecificCredentialMetadata(\SimpleXMLEleme return new ServiceSpecificCredentialMetadata([ 'UserName' => (string) $xml->UserName, 'Status' => (string) $xml->Status, - 'ServiceUserName' => (string) $xml->ServiceUserName, + 'ServiceUserName' => (null !== $v = $xml->ServiceUserName[0]) ? (string) $v : null, + 'ServiceCredentialAlias' => (null !== $v = $xml->ServiceCredentialAlias[0]) ? (string) $v : null, 'CreateDate' => new \DateTimeImmutable((string) $xml->CreateDate), + 'ExpirationDate' => (null !== $v = $xml->ExpirationDate[0]) ? new \DateTimeImmutable((string) $v) : null, 'ServiceSpecificCredentialId' => (string) $xml->ServiceSpecificCredentialId, 'ServiceName' => (string) $xml->ServiceName, ]); diff --git a/src/Service/Iam/src/Result/ListUsersResponse.php b/src/Service/Iam/src/Result/ListUsersResponse.php index 8d2c14ace..20bd6760e 100644 --- a/src/Service/Iam/src/Result/ListUsersResponse.php +++ b/src/Service/Iam/src/Result/ListUsersResponse.php @@ -12,7 +12,9 @@ use AsyncAws\Iam\ValueObject\User; /** - * Contains the response to a successful ListUsers request. + * Contains the response to a successful ListUsers [^1] request. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html * * @implements \IteratorAggregate */ diff --git a/src/Service/Iam/src/ValueObject/AccessKey.php b/src/Service/Iam/src/ValueObject/AccessKey.php index 629c5fc91..d5b198a15 100644 --- a/src/Service/Iam/src/ValueObject/AccessKey.php +++ b/src/Service/Iam/src/ValueObject/AccessKey.php @@ -8,11 +8,15 @@ /** * Contains information about an Amazon Web Services access key. * - * This data type is used as a response element in the CreateAccessKey and ListAccessKeys operations. + * This data type is used as a response element in the CreateAccessKey [^1] and ListAccessKeys [^2] operations. * - * > The `SecretAccessKey` value is returned only in response to CreateAccessKey. You can get a secret access key only - * > when you first create an access key; you cannot recover the secret access key later. If you lose a secret access - * > key, you must create a new access key. + * > The `SecretAccessKey` value is returned only in response to CreateAccessKey [^3]. You can get a secret access key + * > only when you first create an access key; you cannot recover the secret access key later. If you lose a secret + * > access key, you must create a new access key. + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html + * [^2]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListAccessKeys.html + * [^3]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateAccessKey.html */ final class AccessKey { diff --git a/src/Service/Iam/src/ValueObject/ServiceSpecificCredential.php b/src/Service/Iam/src/ValueObject/ServiceSpecificCredential.php index 89355491d..c27acbd26 100644 --- a/src/Service/Iam/src/ValueObject/ServiceSpecificCredential.php +++ b/src/Service/Iam/src/ValueObject/ServiceSpecificCredential.php @@ -19,6 +19,14 @@ final class ServiceSpecificCredential */ private $createDate; + /** + * The date and time when the service specific credential expires. This field is only present for Bedrock API keys that + * were created with an expiration period. + * + * @var \DateTimeImmutable|null + */ + private $expirationDate; + /** * The name of the service associated with the service-specific credential. * @@ -31,17 +39,33 @@ final class ServiceSpecificCredential * combined with the ID number of the Amazon Web Services account, as in `jane-at-123456789012`, for example. This value * cannot be configured by the user. * - * @var string + * @var string|null */ private $serviceUserName; /** * The generated password for the service-specific credential. * - * @var string + * @var string|null */ private $servicePassword; + /** + * For Bedrock API keys, this is the public portion of the credential that includes the IAM user name and a suffix + * containing version and creation information. + * + * @var string|null + */ + private $serviceCredentialAlias; + + /** + * For Bedrock API keys, this is the secret portion of the credential that should be used to authenticate API calls. + * This value is returned only when the credential is created. + * + * @var string|null + */ + private $serviceCredentialSecret; + /** * The unique identifier for the service-specific credential. * @@ -67,9 +91,12 @@ final class ServiceSpecificCredential /** * @param array{ * CreateDate: \DateTimeImmutable, + * ExpirationDate?: null|\DateTimeImmutable, * ServiceName: string, - * ServiceUserName: string, - * ServicePassword: string, + * ServiceUserName?: null|string, + * ServicePassword?: null|string, + * ServiceCredentialAlias?: null|string, + * ServiceCredentialSecret?: null|string, * ServiceSpecificCredentialId: string, * UserName: string, * Status: StatusType::*, @@ -78,9 +105,12 @@ final class ServiceSpecificCredential public function __construct(array $input) { $this->createDate = $input['CreateDate'] ?? $this->throwException(new InvalidArgument('Missing required field "CreateDate".')); + $this->expirationDate = $input['ExpirationDate'] ?? null; $this->serviceName = $input['ServiceName'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceName".')); - $this->serviceUserName = $input['ServiceUserName'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceUserName".')); - $this->servicePassword = $input['ServicePassword'] ?? $this->throwException(new InvalidArgument('Missing required field "ServicePassword".')); + $this->serviceUserName = $input['ServiceUserName'] ?? null; + $this->servicePassword = $input['ServicePassword'] ?? null; + $this->serviceCredentialAlias = $input['ServiceCredentialAlias'] ?? null; + $this->serviceCredentialSecret = $input['ServiceCredentialSecret'] ?? null; $this->serviceSpecificCredentialId = $input['ServiceSpecificCredentialId'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceSpecificCredentialId".')); $this->userName = $input['UserName'] ?? $this->throwException(new InvalidArgument('Missing required field "UserName".')); $this->status = $input['Status'] ?? $this->throwException(new InvalidArgument('Missing required field "Status".')); @@ -89,9 +119,12 @@ public function __construct(array $input) /** * @param array{ * CreateDate: \DateTimeImmutable, + * ExpirationDate?: null|\DateTimeImmutable, * ServiceName: string, - * ServiceUserName: string, - * ServicePassword: string, + * ServiceUserName?: null|string, + * ServicePassword?: null|string, + * ServiceCredentialAlias?: null|string, + * ServiceCredentialSecret?: null|string, * ServiceSpecificCredentialId: string, * UserName: string, * Status: StatusType::*, @@ -107,12 +140,27 @@ public function getCreateDate(): \DateTimeImmutable return $this->createDate; } + public function getExpirationDate(): ?\DateTimeImmutable + { + return $this->expirationDate; + } + + public function getServiceCredentialAlias(): ?string + { + return $this->serviceCredentialAlias; + } + + public function getServiceCredentialSecret(): ?string + { + return $this->serviceCredentialSecret; + } + public function getServiceName(): string { return $this->serviceName; } - public function getServicePassword(): string + public function getServicePassword(): ?string { return $this->servicePassword; } @@ -122,7 +170,7 @@ public function getServiceSpecificCredentialId(): string return $this->serviceSpecificCredentialId; } - public function getServiceUserName(): string + public function getServiceUserName(): ?string { return $this->serviceUserName; } diff --git a/src/Service/Iam/src/ValueObject/ServiceSpecificCredentialMetadata.php b/src/Service/Iam/src/ValueObject/ServiceSpecificCredentialMetadata.php index d45e307b2..2bcfb710c 100644 --- a/src/Service/Iam/src/ValueObject/ServiceSpecificCredentialMetadata.php +++ b/src/Service/Iam/src/ValueObject/ServiceSpecificCredentialMetadata.php @@ -28,10 +28,18 @@ final class ServiceSpecificCredentialMetadata /** * The generated user name for the service-specific credential. * - * @var string + * @var string|null */ private $serviceUserName; + /** + * For Bedrock API keys, this is the public portion of the credential that includes the IAM user name and a suffix + * containing version and creation information. + * + * @var string|null + */ + private $serviceCredentialAlias; + /** * The date and time, in ISO 8601 date-time format [^1], when the service-specific credential were created. * @@ -41,6 +49,14 @@ final class ServiceSpecificCredentialMetadata */ private $createDate; + /** + * The date and time when the service specific credential expires. This field is only present for Bedrock API keys that + * were created with an expiration period. + * + * @var \DateTimeImmutable|null + */ + private $expirationDate; + /** * The unique identifier for the service-specific credential. * @@ -59,8 +75,10 @@ final class ServiceSpecificCredentialMetadata * @param array{ * UserName: string, * Status: StatusType::*, - * ServiceUserName: string, + * ServiceUserName?: null|string, + * ServiceCredentialAlias?: null|string, * CreateDate: \DateTimeImmutable, + * ExpirationDate?: null|\DateTimeImmutable, * ServiceSpecificCredentialId: string, * ServiceName: string, * } $input @@ -69,8 +87,10 @@ public function __construct(array $input) { $this->userName = $input['UserName'] ?? $this->throwException(new InvalidArgument('Missing required field "UserName".')); $this->status = $input['Status'] ?? $this->throwException(new InvalidArgument('Missing required field "Status".')); - $this->serviceUserName = $input['ServiceUserName'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceUserName".')); + $this->serviceUserName = $input['ServiceUserName'] ?? null; + $this->serviceCredentialAlias = $input['ServiceCredentialAlias'] ?? null; $this->createDate = $input['CreateDate'] ?? $this->throwException(new InvalidArgument('Missing required field "CreateDate".')); + $this->expirationDate = $input['ExpirationDate'] ?? null; $this->serviceSpecificCredentialId = $input['ServiceSpecificCredentialId'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceSpecificCredentialId".')); $this->serviceName = $input['ServiceName'] ?? $this->throwException(new InvalidArgument('Missing required field "ServiceName".')); } @@ -79,8 +99,10 @@ public function __construct(array $input) * @param array{ * UserName: string, * Status: StatusType::*, - * ServiceUserName: string, + * ServiceUserName?: null|string, + * ServiceCredentialAlias?: null|string, * CreateDate: \DateTimeImmutable, + * ExpirationDate?: null|\DateTimeImmutable, * ServiceSpecificCredentialId: string, * ServiceName: string, * }|ServiceSpecificCredentialMetadata $input @@ -95,6 +117,16 @@ public function getCreateDate(): \DateTimeImmutable return $this->createDate; } + public function getExpirationDate(): ?\DateTimeImmutable + { + return $this->expirationDate; + } + + public function getServiceCredentialAlias(): ?string + { + return $this->serviceCredentialAlias; + } + public function getServiceName(): string { return $this->serviceName; @@ -105,7 +137,7 @@ public function getServiceSpecificCredentialId(): string return $this->serviceSpecificCredentialId; } - public function getServiceUserName(): string + public function getServiceUserName(): ?string { return $this->serviceUserName; } diff --git a/src/Service/Iam/src/ValueObject/Tag.php b/src/Service/Iam/src/ValueObject/Tag.php index 059157c68..cf240af8a 100644 --- a/src/Service/Iam/src/ValueObject/Tag.php +++ b/src/Service/Iam/src/ValueObject/Tag.php @@ -26,9 +26,6 @@ final class Tag * of the number associated with the different cost centers in your company. Typically, many resources have tags with * the same key name but with different values. * - * > Amazon Web Services always interprets the tag `Value` as a single string. If you need to store an array, you can - * > store comma-separated values in the string. However, you must interpret the value in your code. - * * @var string */ private $value; diff --git a/src/Service/Iam/src/ValueObject/User.php b/src/Service/Iam/src/ValueObject/User.php index e6285f613..bc440eea1 100644 --- a/src/Service/Iam/src/ValueObject/User.php +++ b/src/Service/Iam/src/ValueObject/User.php @@ -9,9 +9,13 @@ * * This data type is used as a response element in the following operations: * - * - CreateUser - * - GetUser - * - ListUsers + * - CreateUser [^1] + * - GetUser [^2] + * - ListUsers [^3] + * + * [^1]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateUser.html + * [^2]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html + * [^3]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html */ final class User { @@ -75,10 +79,12 @@ final class User * A null value does not mean that the user *never* had a password. Also, if the user does not currently have a password * but had one in the past, then this field contains the date and time the most recent password was used. * - * This value is returned only in the GetUser and ListUsers operations. + * This value is returned only in the GetUser [^3] and ListUsers [^4] operations. * * [^1]: http://www.iso.org/iso/iso8601 * [^2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/credential-reports.html + * [^3]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetUser.html + * [^4]: https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListUsers.html * * @var \DateTimeImmutable|null */