1. Packages
  2. AWS
  3. API Docs
  4. appmesh
  5. getMesh
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.appmesh.getMesh

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    The App Mesh Mesh data source allows details of an App Mesh Mesh to be retrieved by its name and optionally the mesh_owner.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const simple = aws.appmesh.getMesh({
        name: "simpleapp",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    simple = aws.appmesh.get_mesh(name="simpleapp")
    
    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.LookupMesh(ctx, &appmesh.LookupMeshArgs{
    			Name: "simpleapp",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var simple = Aws.AppMesh.GetMesh.Invoke(new()
        {
            Name = "simpleapp",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.appmesh.AppmeshFunctions;
    import com.pulumi.aws.appmesh.inputs.GetMeshArgs;
    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) {
            final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()
                .name("simpleapp")
                .build());
    
        }
    }
    
    variables:
      simple:
        fn::invoke:
          Function: aws:appmesh:getMesh
          Arguments:
            name: simpleapp
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getCallerIdentity({});
    const simple = current.then(current => aws.appmesh.getMesh({
        name: "simpleapp",
        meshOwner: current.accountId,
    }));
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_caller_identity()
    simple = aws.appmesh.get_mesh(name="simpleapp",
        mesh_owner=current.account_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"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 {
    		current, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = appmesh.LookupMesh(ctx, &appmesh.LookupMeshArgs{
    			Name:      "simpleapp",
    			MeshOwner: pulumi.StringRef(current.AccountId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.GetCallerIdentity.Invoke();
    
        var simple = Aws.AppMesh.GetMesh.Invoke(new()
        {
            Name = "simpleapp",
            MeshOwner = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetCallerIdentityArgs;
    import com.pulumi.aws.appmesh.AppmeshFunctions;
    import com.pulumi.aws.appmesh.inputs.GetMeshArgs;
    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) {
            final var current = AwsFunctions.getCallerIdentity();
    
            final var simple = AppmeshFunctions.getMesh(GetMeshArgs.builder()
                .name("simpleapp")
                .meshOwner(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                .build());
    
        }
    }
    
    variables:
      current:
        fn::invoke:
          Function: aws:getCallerIdentity
          Arguments: {}
      simple:
        fn::invoke:
          Function: aws:appmesh:getMesh
          Arguments:
            name: simpleapp
            meshOwner: ${current.accountId}
    

    Using getMesh

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMesh(args: GetMeshArgs, opts?: InvokeOptions): Promise<GetMeshResult>
    function getMeshOutput(args: GetMeshOutputArgs, opts?: InvokeOptions): Output<GetMeshResult>
    def get_mesh(mesh_owner: Optional[str] = None,
                 name: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetMeshResult
    def get_mesh_output(mesh_owner: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetMeshResult]
    func LookupMesh(ctx *Context, args *LookupMeshArgs, opts ...InvokeOption) (*LookupMeshResult, error)
    func LookupMeshOutput(ctx *Context, args *LookupMeshOutputArgs, opts ...InvokeOption) LookupMeshResultOutput

    > Note: This function is named LookupMesh in the Go SDK.

    public static class GetMesh 
    {
        public static Task<GetMeshResult> InvokeAsync(GetMeshArgs args, InvokeOptions? opts = null)
        public static Output<GetMeshResult> Invoke(GetMeshInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMeshResult> getMesh(GetMeshArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:appmesh/getMesh:getMesh
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the service mesh.
    MeshOwner string
    AWS account ID of the service mesh's owner.
    Tags Dictionary<string, string>
    Map of tags.
    Name string
    Name of the service mesh.
    MeshOwner string
    AWS account ID of the service mesh's owner.
    Tags map[string]string
    Map of tags.
    name String
    Name of the service mesh.
    meshOwner String
    AWS account ID of the service mesh's owner.
    tags Map<String,String>
    Map of tags.
    name string
    Name of the service mesh.
    meshOwner string
    AWS account ID of the service mesh's owner.
    tags {[key: string]: string}
    Map of tags.
    name str
    Name of the service mesh.
    mesh_owner str
    AWS account ID of the service mesh's owner.
    tags Mapping[str, str]
    Map of tags.
    name String
    Name of the service mesh.
    meshOwner String
    AWS account ID of the service mesh's owner.
    tags Map<String>
    Map of tags.

    getMesh Result

    The following output properties are available:

    Arn string
    ARN of the service mesh.
    CreatedDate string
    Creation date of the service mesh.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedDate string
    Last update date of the service mesh.
    MeshOwner string
    Name string
    ResourceOwner string
    Resource owner's AWS account ID.
    Specs List<GetMeshSpec>
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    Tags Dictionary<string, string>
    Map of tags.
    Arn string
    ARN of the service mesh.
    CreatedDate string
    Creation date of the service mesh.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedDate string
    Last update date of the service mesh.
    MeshOwner string
    Name string
    ResourceOwner string
    Resource owner's AWS account ID.
    Specs []GetMeshSpec
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    Tags map[string]string
    Map of tags.
    arn String
    ARN of the service mesh.
    createdDate String
    Creation date of the service mesh.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate String
    Last update date of the service mesh.
    meshOwner String
    name String
    resourceOwner String
    Resource owner's AWS account ID.
    specs List<GetMeshSpec>
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    tags Map<String,String>
    Map of tags.
    arn string
    ARN of the service mesh.
    createdDate string
    Creation date of the service mesh.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate string
    Last update date of the service mesh.
    meshOwner string
    name string
    resourceOwner string
    Resource owner's AWS account ID.
    specs GetMeshSpec[]
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    tags {[key: string]: string}
    Map of tags.
    arn str
    ARN of the service mesh.
    created_date str
    Creation date of the service mesh.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated_date str
    Last update date of the service mesh.
    mesh_owner str
    name str
    resource_owner str
    Resource owner's AWS account ID.
    specs Sequence[GetMeshSpec]
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    tags Mapping[str, str]
    Map of tags.
    arn String
    ARN of the service mesh.
    createdDate String
    Creation date of the service mesh.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedDate String
    Last update date of the service mesh.
    meshOwner String
    name String
    resourceOwner String
    Resource owner's AWS account ID.
    specs List<Property Map>
    Service mesh specification. See the aws.appmesh.Mesh resource for details.
    tags Map<String>
    Map of tags.

    Supporting Types

    GetMeshSpec

    GetMeshSpecEgressFilter

    Type string
    Type string
    type String
    type string
    type str
    type String

    GetMeshSpecServiceDiscovery

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi