Skip to content

Commit 1191ab7

Browse files
author
awstools
committed
feat(client-amplify): Added sourceUrlType field to StartDeployment request
1 parent f16069b commit 1191ab7

File tree

10 files changed

+107
-17
lines changed

10 files changed

+107
-17
lines changed

clients/client-amplify/src/commands/CreateDeploymentCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface CreateDeploymentCommandOutput extends CreateDeploymentResult, _
2929

3030
/**
3131
* <p>Creates a deployment for a manually deployed Amplify app. Manually deployed apps are
32-
* not connected to a repository. </p>
32+
* not connected to a Git repository. </p>
3333
* <p>The maximum duration between the <code>CreateDeployment</code> call and the
3434
* <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8
3535
* hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will

clients/client-amplify/src/commands/DeleteJobCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export interface DeleteJobCommandOutput extends DeleteJobResult, __MetadataBeare
5353
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
5454
* // endTime: new Date("TIMESTAMP"),
5555
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
56+
* // sourceUrl: "STRING_VALUE",
57+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
5658
* // },
5759
* // };
5860
*

clients/client-amplify/src/commands/GetJobCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ export interface GetJobCommandOutput extends GetJobResult, __MetadataBearer {}
5454
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
5555
* // endTime: new Date("TIMESTAMP"),
5656
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
57+
* // sourceUrl: "STRING_VALUE",
58+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
5759
* // },
5860
* // steps: [ // Steps // required
5961
* // { // Step

clients/client-amplify/src/commands/ListJobsCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ export interface ListJobsCommandOutput extends ListJobsResult, __MetadataBearer
5555
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
5656
* // endTime: new Date("TIMESTAMP"),
5757
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
58+
* // sourceUrl: "STRING_VALUE",
59+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
5860
* // },
5961
* // ],
6062
* // nextToken: "STRING_VALUE",

clients/client-amplify/src/commands/StartDeploymentCommand.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
2929

3030
/**
3131
* <p>Starts a deployment for a manually deployed app. Manually deployed apps are not
32-
* connected to a repository. </p>
32+
* connected to a Git repository. </p>
3333
* <p>The maximum duration between the <code>CreateDeployment</code> call and the
3434
* <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8
3535
* hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will
@@ -45,6 +45,7 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
4545
* branchName: "STRING_VALUE", // required
4646
* jobId: "STRING_VALUE",
4747
* sourceUrl: "STRING_VALUE",
48+
* sourceUrlType: "ZIP" || "BUCKET_PREFIX",
4849
* };
4950
* const command = new StartDeploymentCommand(input);
5051
* const response = await client.send(command);
@@ -59,6 +60,8 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
5960
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
6061
* // endTime: new Date("TIMESTAMP"),
6162
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
63+
* // sourceUrl: "STRING_VALUE",
64+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
6265
* // },
6366
* // };
6467
*

clients/client-amplify/src/commands/StartJobCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export interface StartJobCommandOutput extends StartJobResult, __MetadataBearer
5858
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
5959
* // endTime: new Date("TIMESTAMP"),
6060
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
61+
* // sourceUrl: "STRING_VALUE",
62+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
6163
* // },
6264
* // };
6365
*

clients/client-amplify/src/commands/StopJobCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export interface StopJobCommandOutput extends StopJobResult, __MetadataBearer {}
5353
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
5454
* // endTime: new Date("TIMESTAMP"),
5555
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
56+
* // sourceUrl: "STRING_VALUE",
57+
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
5658
* // },
5759
* // };
5860
*

clients/client-amplify/src/models/models_0.ts

+47-8
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,20 @@ export const JobType = {
17931793
*/
17941794
export type JobType = (typeof JobType)[keyof typeof JobType];
17951795

