Skip to content

Commit

Permalink
feat(client-amplify): Added sourceUrlType field to StartDeployment re…
Browse files Browse the repository at this point in the history
…quest
  • Loading branch information
awstools committed Oct 15, 2024
1 parent f16069b commit 1191ab7
Show file tree
Hide file tree
Showing 10 changed files with 107 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface CreateDeploymentCommandOutput extends CreateDeploymentResult, _

/**
* <p>Creates a deployment for a manually deployed Amplify app. Manually deployed apps are
* not connected to a repository. </p>
* not connected to a Git repository. </p>
* <p>The maximum duration between the <code>CreateDeployment</code> call and the
* <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8
* hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/DeleteJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export interface DeleteJobCommandOutput extends DeleteJobResult, __MetadataBeare
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/GetJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export interface GetJobCommandOutput extends GetJobResult, __MetadataBearer {}
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // steps: [ // Steps // required
* // { // Step
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/ListJobsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export interface ListJobsCommandOutput extends ListJobsResult, __MetadataBearer
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M

/**
* <p>Starts a deployment for a manually deployed app. Manually deployed apps are not
* connected to a repository. </p>
* connected to a Git repository. </p>
* <p>The maximum duration between the <code>CreateDeployment</code> call and the
* <code>StartDeployment</code> call cannot exceed 8 hours. If the duration exceeds 8
* hours, the <code>StartDeployment</code> call and the associated <code>Job</code> will
Expand All @@ -45,6 +45,7 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
* branchName: "STRING_VALUE", // required
* jobId: "STRING_VALUE",
* sourceUrl: "STRING_VALUE",
* sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* };
* const command = new StartDeploymentCommand(input);
* const response = await client.send(command);
Expand All @@ -59,6 +60,8 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/StartJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export interface StartJobCommandOutput extends StartJobResult, __MetadataBearer
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // };
*
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/StopJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export interface StopJobCommandOutput extends StopJobResult, __MetadataBearer {}
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
* // sourceUrlType: "ZIP" || "BUCKET_PREFIX",
* // },
* // };
*
Expand Down
55 changes: 47 additions & 8 deletions clients/client-amplify/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1793,6 +1793,20 @@ export const JobType = {
*/
export type JobType = (typeof JobType)[keyof typeof JobType];

/**
* @public
* @enum
*/
export const SourceUrlType = {
BUCKET_PREFIX: "BUCKET_PREFIX",
ZIP: "ZIP",
} as const;

/**
* @public
*/
export type SourceUrlType = (typeof SourceUrlType)[keyof typeof SourceUrlType];

/**
* @public
* @enum
Expand Down Expand Up @@ -1867,13 +1881,30 @@ export interface JobSummary {

/**
* <p> The type for the job. If the value is <code>RELEASE</code>, the job was manually
* released from its source by using the <code>StartJob</code> API. If the value is
* <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>
* released from its source by using the <code>StartJob</code> API. This value is available only for apps
* that are connected to a repository.</p>
* <p>If the value is <code>RETRY</code>, the job was manually retried using the <code>StartJob</code>
* API. If the value is <code>WEB_HOOK</code>, the job was automatically triggered by
* webhooks. </p>
* 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>
* @public
*/
jobType: JobType | undefined;

/**
* <p>The source URL for the files to deploy. The source URL can be either an HTTP GET URL that is publicly accessible and
* downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
* @public
*/
sourceUrl?: string;

/**
* <p>The type of source specified by the <code>sourceURL</code>.
* If the value is <code>ZIP</code>, the source is a .zip file.
* If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and
* prefix. If no value is specified, the default is <code>ZIP</code>.</p>
* @public
*/
sourceUrlType?: SourceUrlType;
}

/**
Expand Down Expand Up @@ -2659,24 +2690,32 @@ export interface StartDeploymentRequest {
appId: string | undefined;

/**
* <p>The name of the branch to use for the job. </p>
* <p>The name of the branch to use for the deployment job. </p>
* @public
*/
branchName: string | undefined;

