From 75a8506a97092907c3c1743619aa246b8170b644 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 25 May 2023 18:11:59 +0000 Subject: [PATCH] feat(client-migration-hub-refactor-spaces): This SDK update allows for path parameter syntax to be passed to the CreateRoute API. Path parameter syntax require parameters to be enclosed in {} characters. This update also includes a new AppendSourcePath field which lets users forward the source path to the Service URL endpoint. --- .../src/commands/CreateRouteCommand.ts | 2 + .../src/commands/GetRouteCommand.ts | 1 + .../src/commands/ListRoutesCommand.ts | 1 + .../src/models/models_0.ts | 35 +++++++-- .../src/protocols/Aws_restJson1.ts | 2 + .../migration-hub-refactor-spaces.json | 75 ++++++++++++------- 6 files changed, 82 insertions(+), 34 deletions(-) diff --git a/clients/client-migration-hub-refactor-spaces/src/commands/CreateRouteCommand.ts b/clients/client-migration-hub-refactor-spaces/src/commands/CreateRouteCommand.ts index a3f36fcdfeb62..25dc75dd74601 100644 --- a/clients/client-migration-hub-refactor-spaces/src/commands/CreateRouteCommand.ts +++ b/clients/client-migration-hub-refactor-spaces/src/commands/CreateRouteCommand.ts @@ -138,6 +138,7 @@ export interface CreateRouteCommandOutput extends CreateRouteResponse, __Metadat * "STRING_VALUE", * ], * IncludeChildPaths: true || false, + * AppendSourcePath: true || false, * }, * Tags: { // TagMap * "": "STRING_VALUE", @@ -161,6 +162,7 @@ export interface CreateRouteCommandOutput extends CreateRouteResponse, __Metadat * // "STRING_VALUE", * // ], * // IncludeChildPaths: true || false, + * // AppendSourcePath: true || false, * // }, * // State: "STRING_VALUE", * // Tags: { // TagMap diff --git a/clients/client-migration-hub-refactor-spaces/src/commands/GetRouteCommand.ts b/clients/client-migration-hub-refactor-spaces/src/commands/GetRouteCommand.ts index 07b584e903cb4..adfd83dd9d877 100644 --- a/clients/client-migration-hub-refactor-spaces/src/commands/GetRouteCommand.ts +++ b/clients/client-migration-hub-refactor-spaces/src/commands/GetRouteCommand.ts @@ -87,6 +87,7 @@ export interface GetRouteCommandOutput extends GetRouteResponse, __MetadataBeare * // }, * // LastUpdatedTime: new Date("TIMESTAMP"), * // CreatedTime: new Date("TIMESTAMP"), + * // AppendSourcePath: true || false, * // }; * * ``` diff --git a/clients/client-migration-hub-refactor-spaces/src/commands/ListRoutesCommand.ts b/clients/client-migration-hub-refactor-spaces/src/commands/ListRoutesCommand.ts index 39e2fadb6a158..9cc11c70f72b7 100644 --- a/clients/client-migration-hub-refactor-spaces/src/commands/ListRoutesCommand.ts +++ b/clients/client-migration-hub-refactor-spaces/src/commands/ListRoutesCommand.ts @@ -90,6 +90,7 @@ export interface ListRoutesCommandOutput extends ListRoutesResponse, __MetadataB * // }, * // LastUpdatedTime: new Date("TIMESTAMP"), * // CreatedTime: new Date("TIMESTAMP"), + * // AppendSourcePath: true || false, * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-migration-hub-refactor-spaces/src/models/models_0.ts b/clients/client-migration-hub-refactor-spaces/src/models/models_0.ts index 4ef0c6a9839bd..7691e420ea8c4 100644 --- a/clients/client-migration-hub-refactor-spaces/src/models/models_0.ts +++ b/clients/client-migration-hub-refactor-spaces/src/models/models_0.ts @@ -91,8 +91,10 @@ export interface ApiGatewayProxyInput { * the request, the value is set to REGIONAL by default.

*

If the value is set to PRIVATE in the request, this creates a private API * endpoint that is isolated from the public internet. The private endpoint can only be accessed - * by using Amazon Virtual Private Cloud (Amazon VPC) endpoints for Amazon API Gateway that - * have been granted access.

+ * by using Amazon Virtual Private Cloud (Amazon VPC) interface endpoints for the Amazon API Gateway that has been granted access. + * For more information about creating a private connection with Refactor Spaces and interface + * endpoint (Amazon Web Services PrivateLink) availability, see Access + * Refactor Spaces using an interface endpoint (Amazon Web Services PrivateLink).

*/ EndpointType?: ApiGatewayEndpointType | string; @@ -841,8 +843,9 @@ export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod]; */ export interface UriPathRouteInput { /** - *

The path to use to match traffic. Paths must start with / and are relative to - * the base of the application.

+ *

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to + * the base of the application. To use path parameters in the source path, add a variable in curly braces. + * For example, the resource path \{user\} represents a path parameter called 'user'.

*/ SourcePath: string | undefined; @@ -864,6 +867,11 @@ export interface UriPathRouteInput { * this route's service.

*/ IncludeChildPaths?: boolean; + + /** + *

If set to true, this option appends the source path to the service URL endpoint.

+ */ + AppendSourcePath?: boolean; } /** @@ -1804,8 +1812,9 @@ export interface GetRouteResponse { EnvironmentId?: string; /** - *

The path to use to match traffic. Paths must start with / and are relative to - * the base of the application.

+ *

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to + * the base of the application. To use path parameters in the source path, add a variable in curly braces. + * For example, the resource path \{user\} represents a path parameter called 'user'.

*/ SourcePath?: string; @@ -1851,6 +1860,11 @@ export interface GetRouteResponse { *

The timestamp of when the route is created.

*/ CreatedTime?: Date; + + /** + *

If set to true, this option appends the source path to the service URL endpoint.

+ */ + AppendSourcePath?: boolean; } /** @@ -2202,8 +2216,8 @@ export interface RouteSummary { EnvironmentId?: string; /** - *

The path to use to match traffic. Paths must start with / and are relative to - * the base of the application.

+ *

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to + * the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path \{user\} represents a path parameter called 'user'.

*/ SourcePath?: string; @@ -2249,6 +2263,11 @@ export interface RouteSummary { *

A timestamp that indicates when the route is created.

*/ CreatedTime?: Date; + + /** + *

If set to true, this option appends the source path to the service URL endpoint.

+ */ + AppendSourcePath?: boolean; } /** diff --git a/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts b/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts index d499016832f36..cc93ad3b1a426 100644 --- a/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts +++ b/clients/client-migration-hub-refactor-spaces/src/protocols/Aws_restJson1.ts @@ -1846,6 +1846,7 @@ export const de_GetRouteCommand = async ( }); const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); const doc = take(data, { + AppendSourcePath: __expectBoolean, ApplicationId: __expectString, Arn: __expectString, CreatedByAccountId: __expectString, @@ -2885,6 +2886,7 @@ const de_RouteSummaries = (output: any, context: __SerdeContext): RouteSummary[] */ const de_RouteSummary = (output: any, context: __SerdeContext): RouteSummary => { return take(output, { + AppendSourcePath: __expectBoolean, ApplicationId: __expectString, Arn: __expectString, CreatedByAccountId: __expectString, diff --git a/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json b/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json index 52595374bd474..7af8f1dcfac68 100644 --- a/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json +++ b/codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json @@ -135,7 +135,7 @@ "EndpointType": { "target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType", "traits": { - "smithy.api#documentation": "

The type of endpoint to use for the API Gateway proxy. If no value is specified in\n the request, the value is set to REGIONAL by default.

\n

If the value is set to PRIVATE in the request, this creates a private API\n endpoint that is isolated from the public internet. The private endpoint can only be accessed\n by using Amazon Virtual Private Cloud (Amazon VPC) endpoints for Amazon API Gateway that\n have been granted access.

" + "smithy.api#documentation": "

The type of endpoint to use for the API Gateway proxy. If no value is specified in\n the request, the value is set to REGIONAL by default.

\n

If the value is set to PRIVATE in the request, this creates a private API\n endpoint that is isolated from the public internet. The private endpoint can only be accessed\n by using Amazon Virtual Private Cloud (Amazon VPC) interface endpoints for the Amazon API Gateway that has been granted access.\n For more information about creating a private connection with Refactor Spaces and interface\n endpoint (Amazon Web Services PrivateLink) availability, see Access\n Refactor Spaces using an interface endpoint (Amazon Web Services PrivateLink).

" } }, "StageName": { @@ -2428,7 +2428,7 @@ "SourcePath": { "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", "traits": { - "smithy.api#documentation": "

The path to use to match traffic. Paths must start with / and are relative to\n the base of the application.

" + "smithy.api#documentation": "

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to\n the base of the application. To use path parameters in the source path, add a variable in curly braces. \n For example, the resource path {user} represents a path parameter called 'user'.

" } }, "Methods": { @@ -2478,6 +2478,12 @@ "traits": { "smithy.api#documentation": "

The timestamp of when the route is created.

" } + }, + "AppendSourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "

If set to true, this option appends the source path to the service URL endpoint.

" + } } } }, @@ -2819,8 +2825,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults", - "items": "ApplicationSummaryList" + "items": "ApplicationSummaryList", + "pageSize": "MaxResults" }, "smithy.api#readonly": {} } @@ -2904,8 +2910,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults", - "items": "EnvironmentVpcList" + "items": "EnvironmentVpcList", + "pageSize": "MaxResults" }, "smithy.api#readonly": {} } @@ -2989,8 +2995,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults", - "items": "EnvironmentSummaryList" + "items": "EnvironmentSummaryList", + "pageSize": "MaxResults" }, "smithy.api#readonly": {} } @@ -3072,8 +3078,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults", - "items": "RouteSummaryList" + "items": "RouteSummaryList", + "pageSize": "MaxResults" }, "smithy.api#readonly": {} } @@ -3171,8 +3177,8 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", - "pageSize": "MaxResults", - "items": "ServiceSummaryList" + "items": "ServiceSummaryList", + "pageSize": "MaxResults" }, "smithy.api#readonly": {} } @@ -3252,7 +3258,8 @@ "smithy.api#documentation": "

Lists the tags of a resource. The caller account must be the same as the resource’s\n OwnerAccountId. Listing tags in other accounts is not supported.

", "smithy.api#http": { "method": "GET", - "uri": "/tags/{ResourceArn}" + "uri": "/tags/{ResourceArn}", + "code": 200 }, "smithy.api#readonly": {} } @@ -3525,23 +3532,25 @@ "traits": { "aws.api#service": { "sdkId": "Migration Hub Refactor Spaces", - "arnNamespace": "refactor-spaces" + "arnNamespace": "refactor-spaces", + "cloudFormationName": "RefactorSpaces", + "cloudTrailEventSource": "refactor-spaces.amazonaws.com", + "endpointPrefix": "refactor-spaces" }, "aws.auth#sigv4": { "name": "refactor-spaces" }, "aws.protocols#restJson1": {}, "smithy.api#cors": { + "additionalAllowedHeaders": ["content-type"], "additionalExposedHeaders": [ + "date", + "x-amz-apigw-id", + "x-amzn-trace-id", "x-amzn-errortype", "x-amzn-requestid", - "x-amzn-errormessage", - "x-amzn-trace-id", - "x-amz-apigw-id", - "date" - ], - "additionalAllowedHeaders": ["content-type"], - "origin": "*" + "x-amzn-errormessage" + ] }, "smithy.api#documentation": "Amazon Web Services Migration Hub Refactor Spaces\n

This API reference provides descriptions, syntax, and other details about each of the\n actions and data types for Amazon Web Services Migration Hub Refactor Spaces (Refactor Spaces). The topic for each action shows the API\n request parameters and the response. Alternatively, you can use one of the Amazon Web Services SDKs to\n access an API that is tailored to the programming language or platform that you're using. For\n more information, see Amazon Web Services SDKs.

\n

To share Refactor Spaces environments with other Amazon Web Services accounts or with Organizations\n and their OUs, use Resource Access Manager's CreateResourceShare API. See CreateResourceShare in the Amazon Web Services RAM API Reference.

", "smithy.api#title": "AWS Migration Hub Refactor Spaces", @@ -4393,7 +4402,7 @@ "SourcePath": { "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", "traits": { - "smithy.api#documentation": "

The path to use to match traffic. Paths must start with / and are relative to\n the base of the application.

" + "smithy.api#documentation": "

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to\n the base of the application. To use path parameters in the source path, add a variable in curly braces. For example, the resource path {user} represents a path parameter called 'user'.

" } }, "Methods": { @@ -4443,6 +4452,12 @@ "traits": { "smithy.api#documentation": "

A timestamp that indicates when the route is created.

" } + }, + "AppendSourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "

If set to true, this option appends the source path to the service URL endpoint.

" + } } }, "traits": { @@ -4754,7 +4769,8 @@ "smithy.api#documentation": "

Removes the tags of a given resource. Tags are metadata which can be used to manage a\n resource. To tag a resource, the caller account must be the same as the resource’s\n OwnerAccountId. Tagging resources in other accounts is not supported.

\n \n

Amazon Web Services Migration Hub Refactor Spaces does not propagate tags to orchestrated resources, such as an\n environment’s transit gateway.

\n
", "smithy.api#http": { "method": "POST", - "uri": "/tags/{ResourceArn}" + "uri": "/tags/{ResourceArn}", + "code": 200 } } }, @@ -4854,7 +4870,8 @@ "smithy.api#documentation": "

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to\n manage a resource. To untag a resource, the caller account must be the same as the resource’s\n OwnerAccountId. Untagging resources across accounts is not supported.

", "smithy.api#http": { "method": "DELETE", - "uri": "/tags/{ResourceArn}" + "uri": "/tags/{ResourceArn}", + "code": 200 }, "smithy.api#idempotent": {} } @@ -5012,7 +5029,7 @@ "min": 1, "max": 2048 }, - "smithy.api#pattern": "^(/[a-zA-Z0-9._-]+)+$" + "smithy.api#pattern": "^(/([a-zA-Z0-9._:-]+|\\{[a-zA-Z0-9._:-]+\\}))+$" } }, "com.amazonaws.migrationhubrefactorspaces#UriPathRouteInput": { @@ -5021,7 +5038,7 @@ "SourcePath": { "target": "com.amazonaws.migrationhubrefactorspaces#UriPath", "traits": { - "smithy.api#documentation": "

The path to use to match traffic. Paths must start with / and are relative to\n the base of the application.

", + "smithy.api#documentation": "

This is the path that Refactor Spaces uses to match traffic. Paths must start with / and are relative to\n the base of the application. To use path parameters in the source path, add a variable in curly braces.\n For example, the resource path {user} represents a path parameter called 'user'.

", "smithy.api#required": {} } }, @@ -5043,6 +5060,12 @@ "traits": { "smithy.api#documentation": "

Indicates whether to match all subpaths of the given source path. If this value is\n false, requests must match the source path exactly before they are forwarded to\n this route's service.

" } + }, + "AppendSourcePath": { + "target": "com.amazonaws.migrationhubrefactorspaces#Boolean", + "traits": { + "smithy.api#documentation": "

If set to true, this option appends the source path to the service URL endpoint.

" + } } }, "traits": {