Skip to content

Commit

Permalink
feat(client-migration-hub-refactor-spaces): This SDK update allows fo…
Browse files Browse the repository at this point in the history
…r 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.
  • Loading branch information
awstools committed May 25, 2023
1 parent d7d3a70 commit 75a8506
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export interface CreateRouteCommandOutput extends CreateRouteResponse, __Metadat
* "STRING_VALUE",
* ],
* IncludeChildPaths: true || false,
* AppendSourcePath: true || false,
* },
* Tags: { // TagMap
* "<keys>": "STRING_VALUE",
Expand All @@ -161,6 +162,7 @@ export interface CreateRouteCommandOutput extends CreateRouteResponse, __Metadat
* // "STRING_VALUE",
* // ],
* // IncludeChildPaths: true || false,
* // AppendSourcePath: true || false,
* // },
* // State: "STRING_VALUE",
* // Tags: { // TagMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export interface GetRouteCommandOutput extends GetRouteResponse, __MetadataBeare
* // },
* // LastUpdatedTime: new Date("TIMESTAMP"),
* // CreatedTime: new Date("TIMESTAMP"),
* // AppendSourcePath: true || false,
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export interface ListRoutesCommandOutput extends ListRoutesResponse, __MetadataB
* // },
* // LastUpdatedTime: new Date("TIMESTAMP"),
* // CreatedTime: new Date("TIMESTAMP"),
* // AppendSourcePath: true || false,
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ export interface ApiGatewayProxyInput {
* the request, the value is set to <code>REGIONAL</code> by default.</p>
* <p>If the value is set to <code>PRIVATE</code> 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. </p>
* 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 <a href="https://docs.aws.amazon.com/migrationhub-refactor-spaces/latest/userguide/vpc-interface-endpoints.html">Access
* Refactor Spaces using an interface endpoint (Amazon Web Services PrivateLink)</a>.</p>
*/
EndpointType?: ApiGatewayEndpointType | string;

Expand Down Expand Up @@ -841,8 +843,9 @@ export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
*/
export interface UriPathRouteInput {
/**
* <p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to
* the base of the application.</p>
* <p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>
*/
SourcePath: string | undefined;

Expand All @@ -864,6 +867,11 @@ export interface UriPathRouteInput {
* this route's service. </p>
*/
IncludeChildPaths?: boolean;

/**
* <p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>
*/
AppendSourcePath?: boolean;
}

/**
Expand Down Expand Up @@ -1804,8 +1812,9 @@ export interface GetRouteResponse {
EnvironmentId?: string;

/**
* <p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to
* the base of the application. </p>
* <p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>
*/
SourcePath?: string;

Expand Down Expand Up @@ -1851,6 +1860,11 @@ export interface GetRouteResponse {
* <p>The timestamp of when the route is created. </p>
*/
CreatedTime?: Date;

/**
* <p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>
*/
AppendSourcePath?: boolean;
}

/**
Expand Down Expand Up @@ -2202,8 +2216,8 @@ export interface RouteSummary {
EnvironmentId?: string;

/**
* <p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to
* the base of the application.</p>
* <p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>
*/
SourcePath?: string;

Expand Down Expand Up @@ -2249,6 +2263,11 @@ export interface RouteSummary {
* <p>A timestamp that indicates when the route is created. </p>
*/
CreatedTime?: Date;

/**
* <p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>
*/
AppendSourcePath?: boolean;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,7 @@ export const de_GetRouteCommand = async (
});
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
const doc = take(data, {
AppendSourcePath: __expectBoolean,
ApplicationId: __expectString,
Arn: __expectString,
CreatedByAccountId: __expectString,
Expand Down Expand Up @@ -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,
Expand Down
75 changes: 49 additions & 26 deletions codegen/sdk-codegen/aws-models/migration-hub-refactor-spaces.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"EndpointType": {
"target": "com.amazonaws.migrationhubrefactorspaces#ApiGatewayEndpointType",
"traits": {
"smithy.api#documentation": "<p>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 <code>REGIONAL</code> by default.</p>\n <p>If the value is set to <code>PRIVATE</code> 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. </p>"
"smithy.api#documentation": "<p>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 <code>REGIONAL</code> by default.</p>\n <p>If the value is set to <code>PRIVATE</code> 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 <a href=\"https://docs.aws.amazon.com/migrationhub-refactor-spaces/latest/userguide/vpc-interface-endpoints.html\">Access\n Refactor Spaces using an interface endpoint (Amazon Web Services PrivateLink)</a>.</p>"
}
},
"StageName": {
Expand Down Expand Up @@ -2428,7 +2428,7 @@
"SourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#UriPath",
"traits": {
"smithy.api#documentation": "<p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to\n the base of the application. </p>"
"smithy.api#documentation": "<p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>"
}
},
"Methods": {
Expand Down Expand Up @@ -2478,6 +2478,12 @@
"traits": {
"smithy.api#documentation": "<p>The timestamp of when the route is created. </p>"
}
},
"AppendSourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#Boolean",
"traits": {
"smithy.api#documentation": "<p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>"
}
}
}
},
Expand Down Expand Up @@ -2819,8 +2825,8 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"pageSize": "MaxResults",
"items": "ApplicationSummaryList"
"items": "ApplicationSummaryList",
"pageSize": "MaxResults"
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -2904,8 +2910,8 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"pageSize": "MaxResults",
"items": "EnvironmentVpcList"
"items": "EnvironmentVpcList",
"pageSize": "MaxResults"
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -2989,8 +2995,8 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"pageSize": "MaxResults",
"items": "EnvironmentSummaryList"
"items": "EnvironmentSummaryList",
"pageSize": "MaxResults"
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -3072,8 +3078,8 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"pageSize": "MaxResults",
"items": "RouteSummaryList"
"items": "RouteSummaryList",
"pageSize": "MaxResults"
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -3171,8 +3177,8 @@
"smithy.api#paginated": {
"inputToken": "NextToken",
"outputToken": "NextToken",
"pageSize": "MaxResults",
"items": "ServiceSummaryList"
"items": "ServiceSummaryList",
"pageSize": "MaxResults"
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -3252,7 +3258,8 @@
"smithy.api#documentation": "<p>Lists the tags of a resource. The caller account must be the same as the resource’s\n <code>OwnerAccountId</code>. Listing tags in other accounts is not supported. </p>",
"smithy.api#http": {
"method": "GET",
"uri": "/tags/{ResourceArn}"
"uri": "/tags/{ResourceArn}",
"code": 200
},
"smithy.api#readonly": {}
}
Expand Down Expand Up @@ -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": "<fullname>Amazon Web Services Migration Hub Refactor Spaces</fullname>\n <p>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 <a href=\"https://aws.amazon.com/tools/#SDKs\">Amazon Web Services SDKs</a>.</p>\n <p>To share Refactor Spaces environments with other Amazon Web Services accounts or with Organizations\n and their OUs, use Resource Access Manager's <code>CreateResourceShare</code> API. See <a href=\"https://docs.aws.amazon.com/ram/latest/APIReference/API_CreateResourceShare.html\">CreateResourceShare</a> in the <i>Amazon Web Services RAM API Reference</i>.</p>",
"smithy.api#title": "AWS Migration Hub Refactor Spaces",
Expand Down Expand Up @@ -4393,7 +4402,7 @@
"SourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#UriPath",
"traits": {
"smithy.api#documentation": "<p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to\n the base of the application.</p>"
"smithy.api#documentation": "<p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>"
}
},
"Methods": {
Expand Down Expand Up @@ -4443,6 +4452,12 @@
"traits": {
"smithy.api#documentation": "<p>A timestamp that indicates when the route is created. </p>"
}
},
"AppendSourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#Boolean",
"traits": {
"smithy.api#documentation": "<p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -4754,7 +4769,8 @@
"smithy.api#documentation": "<p>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 <code>OwnerAccountId</code>. Tagging resources in other accounts is not supported.</p>\n <note>\n <p>Amazon Web Services Migration Hub Refactor Spaces does not propagate tags to orchestrated resources, such as an\n environment’s transit gateway.</p>\n </note>",
"smithy.api#http": {
"method": "POST",
"uri": "/tags/{ResourceArn}"
"uri": "/tags/{ResourceArn}",
"code": 200
}
}
},
Expand Down Expand Up @@ -4854,7 +4870,8 @@
"smithy.api#documentation": "<p>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 <code>OwnerAccountId</code>. Untagging resources across accounts is not supported. </p>",
"smithy.api#http": {
"method": "DELETE",
"uri": "/tags/{ResourceArn}"
"uri": "/tags/{ResourceArn}",
"code": 200
},
"smithy.api#idempotent": {}
}
Expand Down Expand Up @@ -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": {
Expand All @@ -5021,7 +5038,7 @@
"SourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#UriPath",
"traits": {
"smithy.api#documentation": "<p>The path to use to match traffic. Paths must start with <code>/</code> and are relative to\n the base of the application.</p>",
"smithy.api#documentation": "<p>This is the path that Refactor Spaces uses to match traffic. Paths must start with <code>/</code> 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'.</p>",
"smithy.api#required": {}
}
},
Expand All @@ -5043,6 +5060,12 @@
"traits": {
"smithy.api#documentation": "<p>Indicates whether to match all subpaths of the given source path. If this value is\n <code>false</code>, requests must match the source path exactly before they are forwarded to\n this route's service. </p>"
}
},
"AppendSourcePath": {
"target": "com.amazonaws.migrationhubrefactorspaces#Boolean",
"traits": {
"smithy.api#documentation": "<p>If set to <code>true</code>, this option appends the source path to the service URL endpoint.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 75a8506

Please sign in to comment.