AWS Classic
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/v5/go/aws/appmesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appmesh.NewVirtualService(ctx, "servicea", &appmesh.VirtualServiceArgs{
MeshName: pulumi.Any(aws_appmesh_mesh.Simple.Id),
Spec: &appmesh.VirtualServiceSpecArgs{
Provider: &appmesh.VirtualServiceSpecProviderArgs{
VirtualNode: &appmesh.VirtualServiceSpecProviderVirtualNodeArgs{
VirtualNodeName: pulumi.Any(aws_appmesh_virtual_node.Serviceb1.Name),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var servicea = new VirtualService("servicea", VirtualServiceArgs.builder()
.meshName(aws_appmesh_mesh.simple().id())
.spec(VirtualServiceSpecArgs.builder()
.provider(VirtualServiceSpecProviderArgs.builder()
.virtualNode(VirtualServiceSpecProviderVirtualNodeArgs.builder()
.virtualNodeName(aws_appmesh_virtual_node.serviceb1().name())
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
servicea = aws.appmesh.VirtualService("servicea",
mesh_name=aws_appmesh_mesh["simple"]["id"],
spec=aws.appmesh.VirtualServiceSpecArgs(
provider=aws.appmesh.VirtualServiceSpecProviderArgs(
virtual_node=aws.appmesh.VirtualServiceSpecProviderVirtualNodeArgs(
virtual_node_name=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,
},
},
},
});
resources:
servicea:
type: aws:appmesh:VirtualService
properties:
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/v5/go/aws/appmesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appmesh.NewVirtualService(ctx, "servicea", &appmesh.VirtualServiceArgs{
MeshName: pulumi.Any(aws_appmesh_mesh.Simple.Id),
Spec: &appmesh.VirtualServiceSpecArgs{
Provider: &appmesh.VirtualServiceSpecProviderArgs{
VirtualRouter: &appmesh.VirtualServiceSpecProviderVirtualRouterArgs{
VirtualRouterName: pulumi.Any(aws_appmesh_virtual_router.Serviceb.Name),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var servicea = new VirtualService("servicea", VirtualServiceArgs.builder()
.meshName(aws_appmesh_mesh.simple().id())
.spec(VirtualServiceSpecArgs.builder()
.provider(VirtualServiceSpecProviderArgs.builder()
.virtualRouter(VirtualServiceSpecProviderVirtualRouterArgs.builder()
.virtualRouterName(aws_appmesh_virtual_router.serviceb().name())
.build())
.build())
.build())
.build());
}
}
import pulumi
import pulumi_aws as aws
servicea = aws.appmesh.VirtualService("servicea",
mesh_name=aws_appmesh_mesh["simple"]["id"],
spec=aws.appmesh.VirtualServiceSpecArgs(
provider=aws.appmesh.VirtualServiceSpecProviderArgs(
virtual_router=aws.appmesh.VirtualServiceSpecProviderVirtualRouterArgs(
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,
},
},
},
});
resources:
servicea:
type: aws:appmesh:VirtualService
properties:
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);
@overload
def VirtualService(resource_name: str,
opts: Optional[ResourceOptions] = None,
mesh_name: Optional[str] = None,
mesh_owner: Optional[str] = None,
name: Optional[str] = None,
spec: Optional[VirtualServiceSpecArgs] = None,
tags: Optional[Mapping[str, str]] = None)
@overload
def VirtualService(resource_name: str,
args: VirtualServiceArgs,
opts: Optional[ResourceOptions] = None)
func NewVirtualService(ctx *Context, name string, args VirtualServiceArgs, opts ...ResourceOption) (*VirtualService, error)
public VirtualService(string name, VirtualServiceArgs args, CustomResourceOptions? opts = null)
public VirtualService(String name, VirtualServiceArgs args)
public VirtualService(String name, VirtualServiceArgs args, CustomResourceOptions options)
type: aws:appmesh:VirtualService
properties: # The arguments to resource properties.
options: # 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.
- resource_name str
- The unique name of the resource.
- args VirtualServiceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args VirtualServiceArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The VirtualService resource accepts the following input properties:
- Mesh
Name string The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- Spec
Virtual
Service Spec Args The virtual service specification to apply.
- Mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- Name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Mesh
Name string The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- Spec
Virtual
Service Spec Args The virtual service specification to apply.
- Mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- Name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- map[string]string
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- mesh
Name String The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- mesh
Owner String The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name String
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Map<String,String>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- mesh
Name string The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- mesh_
name str The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- mesh_
owner str The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name str
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- mesh
Name String The name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
- spec Property Map
The virtual service specification to apply.
- mesh
Owner String The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name String
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Map<String>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
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.
- Resource
Owner string The resource owner's AWS account ID.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
- 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.
- Resource
Owner string The resource owner's AWS account ID.
- map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
- 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.
- resource
Owner String The resource owner's AWS account ID.
- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider .
- 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.
- resource
Owner string The resource owner's AWS account ID.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
- 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.
- resource_
owner str The resource owner's AWS account ID.
- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
- 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.
- resource
Owner String The resource owner's AWS account ID.
- Map<String>
A map of tags assigned to the resource, including those inherited from the provider .
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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
created_date: Optional[str] = None,
last_updated_date: Optional[str] = None,
mesh_name: Optional[str] = None,
mesh_owner: Optional[str] = None,
name: Optional[str] = None,
resource_owner: Optional[str] = None,
spec: Optional[VirtualServiceSpecArgs] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> VirtualService
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)
public static VirtualService get(String name, Output<String> id, VirtualServiceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- 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. Must be between 1 and 255 characters in length.
- Mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- Name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Resource
Owner string The resource owner's AWS account ID.
- Spec
Virtual
Service Spec Args The virtual service specification to apply.
- Dictionary<string, string>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
- 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. Must be between 1 and 255 characters in length.
- Mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- Name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- Resource
Owner string The resource owner's AWS account ID.
- Spec
Virtual
Service Spec Args The virtual service specification to apply.
- map[string]string
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
- 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. Must be between 1 and 255 characters in length.
- mesh
Owner String The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name String
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- resource
Owner String The resource owner's AWS account ID.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- Map<String,String>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider .
- 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. Must be between 1 and 255 characters in length.
- mesh
Owner string The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name string
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- resource
Owner string The resource owner's AWS account ID.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- {[key: string]: string}
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
- 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. Must be between 1 and 255 characters in length.
- mesh_
owner str The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name str
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- resource_
owner str The resource owner's AWS account ID.
- spec
Virtual
Service Spec Args The virtual service specification to apply.
- Mapping[str, str]
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
- 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. Must be between 1 and 255 characters in length.
- mesh
Owner String The AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
- name String
The name to use for the virtual service. Must be between 1 and 255 characters in length.
- resource
Owner String The resource owner's AWS account ID.
- spec Property Map
The virtual service specification to apply.
- Map<String>
A map of tags to assign to the resource. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider .
Supporting Types
VirtualServiceSpec
- 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
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
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 Property Map
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 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 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 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 Property Map The virtual node associated with a virtual service.
- virtual
Router Property Map 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. Must be between 1 and 255 characters in length.
- Virtual
Node stringName The name of the virtual node that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Node StringName The name of the virtual node that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Node stringName The name of the virtual node that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual_
node_ strname The name of the virtual node that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Node StringName The name of the virtual node that is acting as a service provider. Must be between 1 and 255 characters in length.
VirtualServiceSpecProviderVirtualRouter
- Virtual
Router stringName The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
- Virtual
Router stringName The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Router StringName The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Router stringName The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual_
router_ strname The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
- virtual
Router StringName The name of the virtual router that is acting as a service provider. Must be between 1 and 255 characters in length.
Import
App Mesh virtual services can be imported using mesh_name
together with the virtual service’s name
, e.g.,
$ pulumi import aws:appmesh/virtualService:VirtualService servicea simpleapp/servicea.simpleapp.local
[1]/docs/providers/aws/index.html
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.