diff --git a/manifest.json b/manifest.json index 9ff67ed07..3d0611197 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "variables": { - "${LATEST}": "3.322.0" + "${LATEST}": "3.322.2" }, "endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json", "services": { diff --git a/src/Service/MediaConvert/CHANGELOG.md b/src/Service/MediaConvert/CHANGELOG.md index 661be6f68..9e430debd 100644 --- a/src/Service/MediaConvert/CHANGELOG.md +++ b/src/Service/MediaConvert/CHANGELOG.md @@ -5,6 +5,7 @@ ### Added - AWS api-change: This release includes support for dynamic video overlay workflows, including picture-in-picture and squeezeback +- AWS api-change: This release provides support for additional DRM configurations per SPEKE Version 2.0. ### Changed diff --git a/src/Service/MediaConvert/src/Enum/PresetSpeke20Audio.php b/src/Service/MediaConvert/src/Enum/PresetSpeke20Audio.php new file mode 100644 index 000000000..7bed848d9 --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/PresetSpeke20Audio.php @@ -0,0 +1,32 @@ + true, + self::PRESET_AUDIO_2 => true, + self::PRESET_AUDIO_3 => true, + self::SHARED => true, + self::UNENCRYPTED => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Enum/PresetSpeke20Video.php b/src/Service/MediaConvert/src/Enum/PresetSpeke20Video.php new file mode 100644 index 000000000..6d7776b03 --- /dev/null +++ b/src/Service/MediaConvert/src/Enum/PresetSpeke20Video.php @@ -0,0 +1,42 @@ + true, + self::PRESET_VIDEO_2 => true, + self::PRESET_VIDEO_3 => true, + self::PRESET_VIDEO_4 => true, + self::PRESET_VIDEO_5 => true, + self::PRESET_VIDEO_6 => true, + self::PRESET_VIDEO_7 => true, + self::PRESET_VIDEO_8 => true, + self::SHARED => true, + self::UNENCRYPTED => true, + ][$value]); + } +} diff --git a/src/Service/MediaConvert/src/Result/CreateJobResponse.php b/src/Service/MediaConvert/src/Result/CreateJobResponse.php index d5bb6cfad..8a7749396 100644 --- a/src/Service/MediaConvert/src/Result/CreateJobResponse.php +++ b/src/Service/MediaConvert/src/Result/CreateJobResponse.php @@ -62,6 +62,7 @@ use AsyncAws\MediaConvert\ValueObject\Eac3Settings; use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings; use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings; +use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration; use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification; use AsyncAws\MediaConvert\ValueObject\EsamSettings; use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification; @@ -917,6 +918,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour ]); } + private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration + { + return new EncryptionContractConfiguration([ + 'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null, + 'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null, + ]); + } + private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification { return new EsamManifestConfirmConditionNotification([ @@ -1952,6 +1961,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider { return new SpekeKeyProvider([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']), 'Url' => isset($json['url']) ? (string) $json['url'] : null, @@ -1963,6 +1973,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid return new SpekeKeyProviderCmaf([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, 'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']), + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'Url' => isset($json['url']) ? (string) $json['url'] : null, diff --git a/src/Service/MediaConvert/src/Result/GetJobResponse.php b/src/Service/MediaConvert/src/Result/GetJobResponse.php index 14f093289..d015d62ae 100644 --- a/src/Service/MediaConvert/src/Result/GetJobResponse.php +++ b/src/Service/MediaConvert/src/Result/GetJobResponse.php @@ -62,6 +62,7 @@ use AsyncAws\MediaConvert\ValueObject\Eac3Settings; use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings; use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings; +use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration; use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification; use AsyncAws\MediaConvert\ValueObject\EsamSettings; use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification; @@ -917,6 +918,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour ]); } + private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration + { + return new EncryptionContractConfiguration([ + 'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null, + 'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null, + ]); + } + private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification { return new EsamManifestConfirmConditionNotification([ @@ -1952,6 +1961,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider { return new SpekeKeyProvider([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']), 'Url' => isset($json['url']) ? (string) $json['url'] : null, @@ -1963,6 +1973,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid return new SpekeKeyProviderCmaf([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, 'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']), + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'Url' => isset($json['url']) ? (string) $json['url'] : null, diff --git a/src/Service/MediaConvert/src/Result/ListJobsResponse.php b/src/Service/MediaConvert/src/Result/ListJobsResponse.php index ed4fe23a8..9806a7c04 100644 --- a/src/Service/MediaConvert/src/Result/ListJobsResponse.php +++ b/src/Service/MediaConvert/src/Result/ListJobsResponse.php @@ -65,6 +65,7 @@ use AsyncAws\MediaConvert\ValueObject\Eac3Settings; use AsyncAws\MediaConvert\ValueObject\EmbeddedDestinationSettings; use AsyncAws\MediaConvert\ValueObject\EmbeddedSourceSettings; +use AsyncAws\MediaConvert\ValueObject\EncryptionContractConfiguration; use AsyncAws\MediaConvert\ValueObject\EsamManifestConfirmConditionNotification; use AsyncAws\MediaConvert\ValueObject\EsamSettings; use AsyncAws\MediaConvert\ValueObject\EsamSignalProcessingNotification; @@ -984,6 +985,14 @@ private function populateResultEmbeddedSourceSettings(array $json): EmbeddedSour ]); } + private function populateResultEncryptionContractConfiguration(array $json): EncryptionContractConfiguration + { + return new EncryptionContractConfiguration([ + 'SpekeAudioPreset' => isset($json['spekeAudioPreset']) ? (string) $json['spekeAudioPreset'] : null, + 'SpekeVideoPreset' => isset($json['spekeVideoPreset']) ? (string) $json['spekeVideoPreset'] : null, + ]); + } + private function populateResultEsamManifestConfirmConditionNotification(array $json): EsamManifestConfirmConditionNotification { return new EsamManifestConfirmConditionNotification([ @@ -2019,6 +2028,7 @@ private function populateResultSpekeKeyProvider(array $json): SpekeKeyProvider { return new SpekeKeyProvider([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'SystemIds' => !isset($json['systemIds']) ? null : $this->populateResult__listOf__stringPattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['systemIds']), 'Url' => isset($json['url']) ? (string) $json['url'] : null, @@ -2030,6 +2040,7 @@ private function populateResultSpekeKeyProviderCmaf(array $json): SpekeKeyProvid return new SpekeKeyProviderCmaf([ 'CertificateArn' => isset($json['certificateArn']) ? (string) $json['certificateArn'] : null, 'DashSignaledSystemIds' => !isset($json['dashSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['dashSignaledSystemIds']), + 'EncryptionContractConfiguration' => empty($json['encryptionContractConfiguration']) ? null : $this->populateResultEncryptionContractConfiguration($json['encryptionContractConfiguration']), 'HlsSignaledSystemIds' => !isset($json['hlsSignaledSystemIds']) ? null : $this->populateResult__listOf__stringMin36Max36Pattern09aFAF809aFAF409aFAF409aFAF409aFAF12($json['hlsSignaledSystemIds']), 'ResourceId' => isset($json['resourceId']) ? (string) $json['resourceId'] : null, 'Url' => isset($json['url']) ? (string) $json['url'] : null, diff --git a/src/Service/MediaConvert/src/ValueObject/EncryptionContractConfiguration.php b/src/Service/MediaConvert/src/ValueObject/EncryptionContractConfiguration.php new file mode 100644 index 000000000..68c09cc19 --- /dev/null +++ b/src/Service/MediaConvert/src/ValueObject/EncryptionContractConfiguration.php @@ -0,0 +1,102 @@ +spekeAudioPreset = $input['SpekeAudioPreset'] ?? null; + $this->spekeVideoPreset = $input['SpekeVideoPreset'] ?? null; + } + + /** + * @param array{ + * SpekeAudioPreset?: null|PresetSpeke20Audio::*, + * SpekeVideoPreset?: null|PresetSpeke20Video::*, + * }|EncryptionContractConfiguration $input + */ + public static function create($input): self + { + return $input instanceof self ? $input : new self($input); + } + + /** + * @return PresetSpeke20Audio::*|null + */ + public function getSpekeAudioPreset(): ?string + { + return $this->spekeAudioPreset; + } + + /** + * @return PresetSpeke20Video::*|null + */ + public function getSpekeVideoPreset(): ?string + { + return $this->spekeVideoPreset; + } + + /** + * @internal + */ + public function requestBody(): array + { + $payload = []; + if (null !== $v = $this->spekeAudioPreset) { + if (!PresetSpeke20Audio::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "spekeAudioPreset" for "%s". The value "%s" is not a valid "PresetSpeke20Audio".', __CLASS__, $v)); + } + $payload['spekeAudioPreset'] = $v; + } + if (null !== $v = $this->spekeVideoPreset) { + if (!PresetSpeke20Video::exists($v)) { + throw new InvalidArgument(\sprintf('Invalid parameter "spekeVideoPreset" for "%s". The value "%s" is not a valid "PresetSpeke20Video".', __CLASS__, $v)); + } + $payload['spekeVideoPreset'] = $v; + } + + return $payload; + } +} diff --git a/src/Service/MediaConvert/src/ValueObject/SpekeKeyProvider.php b/src/Service/MediaConvert/src/ValueObject/SpekeKeyProvider.php index 680b4b9e4..9a19ccb57 100644 --- a/src/Service/MediaConvert/src/ValueObject/SpekeKeyProvider.php +++ b/src/Service/MediaConvert/src/ValueObject/SpekeKeyProvider.php @@ -16,6 +16,15 @@ final class SpekeKeyProvider */ private $certificateArn; + /** + * Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more + * information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE + * v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset. + * + * @var EncryptionContractConfiguration|null + */ + private $encryptionContractConfiguration; + /** * Specify the resource ID that your SPEKE-compliant key provider uses to identify this content. * @@ -43,6 +52,7 @@ final class SpekeKeyProvider /** * @param array{ * CertificateArn?: null|string, + * EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array, * ResourceId?: null|string, * SystemIds?: null|string[], * Url?: null|string, @@ -51,6 +61,7 @@ final class SpekeKeyProvider public function __construct(array $input) { $this->certificateArn = $input['CertificateArn'] ?? null; + $this->encryptionContractConfiguration = isset($input['EncryptionContractConfiguration']) ? EncryptionContractConfiguration::create($input['EncryptionContractConfiguration']) : null; $this->resourceId = $input['ResourceId'] ?? null; $this->systemIds = $input['SystemIds'] ?? null; $this->url = $input['Url'] ?? null; @@ -59,6 +70,7 @@ public function __construct(array $input) /** * @param array{ * CertificateArn?: null|string, + * EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array, * ResourceId?: null|string, * SystemIds?: null|string[], * Url?: null|string, @@ -74,6 +86,11 @@ public function getCertificateArn(): ?string return $this->certificateArn; } + public function getEncryptionContractConfiguration(): ?EncryptionContractConfiguration + { + return $this->encryptionContractConfiguration; + } + public function getResourceId(): ?string { return $this->resourceId; @@ -101,6 +118,9 @@ public function requestBody(): array if (null !== $v = $this->certificateArn) { $payload['certificateArn'] = $v; } + if (null !== $v = $this->encryptionContractConfiguration) { + $payload['encryptionContractConfiguration'] = $v->requestBody(); + } if (null !== $v = $this->resourceId) { $payload['resourceId'] = $v; } diff --git a/src/Service/MediaConvert/src/ValueObject/SpekeKeyProviderCmaf.php b/src/Service/MediaConvert/src/ValueObject/SpekeKeyProviderCmaf.php index 1f8523127..e4c626ab4 100644 --- a/src/Service/MediaConvert/src/ValueObject/SpekeKeyProviderCmaf.php +++ b/src/Service/MediaConvert/src/ValueObject/SpekeKeyProviderCmaf.php @@ -25,6 +25,15 @@ final class SpekeKeyProviderCmaf */ private $dashSignaledSystemIds; + /** + * Specify the SPEKE version, either v1.0 or v2.0, that MediaConvert uses when encrypting your output. For more + * information, see: https://docs.aws.amazon.com/speke/latest/documentation/speke-api-specification.html To use SPEKE + * v1.0: Leave blank. To use SPEKE v2.0: Specify a SPEKE v2.0 video preset and a SPEKE v2.0 audio preset. + * + * @var EncryptionContractConfiguration|null + */ + private $encryptionContractConfiguration; + /** * Specify the DRM system ID that you want signaled in the HLS manifest that MediaConvert creates as part of this CMAF * package. The HLS manifest can currently signal only one system ID. For more information, see @@ -53,6 +62,7 @@ final class SpekeKeyProviderCmaf * @param array{ * CertificateArn?: null|string, * DashSignaledSystemIds?: null|string[], + * EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array, * HlsSignaledSystemIds?: null|string[], * ResourceId?: null|string, * Url?: null|string, @@ -62,6 +72,7 @@ public function __construct(array $input) { $this->certificateArn = $input['CertificateArn'] ?? null; $this->dashSignaledSystemIds = $input['DashSignaledSystemIds'] ?? null; + $this->encryptionContractConfiguration = isset($input['EncryptionContractConfiguration']) ? EncryptionContractConfiguration::create($input['EncryptionContractConfiguration']) : null; $this->hlsSignaledSystemIds = $input['HlsSignaledSystemIds'] ?? null; $this->resourceId = $input['ResourceId'] ?? null; $this->url = $input['Url'] ?? null; @@ -71,6 +82,7 @@ public function __construct(array $input) * @param array{ * CertificateArn?: null|string, * DashSignaledSystemIds?: null|string[], + * EncryptionContractConfiguration?: null|EncryptionContractConfiguration|array, * HlsSignaledSystemIds?: null|string[], * ResourceId?: null|string, * Url?: null|string, @@ -94,6 +106,11 @@ public function getDashSignaledSystemIds(): array return $this->dashSignaledSystemIds ?? []; } + public function getEncryptionContractConfiguration(): ?EncryptionContractConfiguration + { + return $this->encryptionContractConfiguration; + } + /** * @return string[] */ @@ -129,6 +146,9 @@ public function requestBody(): array $payload['dashSignaledSystemIds'][$index] = $listValue; } } + if (null !== $v = $this->encryptionContractConfiguration) { + $payload['encryptionContractConfiguration'] = $v->requestBody(); + } if (null !== $v = $this->hlsSignaledSystemIds) { $index = -1; $payload['hlsSignaledSystemIds'] = [];