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
new VirtualService(name: string, args: VirtualServiceArgs, opts?: CustomResourceOptions);def VirtualService(resource_name, opts=None, mesh_name=None, name=None, spec=None, tags=None, __props__=None);func NewVirtualService(ctx *Context, name string, args VirtualServiceArgs, opts ...ResourceOption) (*VirtualService, error)public VirtualService(string name, VirtualServiceArgs args, CustomResourceOptions? opts = null)- 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:
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.
- Created
Date string The creation date of the virtual service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the virtual service.
- Arn string
The ARN of the virtual service.
- Created
Date string The creation date of the virtual service.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringDate The last update date of the virtual service.
- arn string
The ARN of the virtual service.
- created
Date string The creation date of the virtual service.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated stringDate 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_ strdate 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): VirtualServicestatic 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.
- Created
Date string The creation date of the virtual service.
- Last
Updated stringDate The last update date of the virtual service.
- Mesh
Name 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
Virtual
Service Spec Args The virtual service specification to apply.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
The ARN of the virtual service.
- Created
Date string The creation date of the virtual service.
- Last
Updated stringDate The last update date of the virtual service.
- Mesh
Name 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
Virtual
Service Spec The virtual service specification to apply.
- map[string]string
A map of tags to assign to the resource.
- arn string
The ARN of the virtual service.
- created
Date string The creation date of the virtual service.
- last
Updated stringDate The last update date of the virtual service.
- mesh
Name 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
Virtual
Service Spec The virtual service specification to apply.
- {[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_ strdate 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[Virtual
Service Spec] The virtual service specification to apply.
- Dict[str, str]
A map of tags to assign to the resource.
Supporting Types
VirtualServiceSpec
- Provider
Virtual
Service Spec Provider Args 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
Virtual
Service Spec Provider 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
Virtual
Service Spec Provider 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[Virtual
Service Spec Provider] 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
- Virtual
Node VirtualService Spec Provider Virtual Node Args The virtual node associated with a virtual service.
- Virtual
Router VirtualService Spec Provider Virtual Router Args The virtual router associated with a virtual service.
- Virtual
Node VirtualService Spec Provider Virtual Node The virtual node associated with a virtual service.
- Virtual
Router VirtualService Spec Provider Virtual Router The virtual router associated with a virtual service.
- virtual
Node VirtualService Spec Provider Virtual Node The virtual node associated with a virtual service.
- virtual
Router VirtualService Spec Provider Virtual Router The virtual router associated with a virtual service.
- virtual
Node Dict[VirtualService Spec Provider Virtual Node] The virtual node associated with a virtual service.
- virtual
Router Dict[VirtualService Spec Provider Virtual Router] The virtual router associated with a virtual service.
VirtualServiceSpecProviderVirtualNode
- Virtual
Node stringName The name of the virtual node that is acting as a service provider.
- Virtual
Node stringName The name of the virtual node that is acting as a service provider.
- virtual
Node stringName The name of the virtual node that is acting as a service provider.
- virtual
Node strName The name of the virtual node that is acting as a service provider.
VirtualServiceSpecProviderVirtualRouter
- Virtual
Router stringName The name of the virtual router that is acting as a service provider.
- Virtual
Router stringName The name of the virtual router that is acting as a service provider.
- virtual
Router stringName The name of the virtual router that is acting as a service provider.
- virtual_
router_ strname 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
awsTerraform Provider.