AWS v6.71.0 published on Friday, Mar 7, 2025 by Pulumi
aws.amp.getWorkspace
Explore with Pulumi AI
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, &.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)
public static Output<GetWorkspaceResult> getWorkspace(GetWorkspaceArgs args, InvokeOptions options)
fn::invoke:
  function: aws:amp/getWorkspace:getWorkspace
  arguments:
    # arguments dictionaryThe following arguments are supported:
- WorkspaceId string
- Prometheus workspace ID.
- Dictionary<string, string>
- Tags assigned to the resource.
- WorkspaceId string
- Prometheus workspace ID.
- map[string]string
- Tags assigned to the resource.
- workspaceId String
- Prometheus workspace ID.
- Map<String,String>
- Tags assigned to the resource.
- workspaceId string
- Prometheus workspace ID.
- {[key: string]: string}
- Tags assigned to the resource.
- workspace_id str
- Prometheus workspace ID.
- Mapping[str, str]
- Tags assigned to the resource.
- workspaceId String
- Prometheus workspace ID.
- 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.
- KmsKey stringArn 
- 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.
- 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.
- KmsKey stringArn 
- 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.
- 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.
- kmsKey StringArn 
- 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.
- 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.
- kmsKey stringArn 
- 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.
- {[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_ strarn 
- 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.
- 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.
- kmsKey StringArn 
- 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.
- 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 awsTerraform Provider.