diff --git a/clients/client-amplify/src/commands/CreateAppCommand.ts b/clients/client-amplify/src/commands/CreateAppCommand.ts index 1f0f5ff156f4c..7425c58017e0d 100644 --- a/clients/client-amplify/src/commands/CreateAppCommand.ts +++ b/clients/client-amplify/src/commands/CreateAppCommand.ts @@ -86,6 +86,9 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare * enablePullRequestPreview: true || false, * pullRequestEnvironmentName: "STRING_VALUE", * }, + * cacheConfig: { // CacheConfig + * type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * }, * }; * const command = new CreateAppCommand(input); * const response = await client.send(command); @@ -146,6 +149,9 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare * // pullRequestEnvironmentName: "STRING_VALUE", * // }, * // repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4", + * // cacheConfig: { // CacheConfig + * // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * // }, * // }, * // }; * diff --git a/clients/client-amplify/src/commands/DeleteAppCommand.ts b/clients/client-amplify/src/commands/DeleteAppCommand.ts index 59b8ee554dffc..970842fa0715a 100644 --- a/clients/client-amplify/src/commands/DeleteAppCommand.ts +++ b/clients/client-amplify/src/commands/DeleteAppCommand.ts @@ -97,6 +97,9 @@ export interface DeleteAppCommandOutput extends DeleteAppResult, __MetadataBeare * // pullRequestEnvironmentName: "STRING_VALUE", * // }, * // repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4", + * // cacheConfig: { // CacheConfig + * // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * // }, * // }, * // }; * diff --git a/clients/client-amplify/src/commands/GetAppCommand.ts b/clients/client-amplify/src/commands/GetAppCommand.ts index 999e425a43237..ec55b4dfe0c03 100644 --- a/clients/client-amplify/src/commands/GetAppCommand.ts +++ b/clients/client-amplify/src/commands/GetAppCommand.ts @@ -97,6 +97,9 @@ export interface GetAppCommandOutput extends GetAppResult, __MetadataBearer {} * // pullRequestEnvironmentName: "STRING_VALUE", * // }, * // repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4", + * // cacheConfig: { // CacheConfig + * // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * // }, * // }, * // }; * diff --git a/clients/client-amplify/src/commands/ListAppsCommand.ts b/clients/client-amplify/src/commands/ListAppsCommand.ts index a0b9d1366ed99..a21986c6fb2b8 100644 --- a/clients/client-amplify/src/commands/ListAppsCommand.ts +++ b/clients/client-amplify/src/commands/ListAppsCommand.ts @@ -99,6 +99,9 @@ export interface ListAppsCommandOutput extends ListAppsResult, __MetadataBearer * // pullRequestEnvironmentName: "STRING_VALUE", * // }, * // repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4", + * // cacheConfig: { // CacheConfig + * // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * // }, * // }, * // ], * // nextToken: "STRING_VALUE", diff --git a/clients/client-amplify/src/commands/UpdateAppCommand.ts b/clients/client-amplify/src/commands/UpdateAppCommand.ts index abe0f8de203ac..58d232317d259 100644 --- a/clients/client-amplify/src/commands/UpdateAppCommand.ts +++ b/clients/client-amplify/src/commands/UpdateAppCommand.ts @@ -84,6 +84,9 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare * repository: "STRING_VALUE", * oauthToken: "STRING_VALUE", * accessToken: "STRING_VALUE", + * cacheConfig: { // CacheConfig + * type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * }, * }; * const command = new UpdateAppCommand(input); * const response = await client.send(command); @@ -144,6 +147,9 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare * // pullRequestEnvironmentName: "STRING_VALUE", * // }, * // repositoryCloneMethod: "SSH" || "TOKEN" || "SIGV4", + * // cacheConfig: { // CacheConfig + * // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required + * // }, * // }, * // }; * diff --git a/clients/client-amplify/src/models/models_0.ts b/clients/client-amplify/src/models/models_0.ts index bc59a6f703de8..da7ac19952537 100644 --- a/clients/client-amplify/src/models/models_0.ts +++ b/clients/client-amplify/src/models/models_0.ts @@ -111,6 +111,40 @@ export interface AutoBranchCreationConfig { pullRequestEnvironmentName?: string; } +/** + * @public + * @enum + */ +export const CacheConfigType = { + AMPLIFY_MANAGED: "AMPLIFY_MANAGED", + AMPLIFY_MANAGED_NO_COOKIES: "AMPLIFY_MANAGED_NO_COOKIES", +} as const; + +/** + * @public + */ +export type CacheConfigType = (typeof CacheConfigType)[keyof typeof CacheConfigType]; + +/** + *
Describes the cache configuration for an Amplify app.
+ *For more + * information about how Amplify applies an optimal cache configuration for + * your app based on the type of content that is being served, see Managing cache configuration in the Amplify User + * guide.
+ * @public + */ +export interface CacheConfig { + /** + *The type of cache configuration to use for an Amplify app.
+ *The AMPLIFY_MANAGED
cache configuration automatically applies an
+ * optimized cache configuration for your app based on its platform, routing rules, and
+ * rewrite rules. This is the default setting.
The AMPLIFY_MANAGED_NO_COOKIES
cache configuration type is the same as AMPLIFY_MANAGED
, except that it excludes all cookies from the cache key.
Describes a custom rewrite or redirect rule.
* @public @@ -329,6 +363,12 @@ export interface CreateAppRequest { * @public */ autoBranchCreationConfig?: AutoBranchCreationConfig; + + /** + *The cache configuration for the Amplify app.
+ * @public + */ + cacheConfig?: CacheConfig; } /** @@ -543,6 +583,14 @@ export interface App { * @public */ repositoryCloneMethod?: RepositoryCloneMethod; + + /** + *The cache configuration for the Amplify app. If you don't specify the
+ * cache configuration type
, Amplify uses the default
+ * AMPLIFY_MANAGED
setting.
The cache configuration for the Amplify app.
+ * @public + */ + cacheConfig?: CacheConfig; } /** diff --git a/clients/client-amplify/src/protocols/Aws_restJson1.ts b/clients/client-amplify/src/protocols/Aws_restJson1.ts index 4270f17942d52..a53f09838bd0c 100644 --- a/clients/client-amplify/src/protocols/Aws_restJson1.ts +++ b/clients/client-amplify/src/protocols/Aws_restJson1.ts @@ -99,6 +99,7 @@ import { BackendEnvironment, BadRequestException, Branch, + CacheConfig, CertificateSettings, CustomRule, DependentServiceFailureException, @@ -135,6 +136,7 @@ export const se_CreateAppCommand = async ( autoBranchCreationPatterns: (_) => _json(_), basicAuthCredentials: [], buildSpec: [], + cacheConfig: (_) => _json(_), customHeaders: [], customRules: (_) => _json(_), description: [], @@ -830,6 +832,7 @@ export const se_UpdateAppCommand = async ( autoBranchCreationPatterns: (_) => _json(_), basicAuthCredentials: [], buildSpec: [], + cacheConfig: (_) => _json(_), customHeaders: [], customRules: (_) => _json(_), description: [], @@ -1904,6 +1907,8 @@ const de_UnauthorizedExceptionRes = async ( // se_Backend omitted. +// se_CacheConfig omitted. + // se_CertificateSettings omitted. // se_CustomRule omitted. @@ -1931,6 +1936,7 @@ const de_App = (output: any, context: __SerdeContext): App => { autoBranchCreationPatterns: _json, basicAuthCredentials: __expectString, buildSpec: __expectString, + cacheConfig: _json, createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), customHeaders: __expectString, customRules: _json, @@ -2052,6 +2058,8 @@ const de_Branches = (output: any, context: __SerdeContext): Branch[] => { return retVal; }; +// de_CacheConfig omitted. + // de_Certificate omitted. // de_CustomDomains omitted. diff --git a/codegen/sdk-codegen/aws-models/amplify.json b/codegen/sdk-codegen/aws-models/amplify.json index c0be344d41e5a..34bab28a6eea7 100644 --- a/codegen/sdk-codegen/aws-models/amplify.json +++ b/codegen/sdk-codegen/aws-models/amplify.json @@ -1204,6 +1204,12 @@ "traits": { "smithy.api#documentation": "This is for internal use.
\nThe Amplify service uses this parameter to specify the authentication protocol to use\n to access the Git repository for an Amplify app. Amplify specifies TOKEN
\n for a GitHub repository, SIGV4
for an Amazon Web Services CodeCommit\n repository, and SSH
for GitLab and Bitbucket repositories.
The cache configuration for the Amplify app. If you don't specify the\n cache configuration type
, Amplify uses the default\n AMPLIFY_MANAGED
setting.
The type of cache configuration to use for an Amplify app.
\nThe AMPLIFY_MANAGED
cache configuration automatically applies an\n optimized cache configuration for your app based on its platform, routing rules, and\n rewrite rules. This is the default setting.
The AMPLIFY_MANAGED_NO_COOKIES
cache configuration type is the same as AMPLIFY_MANAGED
, except that it excludes all cookies from the cache key.
Describes the cache configuration for an Amplify app.
\nFor more\n information about how Amplify applies an optimal cache configuration for\n your app based on the type of content that is being served, see Managing cache configuration in the Amplify User\n guide.
" + } + }, + "com.amazonaws.amplify#CacheConfigType": { + "type": "enum", + "members": { + "AMPLIFY_MANAGED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AMPLIFY_MANAGED" + } + }, + "AMPLIFY_MANAGED_NO_COOKIES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AMPLIFY_MANAGED_NO_COOKIES" + } + } + } + }, "com.amazonaws.amplify#Certificate": { "type": "structure", "members": { "type": { "target": "com.amazonaws.amplify#CertificateType", "traits": { - "smithy.api#documentation": "The type of SSL/TLS certificate that you want to use.
\nSpecify AMPLIFY_MANAGED
to use the default certificate that Amplify\n provisions for you.
Specify CUSTOM
to use your own certificate that you have already added to\n Certificate Manager in your Amazon Web Services account. Make sure you request (or\n import) the certificate in the US East (N. Virginia) Region (us-east-1). For more\n information about using ACM, see Importing certificates into\n Certificate Manager in the ACM User\n guide .
The type of SSL/TLS certificate that you want to use.
\nSpecify AMPLIFY_MANAGED
to use the default certificate that Amplify\n provisions for you.
Specify CUSTOM
to use your own certificate that you have already added to\n Certificate Manager in your Amazon Web Services account. Make sure you request (or\n import) the certificate in the US East (N. Virginia) Region (us-east-1). For more\n information about using ACM, see Importing certificates into\n Certificate Manager in the ACM User\n guide.
The automated branch creation configuration for an Amplify app.
" } + }, + "cacheConfig": { + "target": "com.amazonaws.amplify#CacheConfig", + "traits": { + "smithy.api#documentation": "The cache configuration for the Amplify app.
" + } } }, "traits": { @@ -6161,6 +6205,12 @@ "traits": { "smithy.api#documentation": "The personal access token for a GitHub repository for an Amplify app. The personal\n access token is used to authorize access to a GitHub repository using the Amplify GitHub\n App. The token is not stored.
\nUse accessToken
for GitHub repositories only. To authorize access to a\n repository provider such as Bitbucket or CodeCommit, use oauthToken
.
You must specify either accessToken
or oauthToken
when you\n update an app.
Existing Amplify apps deployed from a GitHub repository using OAuth continue to work\n with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub\n App. For more information, see Migrating an existing OAuth app to the Amplify GitHub App in the\n Amplify User Guide .
" } + }, + "cacheConfig": { + "target": "com.amazonaws.amplify#CacheConfig", + "traits": { + "smithy.api#documentation": "The cache configuration for the Amplify app.
" + } } }, "traits": {