CmdID

CmdID / aws / aws appmesh

aws appmesh create-virtual-router

Creates a virtual router within a service mesh. AWS CLI reference

1 example 6 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a new virtual router

The following create-virtual-router example uses a JSON input file to create a virtual router with a listener for HTTP using port 80.

aws appmesh create-virtual-router --cli-input-json file://create-virtual-router.jsonIdentify

Contents of create-virtual-router.json:

{
    "meshName": "app1",
    "spec": {
        "listeners": [
            {
                "portMapping": {
                    "port": 80,
                    "protocol": "http"
                }
            }
        ]
    },
    "virtualRouterName": "vrServiceB"
}
Its output
{
    "virtualRouter": {
        "meshName": "app1",
        "metadata": {
            "arn": "arn:aws:appmesh:us-west-2:123456789012:mesh/app1/virtualRouter/vrServiceB",
            "createdAt": 1563810546.59,
            "lastUpdatedAt": 1563810546.59,
            "uid": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "version": 1
        },
        "spec": {
            "listeners": [
                {
                    "portMapping": {
                        "port": 80,
                        "protocol": "http"
                    }
                }
            ]
        },
        "status": {
            "status": "ACTIVE"
        },
        "virtualRouterName": "vrServiceB"
    }
}

For more information, see Virtual Routers in the AWS App Mesh User Guide.

Options

6 in the AWS CLI reference
--client-tokenUnique, case-sensitive identifier that you provide to ensure the idempotency of the request.
--mesh-nameThe name of the service mesh to create the virtual router in.
--mesh-ownerThe Amazon Web Services IAM account ID of the service mesh owner.
--specThe virtual router specification to apply.
--tagsOptional metadata that you can apply to the virtual router to assist with categorization and organization.
--virtual-router-nameThe name to use for the virtual router.