1. Packages
  2. AWS Classic
  3. API Docs
  4. amp
  5. getWorkspace

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.amp.getWorkspace

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Provides an Amazon Managed Prometheus workspace data source.

    Example Usage

    Basic configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.amp.getWorkspace({
        workspaceId: "ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.get_workspace(workspace_id="ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.LookupWorkspace(ctx, &amp.LookupWorkspaceArgs{
    			WorkspaceId: "ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7",
    		}, 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 example = Aws.Amp.GetWorkspace.Invoke(new()
        {
            WorkspaceId = "ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.AmpFunctions;
    import com.pulumi.aws.amp.inputs.GetWorkspaceArgs;
    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 example = AmpFunctions.getWorkspace(GetWorkspaceArgs.builder()
                .workspaceId("ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:amp:getWorkspace
          Arguments:
            workspaceId: ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7
    

    Using getWorkspace

    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 getWorkspace(args: GetWorkspaceArgs, opts?: InvokeOptions): Promise<GetWorkspaceResult>
    function getWorkspaceOutput(args: GetWorkspaceOutputArgs, opts?: InvokeOptions): Output<GetWorkspaceResult>
    def get_workspace(tags: Optional[Mapping[str, str]] = None,
                      workspace_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetWorkspaceResult
    def get_workspace_output(tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                      workspace_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetWorkspaceResult]
    func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)
    func LookupWorkspaceOutput(ctx *Context, args *LookupWorkspaceOutputArgs, opts ...InvokeOption) LookupWorkspaceResultOutput

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

    public static class GetWorkspace 
    {
        public static Task<GetWorkspaceResult> InvokeAsync(GetWorkspaceArgs args, InvokeOptions? opts = null)
        public static Output<GetWorkspaceResult> Invoke(GetWorkspaceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:amp/getWorkspace:getWorkspace
      arguments:
        # arguments dictionary

    The following arguments are supported:

    WorkspaceId string
    Prometheus workspace ID.
    Tags Dictionary<string, string>
    Tags assigned to the resource.
    WorkspaceId string
    Prometheus workspace ID.
    Tags map[string]string
    Tags assigned to the resource.
    workspaceId String
    Prometheus workspace ID.
    tags Map<String,String>
    Tags assigned to the resource.
    workspaceId string
    Prometheus workspace ID.
    tags {[key: string]: string}
    Tags assigned to the resource.
    workspace_id str
    Prometheus workspace ID.
    tags Mapping[str, str]
    Tags assigned to the resource.
    workspaceId String
    Prometheus workspace ID.
    tags Map<String>
    Tags assigned to the resource.

    getWorkspace Result

    The following output properties are available:

    Alias string
    Prometheus workspace alias.
    Arn string
    ARN of the Prometheus workspace.
    CreatedDate string
    Creation date of the Prometheus workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyArn string
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    PrometheusEndpoint string
    Endpoint of the Prometheus workspace.
    Status string
    Status of the Prometheus workspace.
    Tags Dictionary<string, string>
    Tags assigned to the resource.
    WorkspaceId string
    Alias string
    Prometheus workspace alias.
    Arn string
    ARN of the Prometheus workspace.
    CreatedDate string
    Creation date of the Prometheus workspace.
    Id string
    The provider-assigned unique ID for this managed resource.
    KmsKeyArn string
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    PrometheusEndpoint string
    Endpoint of the Prometheus workspace.
    Status string
    Status of the Prometheus workspace.
    Tags map[string]string
    Tags assigned to the resource.
    WorkspaceId string
    alias String
    Prometheus workspace alias.
    arn String
    ARN of the Prometheus workspace.
    createdDate String
    Creation date of the Prometheus workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn String
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    prometheusEndpoint String
    Endpoint of the Prometheus workspace.
    status String
    Status of the Prometheus workspace.
    tags Map<String,String>
    Tags assigned to the resource.
    workspaceId String
    alias string
    Prometheus workspace alias.
    arn string
    ARN of the Prometheus workspace.
    createdDate string
    Creation date of the Prometheus workspace.
    id string
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn string
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    prometheusEndpoint string
    Endpoint of the Prometheus workspace.
    status string
    Status of the Prometheus workspace.
    tags {[key: string]: string}
    Tags assigned to the resource.
    workspaceId string
    alias str
    Prometheus workspace alias.
    arn str
    ARN of the Prometheus workspace.
    created_date str
    Creation date of the Prometheus workspace.
    id str
    The provider-assigned unique ID for this managed resource.
    kms_key_arn str
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    prometheus_endpoint str
    Endpoint of the Prometheus workspace.
    status str
    Status of the Prometheus workspace.
    tags Mapping[str, str]
    Tags assigned to the resource.
    workspace_id str
    alias String
    Prometheus workspace alias.
    arn String
    ARN of the Prometheus workspace.
    createdDate String
    Creation date of the Prometheus workspace.
    id String
    The provider-assigned unique ID for this managed resource.
    kmsKeyArn String
    ARN of the KMS key used to encrypt data in the Prometheus workspace.
    prometheusEndpoint String
    Endpoint of the Prometheus workspace.
    status String
    Status of the Prometheus workspace.
    tags Map<String>
    Tags assigned to the resource.
    workspaceId String

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi