CreateApplicationCommand

Creates an Amazon Web Services Migration Hub Refactor Spaces application. The account that owns the environment also owns the applications created inside the environment, regardless of the account that creates the application. Refactor Spaces provisions an Amazon API Gateway, API Gateway VPC link, and Network Load Balancer for the application proxy inside your account.

In environments created with a CreateEnvironment:NetworkFabricType  of NONE you need to configure VPC to VPC connectivity  between your service VPC and the application proxy VPC to route traffic through the application proxy to a service with a private URL endpoint. For more information, see Create an application  in the Refactor Spaces User Guide.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { MigrationHubRefactorSpacesClient, CreateApplicationCommand } from "@aws-sdk/client-migration-hub-refactor-spaces"; // ES Modules import
// const { MigrationHubRefactorSpacesClient, CreateApplicationCommand } = require("@aws-sdk/client-migration-hub-refactor-spaces"); // CommonJS import
const client = new MigrationHubRefactorSpacesClient(config);
const input = { // CreateApplicationRequest
  Name: "STRING_VALUE", // required
  EnvironmentIdentifier: "STRING_VALUE", // required
  VpcId: "STRING_VALUE", // required
  ProxyType: "STRING_VALUE", // required
  ApiGatewayProxy: { // ApiGatewayProxyInput
    EndpointType: "STRING_VALUE",
    StageName: "STRING_VALUE",
  },
  Tags: { // TagMap
    "<keys>": "STRING_VALUE",
  },
  ClientToken: "STRING_VALUE",
};
const command = new CreateApplicationCommand(input);
const response = await client.send(command);
// { // CreateApplicationResponse
//   Name: "STRING_VALUE",
//   Arn: "STRING_VALUE",
//   OwnerAccountId: "STRING_VALUE",
//   CreatedByAccountId: "STRING_VALUE",
//   ApplicationId: "STRING_VALUE",
//   EnvironmentId: "STRING_VALUE",
//   VpcId: "STRING_VALUE",
//   ProxyType: "STRING_VALUE",
//   ApiGatewayProxy: { // ApiGatewayProxyInput
//     EndpointType: "STRING_VALUE",
//     StageName: "STRING_VALUE",
//   },
//   State: "STRING_VALUE",
//   Tags: { // TagMap
//     "<keys>": "STRING_VALUE",
//   },
//   LastUpdatedTime: new Date("TIMESTAMP"),
//   CreatedTime: new Date("TIMESTAMP"),
// };

CreateApplicationCommand Input

See CreateApplicationCommandInput for more details

Parameter
Type
Description
EnvironmentIdentifier
Required
string | undefined

The unique identifier of the environment.

Name
Required
string | undefined

The name to use for the application.

ProxyType
Required
ProxyType | undefined

The proxy type of the proxy created within the application.

VpcId
Required
string | undefined

The ID of the virtual private cloud (VPC).

ApiGatewayProxy
ApiGatewayProxyInput | undefined

A wrapper object holding the API Gateway endpoint type and stage name for the proxy.

ClientToken
string | undefined

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Tags
Record<string, string> | undefined

The tags to assign to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.

CreateApplicationCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ApiGatewayProxy
ApiGatewayProxyInput | undefined

A wrapper object holding the API Gateway endpoint type and stage name for the proxy.

ApplicationId
string | undefined

The unique identifier of the application.

Arn
string | undefined

The Amazon Resource Name (ARN) of the application. The format for this ARN is arn:aws:refactor-spaces:region:account-id:resource-type/resource-id . For more information about ARNs, see Amazon Resource Names (ARNs)  in the Amazon Web Services General Reference.

CreatedByAccountId
string | undefined

The Amazon Web Services account ID of application creator.

CreatedTime
Date | undefined

A timestamp that indicates when the application is created.

EnvironmentId
string | undefined

The ID of the environment in which the application is created.

LastUpdatedTime
Date | undefined

A timestamp that indicates when the application was last updated.

Name
string | undefined

The name of the application.

OwnerAccountId
string | undefined

The Amazon Web Services account ID of the application owner (which is always the same as the environment owner account ID).

ProxyType
ProxyType | undefined

The proxy type of the proxy created within the application.

State
ApplicationState | undefined

The current state of the application.

Tags
Record<string, string> | undefined

The tags assigned to the application. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair.

VpcId
string | undefined

The ID of the Amazon VPC.

Throws

Name
Fault
Details
AccessDeniedException
client

The user does not have sufficient access to perform this action.

ConflictException
client

Updating or deleting a resource can cause an inconsistent state.

InternalServerException
server

An unexpected error occurred while processing the request.

ResourceNotFoundException
client

The request references a resource that does not exist.

ServiceQuotaExceededException
client

The request would cause a service quota to be exceeded.

ThrottlingException
client

Request was denied because the request was throttled.

ValidationException
client

The input does not satisfy the constraints specified by an Amazon Web Service.

MigrationHubRefactorSpacesServiceException
Base exception class for all service exceptions from MigrationHubRefactorSpaces service.