Skip to content

Commit

Permalink
update generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
async-aws-bot committed Jul 26, 2024
1 parent 0dfbd2d commit 147f8a2
Show file tree
Hide file tree
Showing 13 changed files with 149 additions and 4 deletions.
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.316.7"
"${LATEST}": "3.316.8"
},
"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/CodeCommit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: CreateRepository API now throws OperationNotAllowedException when the account has been restricted from creating a repository.

## 1.1.2

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CodeCommit/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
"dev-master": "1.2-dev"
}
}
}
3 changes: 3 additions & 0 deletions src/Service/CodeCommit/src/CodeCommitClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use AsyncAws\CodeCommit\Exception\InvalidTagsMapException;
use AsyncAws\CodeCommit\Exception\MaximumBranchesExceededException;
use AsyncAws\CodeCommit\Exception\MaximumRepositoryTriggersExceededException;
use AsyncAws\CodeCommit\Exception\OperationNotAllowedException;
use AsyncAws\CodeCommit\Exception\PathDoesNotExistException;
use AsyncAws\CodeCommit\Exception\RepositoryDoesNotExistException;
use AsyncAws\CodeCommit\Exception\RepositoryLimitExceededException;
Expand Down Expand Up @@ -97,6 +98,7 @@ class CodeCommitClient extends AbstractApi
* @throws InvalidRepositoryNameException
* @throws InvalidRepositoryDescriptionException
* @throws RepositoryLimitExceededException
* @throws OperationNotAllowedException
* @throws EncryptionIntegrityChecksFailedException
* @throws EncryptionKeyAccessDeniedException
* @throws EncryptionKeyDisabledException
Expand All @@ -118,6 +120,7 @@ public function createRepository($input): CreateRepositoryOutput
'InvalidRepositoryNameException' => InvalidRepositoryNameException::class,
'InvalidRepositoryDescriptionException' => InvalidRepositoryDescriptionException::class,
'RepositoryLimitExceededException' => RepositoryLimitExceededException::class,
'OperationNotAllowedException' => OperationNotAllowedException::class,
'EncryptionIntegrityChecksFailedException' => EncryptionIntegrityChecksFailedException::class,
'EncryptionKeyAccessDeniedException' => EncryptionKeyAccessDeniedException::class,
'EncryptionKeyDisabledException' => EncryptionKeyDisabledException::class,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace AsyncAws\CodeCommit\Exception;

use AsyncAws\Core\Exception\Http\ClientException;

/**
* The requested action is not allowed.
*/
final class OperationNotAllowedException extends ClientException
{
}
2 changes: 1 addition & 1 deletion src/Service/CodeCommit/src/Input/CreateRepositoryInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class CreateRepositoryInput extends Input
*
* If no key is specified, the default `aws/codecommit` Amazon Web Services managed key is used.
*
* [^1]: https://docs.aws.amazon.com/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId
* [^1]: https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId
*
* @var string|null
*/
Expand Down
4 changes: 4 additions & 0 deletions src/Service/StepFunctions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## NOT RELEASED

### Added

- AWS api-change: TODO

## 1.2.3

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/Service/StepFunctions/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "1.2-dev"
"dev-master": "1.3-dev"
}
}
}
23 changes: 23 additions & 0 deletions src/Service/StepFunctions/src/Enum/KmsKeyState.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace AsyncAws\StepFunctions\Enum;

final class KmsKeyState
{
public const CREATING = 'CREATING';
public const DISABLED = 'DISABLED';
public const PENDING_DELETION = 'PENDING_DELETION';
public const PENDING_IMPORT = 'PENDING_IMPORT';
public const UNAVAILABLE = 'UNAVAILABLE';

public static function exists(string $value): bool
{
return isset([
self::CREATING => true,
self::DISABLED => true,
self::PENDING_DELETION => true,
self::PENDING_IMPORT => true,
self::UNAVAILABLE => true,
][$value]);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace AsyncAws\StepFunctions\Exception;

use AsyncAws\Core\Exception\Http\ClientException;

/**
* Either your KMS key policy or API caller does not have the required permissions.
*/
final class KmsAccessDeniedException extends ClientException
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace AsyncAws\StepFunctions\Exception;

use AsyncAws\Core\Exception\Http\ClientException;
use AsyncAws\StepFunctions\Enum\KmsKeyState;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
* The KMS key is not in valid state, for example: Disabled or Deleted.
*/
final class KmsInvalidStateException extends ClientException
{
/**
* Current status of the KMS; key. For example: `DISABLED`, `PENDING_DELETION`, `PENDING_IMPORT`, `UNAVAILABLE`,
* `CREATING`.
*
* @var KmsKeyState::*|null
*/
private $kmsKeyState;

/**
* @return KmsKeyState::*|null
*/
public function getKmsKeyState(): ?string
{
return $this->kmsKeyState;
}

protected function populateResult(ResponseInterface $response): void
{
$data = $response->toArray(false);

$this->kmsKeyState = isset($data['kmsKeyState']) ? (string) $data['kmsKeyState'] : null;
}
}
12 changes: 12 additions & 0 deletions src/Service/StepFunctions/src/Exception/KmsThrottlingException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace AsyncAws\StepFunctions\Exception;

use AsyncAws\Core\Exception\Http\ClientException;

/**
* Received when KMS returns `ThrottlingException` for a KMS call that Step Functions makes on behalf of the caller.
*/
final class KmsThrottlingException extends ClientException
{
}
39 changes: 39 additions & 0 deletions src/Service/StepFunctions/src/StepFunctionsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
use AsyncAws\StepFunctions\Exception\InvalidNameException;
use AsyncAws\StepFunctions\Exception\InvalidOutputException;
use AsyncAws\StepFunctions\Exception\InvalidTokenException;
use AsyncAws\StepFunctions\Exception\KmsAccessDeniedException;
use AsyncAws\StepFunctions\Exception\KmsInvalidStateException;
use AsyncAws\StepFunctions\Exception\KmsThrottlingException;
use AsyncAws\StepFunctions\Exception\StateMachineDeletingException;
use AsyncAws\StepFunctions\Exception\StateMachineDoesNotExistException;
use AsyncAws\StepFunctions\Exception\TaskDoesNotExistException;
Expand All @@ -37,6 +40,12 @@ class StepFunctionsClient extends AbstractApi
* Used by activity workers, Task states using the callback [^1] pattern, and optionally Task states using the job run
* [^2] pattern to report that the task identified by the `taskToken` failed.
*
* For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key
* for the execution role.
*
* A caller can mark a task as fail without using any KMS permissions in the execution role if the caller provides a
* null value for both `error` and `cause` fields because no data needs to be encrypted.
*
* [^1]: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
* [^2]: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync
*
Expand All @@ -53,6 +62,9 @@ class StepFunctionsClient extends AbstractApi
* @throws TaskDoesNotExistException
* @throws InvalidTokenException
* @throws TaskTimedOutException
* @throws KmsAccessDeniedException
* @throws KmsInvalidStateException
* @throws KmsThrottlingException
*/
public function sendTaskFailure($input): SendTaskFailureOutput
{
Expand All @@ -61,6 +73,9 @@ public function sendTaskFailure($input): SendTaskFailureOutput
'TaskDoesNotExist' => TaskDoesNotExistException::class,
'InvalidToken' => InvalidTokenException::class,
'TaskTimedOut' => TaskTimedOutException::class,
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
'KmsInvalidStateException' => KmsInvalidStateException::class,
'KmsThrottlingException' => KmsThrottlingException::class,
]]));

