Skip to content

Commit

Permalink
feat(clients): allow setting path prefix from custom endpoints (#2722)
Browse files Browse the repository at this point in the history
* feat(clients): allow setting path prefix from client
  • Loading branch information
AllanZhengYP committed Aug 27, 2021
1 parent 4209967 commit 990ba2f
Show file tree
Hide file tree
Showing 143 changed files with 286 additions and 286 deletions.
4 changes: 2 additions & 2 deletions clients/client-acm-pca/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3757,13 +3757,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-acm/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2428,13 +2428,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-alexa-for-business/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10586,13 +10586,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1924,13 +1924,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4112,13 +4112,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-application-insights/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3548,13 +3548,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-apprunner/protocols/Aws_json1_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3182,13 +3182,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-appstream/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6778,13 +6778,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-athena/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4290,13 +4290,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-auto-scaling-plans/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1458,13 +1458,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-auto-scaling/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9986,13 +9986,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-budgets/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3735,13 +3735,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloud9/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2122,13 +2122,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudformation/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11124,13 +11124,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudhsm-v2/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2296,13 +2296,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudhsm/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2339,13 +2339,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudsearch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4897,13 +4897,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudtrail/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4455,13 +4455,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudwatch-events/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7671,13 +7671,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudwatch-logs/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5351,13 +5351,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-cloudwatch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6346,13 +6346,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codebuild/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6577,13 +6577,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codecommit/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21313,13 +21313,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codedeploy/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11290,13 +11290,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions clients/client-codepipeline/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7013,13 +7013,13 @@ const buildHttpRpcRequest = async (
resolvedHostname: string | undefined,
body: any
): Promise<__HttpRequest> => {
const { hostname, protocol = "https", port } = await context.endpoint();
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
const contents: any = {
protocol,
hostname,
port,
method: "POST",
path,
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
headers,
};
if (resolvedHostname !== undefined) {
Expand Down
Loading

0 comments on commit 990ba2f

Please sign in to comment.