1. Packages
  2. AWS
  3. API Docs
  4. amp
  5. getWorkspace
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.amp.getWorkspace

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 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",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.amp.get_workspace(workspace_id="ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:amp:getWorkspace
      arguments:
        workspaceId: ws-41det8a1-2c67-6a1a-9381-9b83d3d78ef7
Copy

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>
Copy
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]
Copy
func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)
func LookupWorkspaceOutput(ctx *Context, args *LookupWorkspaceOutputArgs, opts ...InvokeOption) LookupWorkspaceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
public static Output<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:amp/getWorkspace:getWorkspace
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

WorkspaceId This property is required. string
Prometheus workspace ID.
Tags Dictionary<string, string>
Tags assigned to the resource.
WorkspaceId This property is required. string
Prometheus workspace ID.
Tags map[string]string
Tags assigned to the resource.
workspaceId This property is required. String
Prometheus workspace ID.
tags Map<String,String>
Tags assigned to the resource.
workspaceId This property is required. string
Prometheus workspace ID.
tags {[key: string]: string}
Tags assigned to the resource.
workspace_id This property is required. str
Prometheus workspace ID.
tags Mapping[str, str]
Tags assigned to the resource.
workspaceId This property is required. 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 v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi