com.pulumi.aws.appmesh.kotlin.VirtualServiceArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.appmesh.kotlin
import com.pulumi.aws.appmesh.VirtualServiceArgs.builder
import com.pulumi.aws.appmesh.kotlin.inputs.VirtualServiceSpecArgs
import com.pulumi.aws.appmesh.kotlin.inputs.VirtualServiceSpecArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides an AWS App Mesh virtual service resource.
* ## Example Usage
* ### Virtual Node Provider
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const servicea = new aws.appmesh.VirtualService("servicea", {
* name: "servicea.simpleapp.local",
* meshName: simple.id,
* spec: {
* provider: {
* virtualNode: {
* virtualNodeName: serviceb1.name,
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* servicea = aws.appmesh.VirtualService("servicea",
* name="servicea.simpleapp.local",
* mesh_name=simple["id"],
* spec={
* "provider": {
* "virtual_node": {
* "virtual_node_name": serviceb1["name"],
* },
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var servicea = new Aws.AppMesh.VirtualService("servicea", new()
* {
* Name = "servicea.simpleapp.local",
* MeshName = simple.Id,
* Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
* {
* Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
* {
* VirtualNode = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualNodeArgs
* {
* VirtualNodeName = serviceb1.Name,
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/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{
* Name: pulumi.String("servicea.simpleapp.local"),
* MeshName: pulumi.Any(simple.Id),
* Spec: &appmesh.VirtualServiceSpecArgs{
* Provider: &appmesh.VirtualServiceSpecProviderArgs{
* VirtualNode: &appmesh.VirtualServiceSpecProviderVirtualNodeArgs{
* VirtualNodeName: pulumi.Any(serviceb1.Name),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.appmesh.VirtualService;
* import com.pulumi.aws.appmesh.VirtualServiceArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecProviderArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecProviderVirtualNodeArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* 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()
* .name("servicea.simpleapp.local")
* .meshName(simple.id())
* .spec(VirtualServiceSpecArgs.builder()
* .provider(VirtualServiceSpecProviderArgs.builder()
* .virtualNode(VirtualServiceSpecProviderVirtualNodeArgs.builder()
* .virtualNodeName(serviceb1.name())
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* servicea:
* type: aws:appmesh:VirtualService
* properties:
* name: servicea.simpleapp.local
* meshName: ${simple.id}
* spec:
* provider:
* virtualNode:
* virtualNodeName: ${serviceb1.name}
* ```
*
* ### Virtual Router Provider
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const servicea = new aws.appmesh.VirtualService("servicea", {
* name: "servicea.simpleapp.local",
* meshName: simple.id,
* spec: {
* provider: {
* virtualRouter: {
* virtualRouterName: serviceb.name,
* },
* },
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* servicea = aws.appmesh.VirtualService("servicea",
* name="servicea.simpleapp.local",
* mesh_name=simple["id"],
* spec={
* "provider": {
* "virtual_router": {
* "virtual_router_name": serviceb["name"],
* },
* },
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var servicea = new Aws.AppMesh.VirtualService("servicea", new()
* {
* Name = "servicea.simpleapp.local",
* MeshName = simple.Id,
* Spec = new Aws.AppMesh.Inputs.VirtualServiceSpecArgs
* {
* Provider = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderArgs
* {
* VirtualRouter = new Aws.AppMesh.Inputs.VirtualServiceSpecProviderVirtualRouterArgs
* {
* VirtualRouterName = serviceb.Name,
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/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{
* Name: pulumi.String("servicea.simpleapp.local"),
* MeshName: pulumi.Any(simple.Id),
* Spec: &appmesh.VirtualServiceSpecArgs{
* Provider: &appmesh.VirtualServiceSpecProviderArgs{
* VirtualRouter: &appmesh.VirtualServiceSpecProviderVirtualRouterArgs{
* VirtualRouterName: pulumi.Any(serviceb.Name),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.appmesh.VirtualService;
* import com.pulumi.aws.appmesh.VirtualServiceArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecProviderArgs;
* import com.pulumi.aws.appmesh.inputs.VirtualServiceSpecProviderVirtualRouterArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* 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()
* .name("servicea.simpleapp.local")
* .meshName(simple.id())
* .spec(VirtualServiceSpecArgs.builder()
* .provider(VirtualServiceSpecProviderArgs.builder()
* .virtualRouter(VirtualServiceSpecProviderVirtualRouterArgs.builder()
* .virtualRouterName(serviceb.name())
* .build())
* .build())
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* servicea:
* type: aws:appmesh:VirtualService
* properties:
* name: servicea.simpleapp.local
* meshName: ${simple.id}
* spec:
* provider:
* virtualRouter:
* virtualRouterName: ${serviceb.name}
* ```
*
* ## Import
* Using `pulumi import`, import App Mesh virtual services using `mesh_name` together with the virtual service's `name`. For example:
* ```sh
* $ pulumi import aws:appmesh/virtualService:VirtualService servicea simpleapp/servicea.simpleapp.local
* ```
* @property meshName Name of the service mesh in which to create the virtual service. Must be between 1 and 255 characters in length.
* @property meshOwner AWS account ID of the service mesh's owner. Defaults to the account ID the AWS provider is currently connected to.
* @property name Name to use for the virtual service. Must be between 1 and 255 characters in length.
* @property spec Virtual service specification to apply.
* @property tags 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.
*/
public data class VirtualServiceArgs(
public val meshName: Output? = null,
public val meshOwner: Output? = null,
public val name: Output? = null,
public val spec: Output? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy