Package com.pulumi.aws.grafana
Class WorkspaceApiKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.grafana.WorkspaceApiKey
-
public class WorkspaceApiKey extends com.pulumi.resources.CustomResourceProvides an Amazon Managed Grafana workspace API Key resource. ## Example Usage ### Basic configurationpackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.grafana.WorkspaceApiKey; import com.pulumi.aws.grafana.WorkspaceApiKeyArgs; import java.util.ArrayList; import java.util.Arrays; 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 key = new WorkspaceApiKey("key", WorkspaceApiKeyArgs.builder() .keyName("test-key") .keyRole("VIEWER") .secondsToLive(3600) .workspaceId(test.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description WorkspaceApiKey(java.lang.String name)WorkspaceApiKey(java.lang.String name, WorkspaceApiKeyArgs args)WorkspaceApiKey(java.lang.String name, WorkspaceApiKeyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WorkspaceApiKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, WorkspaceApiKeyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>key()com.pulumi.core.Output<java.lang.String>keyName()com.pulumi.core.Output<java.lang.String>keyRole()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.Integer>secondsToLive()com.pulumi.core.Output<java.lang.String>workspaceId()
-
-
-
Constructor Detail
-
WorkspaceApiKey
public WorkspaceApiKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
WorkspaceApiKey
public WorkspaceApiKey(java.lang.String name, WorkspaceApiKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
WorkspaceApiKey
public WorkspaceApiKey(java.lang.String name, WorkspaceApiKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
key
public com.pulumi.core.Output<java.lang.String> key()
- Returns:
- Key token in JSON format. Use this value as a bearer token to authenticate HTTP requests to the workspace.
-
keyName
public com.pulumi.core.Output<java.lang.String> keyName()
- Returns:
- Name of the API key. Key names must be unique to the workspace.
-
keyRole
public com.pulumi.core.Output<java.lang.String> keyRole()
- Returns:
- Permission level of the API key. Valid values are `VIEWER`, `EDITOR`, or `ADMIN`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
secondsToLive
public com.pulumi.core.Output<java.lang.Integer> secondsToLive()
- Returns:
- Time in seconds until the API key expires. Keys can be valid for up to 30 days.
-
workspaceId
public com.pulumi.core.Output<java.lang.String> workspaceId()
- Returns:
- ID of the workspace that the API key is valid for.
-
get
public static WorkspaceApiKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable WorkspaceApiKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-