AWS v6.60.0 published on Tuesday, Nov 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:amp/getWorkspace:getWorkspace
arguments:
# arguments dictionary
The following arguments are supported:
- Workspace
Id string - Prometheus workspace ID.
- Dictionary<string, string>
- Tags assigned to the resource.
- Workspace
Id string - Prometheus workspace ID.
- map[string]string
- Tags assigned to the resource.
- workspace
Id String - Prometheus workspace ID.
- Map<String,String>
- Tags assigned to the resource.
- workspace
Id 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.
- workspace
Id 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.
- Created
Date string - Creation date of the Prometheus workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kms
Key stringArn - ARN of the KMS key used to encrypt data in the Prometheus workspace.
- Prometheus
Endpoint string - Endpoint of the Prometheus workspace.
- Status string
- Status of the Prometheus workspace.
- Dictionary<string, string>
- Tags assigned to the resource.
- Workspace
Id string
- Alias string
- Prometheus workspace alias.
- Arn string
- ARN of the Prometheus workspace.
- Created
Date string - Creation date of the Prometheus workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kms
Key stringArn - ARN of the KMS key used to encrypt data in the Prometheus workspace.
- Prometheus
Endpoint string - Endpoint of the Prometheus workspace.
- Status string
- Status of the Prometheus workspace.
- map[string]string
- Tags assigned to the resource.
- Workspace
Id string
- alias String
- Prometheus workspace alias.
- arn String
- ARN of the Prometheus workspace.
- created
Date String - Creation date of the Prometheus workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- kms
Key StringArn - ARN of the KMS key used to encrypt data in the Prometheus workspace.
- prometheus
Endpoint String - Endpoint of the Prometheus workspace.
- status String
- Status of the Prometheus workspace.
- Map<String,String>
- Tags assigned to the resource.
- workspace
Id String
- alias string
- Prometheus workspace alias.
- arn string
- ARN of the Prometheus workspace.
- created
Date string - Creation date of the Prometheus workspace.
- id string
- The provider-assigned unique ID for this managed resource.
- kms
Key stringArn - ARN of the KMS key used to encrypt data in the Prometheus workspace.
- prometheus
Endpoint string - Endpoint of the Prometheus workspace.
- status string
- Status of the Prometheus workspace.
- {[key: string]: string}
- Tags assigned to the resource.
- workspace
Id 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.
- created
Date String - Creation date of the Prometheus workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- kms
Key StringArn - ARN of the KMS key used to encrypt data in the Prometheus workspace.
- prometheus
Endpoint String - Endpoint of the Prometheus workspace.
- status String
- Status of the Prometheus workspace.
- Map<String>
- Tags assigned to the resource.
- workspace
Id String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.