1796+
/**
1797+
* @public
1798+
* @enum
1799+
*/
1800+
export const SourceUrlType = {
1801+
BUCKET_PREFIX: "BUCKET_PREFIX",
1802+
ZIP: "ZIP",
1803+
} as const;
1804+
1805+
/**
1806+
* @public
1807+
*/
1808+
export type SourceUrlType = (typeof SourceUrlType)[keyof typeof SourceUrlType];
1809+
17961810
/**
17971811
* @public
17981812
* @enum
@@ -1867,13 +1881,30 @@ export interface JobSummary {
18671881

18681882
/**
18691883
* <p> The type for the job. If the value is <code>RELEASE</code>, the job was manually
1870-
* released from its source by using the <code>StartJob</code> API. If the value is
1871-
* <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>
1884+
* released from its source by using the <code>StartJob</code> API. This value is available only for apps
1885+
* that are connected to a repository.</p>
1886+
* <p>If the value is <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>
18721887
* API. If the value is <code>WEB_HOOK</code>, the job was automatically triggered by
1873-
* webhooks. </p>
1888+
* webhooks. If the value is <code>MANUAL</code>, the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.</p>
18741889
* @public
18751890
*/
18761891
jobType: JobType | undefined;
1892+
1893+
/**
1894+
* <p>The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and
1895+
* downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
1896+
* @public
1897+
*/
1898+
sourceUrl?: string;
1899+
1900+
/**
1901+
* <p>The type of source specified by the <code>sourceURL</code>.
1902+
* If the value is <code>ZIP</code>, the source is a .zip file.
1903+
* If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and
1904+
* prefix. If no value is specified, the default is <code>ZIP</code>.</p>
1905+
* @public
1906+
*/
1907+
sourceUrlType?: SourceUrlType;
18771908
}
18781909

18791910
/**
@@ -2659,24 +2690,32 @@ export interface StartDeploymentRequest {
26592690
appId: string | undefined;
26602691

26612692
/**
2662-
* <p>The name of the branch to use for the job. </p>
2693+
* <p>The name of the branch to use for the deployment job. </p>
26632694
* @public
26642695
*/
26652696
branchName: string | undefined;
26662697

26672698
/**
2668-
* <p>The job ID for this deployment, generated by the create deployment request. </p>
2699+
* <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request. </p>
26692700
* @public
26702701
*/
26712702
jobId?: string;
26722703

26732704
/**
2674-
* <p>The source URL for this deployment, used when calling start deployment without create
2675-
* deployment. The source URL can be any HTTP GET URL that is publicly accessible and
2676-
* downloads a single .zip file. </p>
2705+
* <p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and
2706+
* downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
26772707
* @public
26782708
*/
26792709
sourceUrl?: string;
2710+
2711+
/**
2712+
* <p>The type of source specified by the <code>sourceURL</code>.
2713+
* If the value is <code>ZIP</code>, the source is a .zip file.
2714+
* If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and
2715+
* prefix. If no value is specified, the default is <code>ZIP</code>.</p>
2716+
* @public
2717+
*/
2718+
sourceUrlType?: SourceUrlType;
26802719
}
26812720

