published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Manages an Amazon Managed Service for Prometheus (AMP) Workspace.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Amp.Workspace("example", new()
{
Alias = "example",
Tags =
{
{ "Environment", "production" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/amp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := amp.NewWorkspace(ctx, "example", &.WorkspaceArgs{
Alias: pulumi.String("example"),
Tags: pulumi.StringMap{
"Environment": pulumi.String("production"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.amp.Workspace;
import com.pulumi.aws.amp.WorkspaceArgs;
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) {
var example = new Workspace("example", WorkspaceArgs.builder()
.alias("example")
.tags(Map.of("Environment", "production"))
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.amp.Workspace("example", {
alias: "example",
tags: {
Environment: "production",
},
});
import pulumi
import pulumi_aws as aws
example = aws.amp.Workspace("example",
alias="example",
tags={
"Environment": "production",
})
resources:
example:
type: aws:amp:Workspace
properties:
alias: example
tags:
Environment: production
CloudWatch Logging
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleLogGroup = new Aws.CloudWatch.LogGroup("exampleLogGroup");
var exampleWorkspace = new Aws.Amp.Workspace("exampleWorkspace", new()
{
LoggingConfiguration = new Aws.Amp.Inputs.WorkspaceLoggingConfigurationArgs
{
LogGroupArn = exampleLogGroup.Arn.Apply(arn => $"{arn}:*"),
},
});
});
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/amp"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "exampleLogGroup", nil)
if err != nil {
return err
}
_, err = amp.NewWorkspace(ctx, "exampleWorkspace", &.WorkspaceArgs{
LoggingConfiguration: &.WorkspaceLoggingConfigurationArgs{
LogGroupArn: exampleLogGroup.Arn.ApplyT(func(arn string) (string, error) {
return fmt.Sprintf("%v:*", arn), nil
}).(pulumi.StringOutput),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.LogGroup;
import com.pulumi.aws.amp.Workspace;
import com.pulumi.aws.amp.WorkspaceArgs;
import com.pulumi.aws.amp.inputs.WorkspaceLoggingConfigurationArgs;
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) {
var exampleLogGroup = new LogGroup("exampleLogGroup");
var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
.loggingConfiguration(WorkspaceLoggingConfigurationArgs.builder()
.logGroupArn(exampleLogGroup.arn().applyValue(arn -> String.format("%s:*", arn)))
.build())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleLogGroup = new aws.cloudwatch.LogGroup("exampleLogGroup", {});
const exampleWorkspace = new aws.amp.Workspace("exampleWorkspace", {loggingConfiguration: {
logGroupArn: pulumi.interpolate`${exampleLogGroup.arn}:*`,
}});
import pulumi
import pulumi_aws as aws
example_log_group = aws.cloudwatch.LogGroup("exampleLogGroup")
example_workspace = aws.amp.Workspace("exampleWorkspace", logging_configuration=aws.amp.WorkspaceLoggingConfigurationArgs(
log_group_arn=example_log_group.arn.apply(lambda arn: f"{arn}:*"),
))
resources:
exampleLogGroup:
type: aws:cloudwatch:LogGroup
exampleWorkspace:
type: aws:amp:Workspace
properties:
loggingConfiguration:
logGroupArn: ${exampleLogGroup.arn}:*
Create Workspace Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workspace(name: string, args?: WorkspaceArgs, opts?: CustomResourceOptions);@overload
def Workspace(resource_name: str,
args: Optional[WorkspaceArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Workspace(resource_name: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
logging_configuration: Optional[WorkspaceLoggingConfigurationArgs] = None,
tags: Optional[Mapping[str, str]] = None)func NewWorkspace(ctx *Context, name string, args *WorkspaceArgs, opts ...ResourceOption) (*Workspace, error)public Workspace(string name, WorkspaceArgs? args = null, CustomResourceOptions? opts = null)
public Workspace(String name, WorkspaceArgs args)
public Workspace(String name, WorkspaceArgs args, CustomResourceOptions options)
type: aws:amp:Workspace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workspaceResource = new Aws.Amp.Workspace("workspaceResource", new()
{
Alias = "string",
LoggingConfiguration = new Aws.Amp.Inputs.WorkspaceLoggingConfigurationArgs
{
LogGroupArn = "string",
},
Tags =
{
{ "string", "string" },
},
});
example, err := amp.NewWorkspace(ctx, "workspaceResource", &.WorkspaceArgs{
Alias: pulumi.String("string"),
LoggingConfiguration: &.WorkspaceLoggingConfigurationArgs{
LogGroupArn: pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var workspaceResource = new com.pulumi.aws.amp.Workspace("workspaceResource", com.pulumi.aws.amp.WorkspaceArgs.builder()
.alias("string")
.loggingConfiguration(WorkspaceLoggingConfigurationArgs.builder()
.logGroupArn("string")
.build())
.tags(Map.of("string", "string"))
.build());
workspace_resource = aws.amp.Workspace("workspaceResource",
alias="string",
logging_configuration={
"log_group_arn": "string",
},
tags={
"string": "string",
})
const workspaceResource = new aws.amp.Workspace("workspaceResource", {
alias: "string",
loggingConfiguration: {
logGroupArn: "string",
},
tags: {
string: "string",
},
});
type: aws:amp:Workspace
properties:
alias: string
loggingConfiguration:
logGroupArn: string
tags:
string: string
Workspace Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Workspace resource accepts the following input properties:
- Alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- Logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- Alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- Logging
Configuration WorkspaceLogging Configuration Args - Logging configuration for the workspace. See Logging Configuration below for details.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- alias String
- The alias of the prometheus workspace. See more in AWS Docs.
- logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- alias str
- The alias of the prometheus workspace. See more in AWS Docs.
- logging_
configuration WorkspaceLogging Configuration Args - Logging configuration for the workspace. See Logging Configuration below for details.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
- alias String
- The alias of the prometheus workspace. See more in AWS Docs.
- logging
Configuration Property Map - Logging configuration for the workspace. See Logging Configuration below for details.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workspace resource produces the following output properties:
- Arn string
- Amazon Resource Name (ARN) of the workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Arn string
- Amazon Resource Name (ARN) of the workspace.
- Id string
- The provider-assigned unique ID for this managed resource.
- Prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Amazon Resource Name (ARN) of the workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- prometheus
Endpoint String - Prometheus endpoint available for this workspace.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn string
- Amazon Resource Name (ARN) of the workspace.
- id string
- The provider-assigned unique ID for this managed resource.
- prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn str
- Amazon Resource Name (ARN) of the workspace.
- id str
- The provider-assigned unique ID for this managed resource.
- prometheus_
endpoint str - Prometheus endpoint available for this workspace.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- arn String
- Amazon Resource Name (ARN) of the workspace.
- id String
- The provider-assigned unique ID for this managed resource.
- prometheus
Endpoint String - Prometheus endpoint available for this workspace.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
Look up Existing Workspace Resource
Get an existing Workspace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkspaceState, opts?: CustomResourceOptions): Workspace@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
arn: Optional[str] = None,
logging_configuration: Optional[WorkspaceLoggingConfigurationArgs] = None,
prometheus_endpoint: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> Workspacefunc GetWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceState, opts ...ResourceOption) (*Workspace, error)public static Workspace Get(string name, Input<string> id, WorkspaceState? state, CustomResourceOptions? opts = null)public static Workspace get(String name, Output<String> id, WorkspaceState state, CustomResourceOptions options)resources: _: type: aws:amp:Workspace get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- Arn string
- Amazon Resource Name (ARN) of the workspace.
- Logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- Prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- Arn string
- Amazon Resource Name (ARN) of the workspace.
- Logging
Configuration WorkspaceLogging Configuration Args - Logging configuration for the workspace. See Logging Configuration below for details.
- Prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- alias String
- The alias of the prometheus workspace. See more in AWS Docs.
- arn String
- Amazon Resource Name (ARN) of the workspace.
- logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- prometheus
Endpoint String - Prometheus endpoint available for this workspace.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- alias string
- The alias of the prometheus workspace. See more in AWS Docs.
- arn string
- Amazon Resource Name (ARN) of the workspace.
- logging
Configuration WorkspaceLogging Configuration - Logging configuration for the workspace. See Logging Configuration below for details.
- prometheus
Endpoint string - Prometheus endpoint available for this workspace.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- alias str
- The alias of the prometheus workspace. See more in AWS Docs.
- arn str
- Amazon Resource Name (ARN) of the workspace.
- logging_
configuration WorkspaceLogging Configuration Args - Logging configuration for the workspace. See Logging Configuration below for details.
- prometheus_
endpoint str - Prometheus endpoint available for this workspace.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- alias String
- The alias of the prometheus workspace. See more in AWS Docs.
- arn String
- Amazon Resource Name (ARN) of the workspace.
- logging
Configuration Property Map - Logging configuration for the workspace. See Logging Configuration below for details.
- prometheus
Endpoint String - Prometheus endpoint available for this workspace.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
Supporting Types
WorkspaceLoggingConfiguration, WorkspaceLoggingConfigurationArgs
- Log
Group stringArn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
- Log
Group stringArn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
- log
Group StringArn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
- log
Group stringArn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
- log_
group_ strarn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
- log
Group StringArn - The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist.
Import
AMP Workspaces can be imported using the identifier, e.g.,
$ pulumi import aws:amp/workspace:Workspace demo ws-C6DCB907-F2D7-4D96-957B-66691F865D8B
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Mar 10, 2026 by Pulumi
