VirtualService

Provides an AWS App Mesh virtual service resource.

Example Usage

Virtual Node Provider

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var servicea = new Aws.AppMesh.VirtualService("servicea", new Aws.AppMesh.VirtualServiceArgs
        {
            MeshName = aws_appmesh_mesh.Simple.Id,
            Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
            {
                Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
                {
                    VirtualNode = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualNodeArgs
                    {
                        VirtualNodeName = aws_appmesh_virtual_node.Serviceb1.Name,
                    },
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/appmesh"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := appmesh.NewVirtualService(ctx, "servicea", &appmesh.VirtualServiceArgs{
            MeshName: pulumi.String(aws_appmesh_mesh.Simple.Id),
            Spec: &appmesh.VirtualServiceSpecArgs{
                Provider: &appmesh.VirtualServiceSpecProviderArgs{
                    VirtualNode: &appmesh.VirtualServiceSpecProviderVirtualNodeArgs{
                        VirtualNodeName: pulumi.String(aws_appmesh_virtual_node.Serviceb1.Name),
                    },
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

servicea = aws.appmesh.VirtualService("servicea",
    mesh_name=aws_appmesh_mesh["simple"]["id"],
    spec={
        "provider": {
            "virtualNode": {
                "virtualNodeName": aws_appmesh_virtual_node["serviceb1"]["name"],
            },
        },
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const servicea = new aws.appmesh.VirtualService("servicea", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        provider: {
            virtualNode: {
                virtualNodeName: aws_appmesh_virtual_node_serviceb1.name,
            },
        },
    },
});

Virtual Router Provider

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var servicea = new Aws.AppMesh.VirtualService("servicea", new Aws.AppMesh.VirtualServiceArgs
        {
            MeshName = aws_appmesh_mesh.Simple.Id,
            Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
            {
                Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
                {
                    VirtualRouter = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualRouterArgs
                    {
                        VirtualRouterName = aws_appmesh_virtual_router.Serviceb.Name,
                    },
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/appmesh"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := appmesh.NewVirtualService(ctx, "servicea", &appmesh.VirtualServiceArgs{
            MeshName: pulumi.String(aws_appmesh_mesh.Simple.Id),
            Spec: &appmesh.VirtualServiceSpecArgs{
                Provider: &appmesh.VirtualServiceSpecProviderArgs{
                    VirtualRouter: &appmesh.VirtualServiceSpecProviderVirtualRouterArgs{
                        VirtualRouterName: pulumi.String(aws_appmesh_virtual_router.Serviceb.Name),
                    },
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

servicea = aws.appmesh.VirtualService("servicea",
    mesh_name=aws_appmesh_mesh["simple"]["id"],
    spec={
        "provider": {
            "virtualRouter": {
                "virtual_router_name": aws_appmesh_virtual_router["serviceb"]["name"],
            },
        },
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const servicea = new aws.appmesh.VirtualService("servicea", {
    meshName: aws_appmesh_mesh_simple.id,
    spec: {
        provider: {
            virtualRouter: {
                virtualRouterName: aws_appmesh_virtual_router_serviceb.name,
            },
        },
    },
});

Create a VirtualService Resource

def VirtualService(resource_name, opts=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);
name string
The unique name of the resource.
args VirtualServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VirtualServiceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VirtualServiceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VirtualService Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The VirtualService resource accepts the following input properties:

MeshName string

The name of the service mesh in which to create the virtual service.

Spec VirtualServiceSpecArgs

The virtual service specification to apply.

Name string

The name to use for the virtual service.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

MeshName string

The name of the service mesh in which to create the virtual service.

Spec VirtualServiceSpec

The virtual service specification to apply.

Name string

The name to use for the virtual service.

Tags map[string]string

A map of tags to assign to the resource.

meshName string

The name of the service mesh in which to create the virtual service.

spec VirtualServiceSpec

The virtual service specification to apply.

name string

The name to use for the virtual service.

tags {[key: string]: string}

A map of tags to assign to the resource.

mesh_name str

The name of the service mesh in which to create the virtual service.

spec Dict[VirtualServiceSpec]

The virtual service specification to apply.

name str

The name to use for the virtual service.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the VirtualService resource produces the following output properties:

Arn string

The ARN of the virtual service.

CreatedDate string

The creation date of the virtual service.

Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string

The last update date of the virtual service.

Arn string

The ARN of the virtual service.

CreatedDate string

The creation date of the virtual service.

Id string
The provider-assigned unique ID for this managed resource.
LastUpdatedDate string

The last update date of the virtual service.

arn string

The ARN of the virtual service.

createdDate string

The creation date of the virtual service.

id string
The provider-assigned unique ID for this managed resource.
lastUpdatedDate string

The last update date of the virtual service.

arn str

The ARN of the virtual service.

created_date str

The creation date of the virtual service.

id str
The provider-assigned unique ID for this managed resource.
last_updated_date str

The last update date of the virtual service.

Look up an Existing VirtualService Resource

Get an existing VirtualService resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VirtualServiceState, opts?: CustomResourceOptions): VirtualService
static get(resource_name, id, opts=None, arn=None, created_date=None, last_updated_date=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);
func GetVirtualService(ctx *Context, name string, id IDInput, state *VirtualServiceState, opts ...ResourceOption) (*VirtualService, error)
public static VirtualService Get(string name, Input<string> id, VirtualServiceState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The ARN of the virtual service.

CreatedDate string

The creation date of the virtual service.

LastUpdatedDate string

The last update date of the virtual service.

MeshName string

The name of the service mesh in which to create the virtual service.

Name string

The name to use for the virtual service.

Spec VirtualServiceSpecArgs

The virtual service specification to apply.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string

The ARN of the virtual service.

CreatedDate string

The creation date of the virtual service.

LastUpdatedDate string

The last update date of the virtual service.

MeshName string

The name of the service mesh in which to create the virtual service.

Name string

The name to use for the virtual service.

Spec VirtualServiceSpec

The virtual service specification to apply.

Tags map[string]string

A map of tags to assign to the resource.

arn string

The ARN of the virtual service.

createdDate string

The creation date of the virtual service.

lastUpdatedDate string

The last update date of the virtual service.

meshName string

The name of the service mesh in which to create the virtual service.

name string

The name to use for the virtual service.

spec VirtualServiceSpec

The virtual service specification to apply.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str

The ARN of the virtual service.

created_date str

The creation date of the virtual service.

last_updated_date str

The last update date of the virtual service.

mesh_name str

The name of the service mesh in which to create the virtual service.

name str

The name to use for the virtual service.

spec Dict[VirtualServiceSpec]

The virtual service specification to apply.

tags Dict[str, str]

A map of tags to assign to the resource.

Supporting Types

VirtualServiceSpec

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Provider VirtualServiceSpecProviderArgs

The App Mesh object that is acting as the provider for a virtual service. You can specify a single virtual node or virtual router.

Provider VirtualServiceSpecProvider

The App Mesh object that is acting as the provider for a virtual service. You can specify a single virtual node or virtual router.

provider VirtualServiceSpecProvider

The App Mesh object that is acting as the provider for a virtual service. You can specify a single virtual node or virtual router.

provider Dict[VirtualServiceSpecProvider]

The App Mesh object that is acting as the provider for a virtual service. You can specify a single virtual node or virtual router.

VirtualServiceSpecProvider

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

VirtualNode VirtualServiceSpecProviderVirtualNodeArgs

The virtual node associated with a virtual service.

VirtualRouter VirtualServiceSpecProviderVirtualRouterArgs

The virtual router associated with a virtual service.

VirtualNode VirtualServiceSpecProviderVirtualNode

The virtual node associated with a virtual service.

VirtualRouter VirtualServiceSpecProviderVirtualRouter

The virtual router associated with a virtual service.

virtualNode VirtualServiceSpecProviderVirtualNode

The virtual node associated with a virtual service.

virtualRouter VirtualServiceSpecProviderVirtualRouter

The virtual router associated with a virtual service.

virtualNode Dict[VirtualServiceSpecProviderVirtualNode]

The virtual node associated with a virtual service.

virtualRouter Dict[VirtualServiceSpecProviderVirtualRouter]

The virtual router associated with a virtual service.

VirtualServiceSpecProviderVirtualNode

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

VirtualNodeName string

The name of the virtual node that is acting as a service provider.

VirtualNodeName string

The name of the virtual node that is acting as a service provider.

virtualNodeName string

The name of the virtual node that is acting as a service provider.

virtualNodeName str

The name of the virtual node that is acting as a service provider.

VirtualServiceSpecProviderVirtualRouter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

VirtualRouterName string

The name of the virtual router that is acting as a service provider.

VirtualRouterName string

The name of the virtual router that is acting as a service provider.

virtualRouterName string

The name of the virtual router that is acting as a service provider.

virtual_router_name str

The name of the virtual router that is acting as a service provider.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.