26822721
/**

clients/client-amplify/src/protocols/Aws_restJson1.ts

+3
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ export const se_StartDeploymentCommand = async (
713713
take(input, {
714714
jobId: [],
715715
sourceUrl: [],
716+
sourceUrlType: [],
716717
})
717718
);
718719
b.m("POST").h(headers).b(body);
@@ -2107,6 +2108,8 @@ const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => {
21072108
jobArn: __expectString,
21082109
jobId: __expectString,
21092110
jobType: __expectString,
2111+
sourceUrl: __expectString,
2112+
sourceUrlType: __expectString,
21102113
startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
21112114
status: __expectString,
21122115
}) as any;

codegen/sdk-codegen/aws-models/amplify.json

+42-7
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,7 @@
23882388
}
23892389
],
23902390
"traits": {
2391-
"smithy.api#documentation": "<p>Creates a deployment for a manually deployed Amplify app. Manually deployed apps are\n not connected to a repository. </p>\n <p>The maximum duration between the <code>CreateDeployment</code> call and the\n <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8\n hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will\n fail.</p>",
2391+
"smithy.api#documentation": "<p>Creates a deployment for a manually deployed Amplify app. Manually deployed apps are\n not connected to a Git repository. </p>\n <p>The maximum duration between the <code>CreateDeployment</code> call and the\n <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8\n hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will\n fail.</p>",
23922392
"smithy.api#http": {
23932393
"method": "POST",
23942394
"uri": "/apps/{appId}/branches/{branchName}/deployments",
@@ -4280,9 +4280,21 @@
42804280
"jobType": {
42814281
"target": "com.amazonaws.amplify#JobType",
42824282
"traits": {
4283-
"smithy.api#documentation": "<p> The type for the job. If the value is <code>RELEASE</code>, the job was manually\n released from its source by using the <code>StartJob</code> API. If the value is\n <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>\n API. If the value is <code>WEB_HOOK</code>, the job was automatically triggered by\n webhooks. </p>",
4283+
"smithy.api#documentation": "<p> The type for the job. If the value is <code>RELEASE</code>, the job was manually\n released from its source by using the <code>StartJob</code> API. This value is available only for apps\n that are connected to a repository.</p>\n <p>If the value is <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>\n API. If the value is <code>WEB_HOOK</code>, the job was automatically triggered by\n webhooks. If the value is <code>MANUAL</code>, the job is for a manually deployed app. Manually deployed apps are not connected to a Git repository.</p>",
42844284
"smithy.api#required": {}
42854285
}
4286+
},
4287+
"sourceUrl": {
4288+
"target": "com.amazonaws.amplify#SourceUrl",
4289+
"traits": {
4290+
"smithy.api#documentation": "<p>The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and\n downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>"
4291+
}
4292+
},
4293+
"sourceUrlType": {
4294+
"target": "com.amazonaws.amplify#SourceUrlType",
4295+
"traits": {
4296+
"smithy.api#documentation": "<p>The type of source specified by the <code>sourceURL</code>.\n If the value is <code>ZIP</code>, the source is a .zip file.\n If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and\n prefix. If no value is specified, the default is <code>ZIP</code>.</p>"
4297+
}
42864298
}
42874299
},
42884300
"traits": {
@@ -5279,7 +5291,24 @@
52795291
"min": 0,
52805292
"max": 3000
52815293
},
5282-
"smithy.api#pattern": "^(?s)"
5294+
"smithy.api#pattern": "^(s3|https|http)://"
5295+
}
5296+
},
5297+
"com.amazonaws.amplify#SourceUrlType": {
5298+
"type": "enum",
5299+
"members": {
5300+
"ZIP": {
5301+
"target": "smithy.api#Unit",
5302+
"traits": {
5303+
"smithy.api#enumValue": "ZIP"
5304+
}
5305+
},
5306+
"BUCKET_PREFIX": {
5307+
"target": "smithy.api#Unit",
5308+
"traits": {
5309+
"smithy.api#enumValue": "BUCKET_PREFIX"
5310+
}
5311+
}
52835312
}
52845313
},
52855314
"com.amazonaws.amplify#StackArn": {
@@ -5363,7 +5392,7 @@
53635392
}
53645393
],
53655394
"traits": {
5366-
"smithy.api#documentation": "<p>Starts a deployment for a manually deployed app. Manually deployed apps are not\n connected to a repository. </p>\n <p>The maximum duration between the <code>CreateDeployment</code> call and the\n <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8\n hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will\n fail.</p>",
5395+
"smithy.api#documentation": "<p>Starts a deployment for a manually deployed app. Manually deployed apps are not\n connected to a Git repository. </p>\n <p>The maximum duration between the <code>CreateDeployment</code> call and the\n <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8\n hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will\n fail.</p>",
53675396
"smithy.api#http": {
53685397
"method": "POST",
53695398
"uri": "/apps/{appId}/branches/{branchName}/deployments/start",
@@ -5385,21 +5414,27 @@
53855414
"branchName": {
53865415
"target": "com.amazonaws.amplify#BranchName",
53875416
"traits": {
5388-
"smithy.api#documentation": "<p>The name of the branch to use for the job. </p>",
5417+
"smithy.api#documentation": "<p>The name of the branch to use for the deployment job. </p>",
53895418
"smithy.api#httpLabel": {},
53905419
"smithy.api#required": {}
53915420
}
53925421
},
53935422
"jobId": {
53945423
"target": "com.amazonaws.amplify#JobId",
53955424
"traits": {
5396-
"smithy.api#documentation": "<p>The job ID for this deployment, generated by the create deployment request. </p>"
5425+
"smithy.api#documentation": "<p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request. </p>"
53975426
}
53985427
},
53995428
"sourceUrl": {
54005429
"target": "com.amazonaws.amplify#SourceUrl",
54015430
"traits": {
5402-
"smithy.api#documentation": "<p>The source URL for this deployment, used when calling start deployment without create\n deployment. The source URL can be any HTTP GET URL that is publicly accessible and\n downloads a single .zip file. </p>"
5431+
"smithy.api#documentation": "<p>The source URL for the deployment that is used when calling <code>StartDeployment</code> without <code>CreateDeployment</code>. The source URL can be either an HTTP GET URL that is publicly accessible and\n downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>"
5432+
}
5433+
},
5434+
"sourceUrlType": {
5435+
"target": "com.amazonaws.amplify#SourceUrlType",
5436+
"traits": {
5437+
"smithy.api#documentation": "<p>The type of source specified by the <code>sourceURL</code>.\n If the value is <code>ZIP</code>, the source is a .zip file.\n If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and\n prefix. If no value is specified, the default is <code>ZIP</code>.</p>"
54035438
}
54045439
}
54055440
},

0 commit comments

Comments
 (0)