return new SendTaskFailureOutput($response);
Expand Down Expand Up @@ -127,6 +142,9 @@ public function sendTaskHeartbeat($input): SendTaskHeartbeatOutput
* @throws InvalidOutputException
* @throws InvalidTokenException
* @throws TaskTimedOutException
* @throws KmsAccessDeniedException
* @throws KmsInvalidStateException
* @throws KmsThrottlingException
*/
public function sendTaskSuccess($input): SendTaskSuccessOutput
{
Expand All @@ -136,6 +154,9 @@ public function sendTaskSuccess($input): SendTaskSuccessOutput
'InvalidOutput' => InvalidOutputException::class,
'InvalidToken' => InvalidTokenException::class,
'TaskTimedOut' => TaskTimedOutException::class,
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
'KmsInvalidStateException' => KmsInvalidStateException::class,
'KmsThrottlingException' => KmsThrottlingException::class,
]]));

return new SendTaskSuccessOutput($response);
Expand Down Expand Up @@ -203,6 +224,9 @@ public function sendTaskSuccess($input): SendTaskSuccessOutput
* @throws StateMachineDoesNotExistException
* @throws StateMachineDeletingException
* @throws ValidationException
* @throws KmsAccessDeniedException
* @throws KmsInvalidStateException
* @throws KmsThrottlingException
*/
public function startExecution($input): StartExecutionOutput
{
Expand All @@ -216,6 +240,9 @@ public function startExecution($input): StartExecutionOutput
'StateMachineDoesNotExist' => StateMachineDoesNotExistException::class,
'StateMachineDeleting' => StateMachineDeletingException::class,
'ValidationException' => ValidationException::class,
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
'KmsInvalidStateException' => KmsInvalidStateException::class,
'KmsThrottlingException' => KmsThrottlingException::class,
]]));

return new StartExecutionOutput($response);
Expand All @@ -226,6 +253,12 @@ public function startExecution($input): StartExecutionOutput
*
* This API action is not supported by `EXPRESS` state machines.
*
* For an execution with encryption enabled, Step Functions will encrypt the error and cause fields using the KMS key
* for the execution role.
*
* A caller can stop an execution without using any KMS permissions in the execution role if the caller provides a null
* value for both `error` and `cause` fields because no data needs to be encrypted.
*
* @see https://docs.aws.amazon.com/step-functions/latest/apireference/API_StopExecution.html
* @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-states-2016-11-23.html#stopexecution
*
Expand All @@ -239,6 +272,9 @@ public function startExecution($input): StartExecutionOutput
* @throws ExecutionDoesNotExistException
* @throws InvalidArnException
* @throws ValidationException
* @throws KmsAccessDeniedException
* @throws KmsInvalidStateException
* @throws KmsThrottlingException
*/
public function stopExecution($input): StopExecutionOutput
{
Expand All @@ -247,6 +283,9 @@ public function stopExecution($input): StopExecutionOutput
'ExecutionDoesNotExist' => ExecutionDoesNotExistException::class,
'InvalidArn' => InvalidArnException::class,
'ValidationException' => ValidationException::class,
'KmsAccessDeniedException' => KmsAccessDeniedException::class,
'KmsInvalidStateException' => KmsInvalidStateException::class,
'KmsThrottlingException' => KmsThrottlingException::class,
]]));

return new StopExecutionOutput($response);
Expand Down

0 comments on commit 147f8a2

Please sign in to comment.