404

[ Avaa Bypassed ]




Upload:

Command:

botdev@18.188.163.142: ~ $
**Example 1: To create a new virtual node that uses DNS for discovery**

The following ``create-virtual-node`` example uses a JSON input file to create a virtual node that uses DNS for service discovery. ::

    aws appmesh create-virtual-node \
        --cli-input-json file://create-virtual-node-dns.json

Contents of ``create-virtual-node-dns.json``::

    {
        "meshName": "app1",
        "spec": {
            "listeners": [
                {
                    "portMapping": {
                        "port": 80,
                        "protocol": "http"
                    }
                }
            ],
            "serviceDiscovery": {
                "dns": {
                    "hostname": "serviceBv1.svc.cluster.local"
                }
            }
        },
        "virtualNodeName": "vnServiceBv1"
    }

Output::

    {
        "virtualNode": {
            "meshName": "app1",
            "metadata": {
                "arn": "arn:aws:appmesh:us-east-1:123456789012:mesh/app1/virtualNode/vnServiceBv1",
                "createdAt": 1563810019.874,
                "lastUpdatedAt": 1563810019.874,
                "uid": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
                "version": 1
            },
            "spec": {
                "listeners": [
                    {
                        "portMapping": {
                            "port": 80,
                            "protocol": "http"
                        }
                    }
                ],
                "serviceDiscovery": {
                    "dns": {
                        "hostname": "serviceBv1.svc.cluster.local"
                    }
                }
            },
            "status": {
                "status": "ACTIVE"
            },
            "virtualNodeName": "vnServiceBv1"
        }
    }

**Example 2: To create a new virtual node that uses AWS Cloud Map for discovery**

The following ``create-virtual-node`` example uses a JSON input file to create a virtual node that uses AWS Cloud Map for service discovery. ::

    aws appmesh create-virtual-node \
        --cli-input-json file://create-virtual-node-cloud-map.json

Contents of ``create-virtual-node-cloud-map.json``::

    {
        "meshName": "app1",
        "spec": {
            "backends": [
                {
                    "virtualService": {
                        "virtualServiceName": "serviceA.svc.cluster.local"
                    }
                }
            ],
            "listeners": [
                {
                    "portMapping": {
                        "port": 80,
                        "protocol": "http"
                    }
                }
            ],
            "serviceDiscovery": {
                "awsCloudMap": {
                    "attributes": [
                        {
                            "key": "Environment",
                            "value": "Testing"
                        }
                    ],
                    "namespaceName": "namespace1",
                    "serviceName": "serviceA"
                }
            }
        },
        "virtualNodeName": "vnServiceA"
    }

Output::

    {
        "virtualNode": {
            "meshName": "app1",
            "metadata": {
                "arn": "arn:aws:appmesh:us-east-1:123456789012:mesh/app1/virtualNode/vnServiceA",
                "createdAt": 1563810859.465,
                "lastUpdatedAt": 1563810859.465,
                "uid": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE",
                "version": 1
            },
            "spec": {
                "backends": [
                    {
                        "virtualService": {
                            "virtualServiceName": "serviceA.svc.cluster.local"
                        }
                    }
                ],
                "listeners": [
                    {
                        "portMapping": {
                            "port": 80,
                            "protocol": "http"
                        }
                    }
                ],
                "serviceDiscovery": {
                    "awsCloudMap": {
                        "attributes": [
                            {
                                "key": "Environment",
                                "value": "Testing"
                            }
                        ],
                        "namespaceName": "namespace1",
                        "serviceName": "serviceA"
                    }
                }
            },
            "status": {
                "status": "ACTIVE"
            },
            "virtualNodeName": "vnServiceA"
        }
    }

For more information, see `Virtual Nodes <https://docs.aws.amazon.com/app-mesh/latest/userguide/virtual_nodes.html>`__ in the *AWS App Mesh User Guide*.

Filemanager

Name Type Size Permission Actions
create-mesh.rst File 1.56 KB 0644
create-route.rst File 10.57 KB 0644
create-virtual-gateway.rst File 1.74 KB 0644
create-virtual-node.rst File 4.87 KB 0644
create-virtual-router.rst File 1.59 KB 0644
create-virtual-service.rst File 3.08 KB 0644
delete-mesh.rst File 907 B 0644
delete-route.rst File 1.59 KB 0644
delete-virtual-node.rst File 1.37 KB 0644
delete-virtual-router.rst File 1.18 KB 0644
delete-virtual-service.rst File 1009 B 0644
describe-mesh.rst File 821 B 0644
describe-route.rst File 1.61 KB 0644
describe-virtual-node.rst File 1.39 KB 0644
describe-virtual-router.rst File 1.2 KB 0644
describe-virtual-service.rst File 1.18 KB 0644
list-meshes.rst File 500 B 0644
list-routes.rst File 698 B 0644
list-tags-for-resource.rst File 589 B 0644
list-virtual-nodes.rst File 842 B 0644
list-virtual-routers.rst File 641 B 0644
list-virtual-services.rst File 931 B 0644
tag-resource.rst File 317 B 0644
untag-resource.rst File 299 B 0644
update-mesh.rst File 1.18 KB 0644
update-route.rst File 2.29 KB 0644
update-virtual-node.rst File 2.65 KB 0644
update-virtual-router.rst File 1.57 KB 0644
update-virtual-service.rst File 1.5 KB 0644