/**
* <p>The job ID for this deployment, generated by the create deployment request. </p>
* <p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request. </p>
* @public
*/
jobId?: string;

/**
* <p>The source URL for this deployment, used when calling start deployment without create
* deployment. The source URL can be any HTTP GET URL that is publicly accessible and
* downloads a single .zip file. </p>
* <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
* downloads a single .zip file, or an Amazon S3 bucket and prefix.</p>
* @public
*/
sourceUrl?: string;

/**
* <p>The type of source specified by the <code>sourceURL</code>.
* If the value is <code>ZIP</code>, the source is a .zip file.
* If the value is <code>BUCKET_PREFIX</code>, the source is an Amazon S3 bucket and
* prefix. If no value is specified, the default is <code>ZIP</code>.</p>
* @public
*/
sourceUrlType?: SourceUrlType;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ export const se_StartDeploymentCommand = async (
take(input, {
jobId: [],
sourceUrl: [],
sourceUrlType: [],
})
);
b.m("POST").h(headers).b(body);
Expand Down Expand Up @@ -2107,6 +2108,8 @@ const de_JobSummary = (output: any, context: __SerdeContext): JobSummary => {
jobArn: __expectString,
jobId: __expectString,
jobType: __expectString,
sourceUrl: __expectString,
sourceUrlType: __expectString,
startTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
status: __expectString,
}) as any;
Expand Down
49 changes: 42 additions & 7 deletions codegen/sdk-codegen/aws-models/amplify.json
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,7 @@
}
],
"traits": {
"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>",
"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>",
"smithy.api#http": {
"method": "POST",
"uri": "/apps/{appId}/branches/{branchName}/deployments",
Expand Down Expand Up @@ -4280,9 +4280,21 @@
"jobType": {
"target": "com.amazonaws.amplify#JobType",
"traits": {
"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>",
"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>",
"smithy.api#required": {}
}
},
"sourceUrl": {
"target": "com.amazonaws.amplify#SourceUrl",
"traits": {
"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>"
}
},
"sourceUrlType": {
"target": "com.amazonaws.amplify#SourceUrlType",
"traits": {
"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>"
}
}
},
"traits": {
Expand Down Expand Up @@ -5279,7 +5291,24 @@
"min": 0,
"max": 3000
},
"smithy.api#pattern": "^(?s)"
"smithy.api#pattern": "^(s3|https|http)://"
}
},
"com.amazonaws.amplify#SourceUrlType": {
"type": "enum",
"members": {
"ZIP": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "ZIP"
}
},
"BUCKET_PREFIX": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "BUCKET_PREFIX"
}
}
}
},
"com.amazonaws.amplify#StackArn": {
Expand Down Expand Up @@ -5363,7 +5392,7 @@
}
],
"traits": {
"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>",
"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>",
"smithy.api#http": {
"method": "POST",
"uri": "/apps/{appId}/branches/{branchName}/deployments/start",
Expand All @@ -5385,21 +5414,27 @@
"branchName": {
"target": "com.amazonaws.amplify#BranchName",
"traits": {
"smithy.api#documentation": "<p>The name of the branch to use for the job. </p>",
"smithy.api#documentation": "<p>The name of the branch to use for the deployment job. </p>",
"smithy.api#httpLabel": {},
"smithy.api#required": {}
}
},
"jobId": {
"target": "com.amazonaws.amplify#JobId",
"traits": {
"smithy.api#documentation": "<p>The job ID for this deployment, generated by the create deployment request. </p>"
"smithy.api#documentation": "<p>The job ID for this deployment that is generated by the <code>CreateDeployment</code> request. </p>"
}
},
"sourceUrl": {
"target": "com.amazonaws.amplify#SourceUrl",
"traits": {
"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>"
"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>"
}
},
"sourceUrlType": {
"target": "com.amazonaws.amplify#SourceUrlType",
"traits": {
"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>"
}
}
},
Expand Down

0 comments on commit 1191ab7

Please sign in to comment.