import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a CloudWatch Omni Space. A space is the container that holds your observability data within a CloudWatch Omni domain. * * > **NOTE:** CloudWatch Omni allows only **one space per AWS account per region**. Creating a second space in the same region returns `ConflictException`. A space in a different region is permitted, and a space does not have to be in the same region as its domain. * * > **NOTE:** CloudWatch Omni is not available in every region. In unsupported regions the API returns `AccessDeniedException`. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.iam.Role("example", { * name: "cloudwatch-omni-data-access", * assumeRolePolicy: JSON.stringify({ * Version: "2012-10-17", * Statement: [{ * Action: "sts:AssumeRole", * Effect: "Allow", * Principal: { * Service: "cloudwatch.amazonaws.com", * }, * }], * }), * }); * const exampleDomain = new aws.cloudwatchomni.Domain("example", { * name: "example", * identityProviders: ["IAM"], * }); * const exampleSpace = new aws.cloudwatchomni.Space("example", { * name: "example", * domainId: exampleDomain.domainId, * dataAccessRoleArn: example.arn, * }); * ``` * * ### AgentCore Online Evaluation * * Supply `agentCoreEvaluationRoleArn` to let the space run AgentCore online evaluation. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatchomni.Space("example", { * name: "example", * domainId: exampleAwsCloudwatchomniDomain.domainId, * dataAccessRoleArn: dataAccess.arn, * agentCoreEvaluationRoleArn: agentCore.arn, * }); * ``` * * ### Customer Managed Encryption * * Omitting `encryptionConfiguration` leaves the space encrypted with an AWS owned key. To use a customer managed key, the key policy must grant the `cloudwatch.amazonaws.com` service principal permission to use it, otherwise `CreateSpace` fails with `AccessDeniedException`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const example = new aws.kms.Key("example", { * description: "CloudWatch Omni Space encryption", * policy: JSON.stringify({ * Version: "2012-10-17", * Statement: [ * { * Sid: "EnableIAMUserPermissions", * Effect: "Allow", * Principal: { * AWS: current.then(current => `arn:aws:iam::${current.accountId}:root`), * }, * Action: "kms:*", * Resource: "*", * }, * { * Sid: "AllowCloudWatchOmni", * Effect: "Allow", * Principal: { * Service: "cloudwatch.amazonaws.com", * }, * Action: [ * "kms:Decrypt", * "kms:DescribeKey", * "kms:Encrypt", * "kms:GenerateDataKey*", * "kms:ReEncrypt*", * ], * Resource: "*", * }, * ], * }), * }); * const exampleSpace = new aws.cloudwatchomni.Space("example", { * encryptionConfiguration: { * encryptionStrategy: "CUSTOMER_MANAGED", * kmsKeyArn: example.arn, * }, * name: "example", * domainId: exampleAwsCloudwatchomniDomain.domainId, * dataAccessRoleArn: exampleAwsIamRole.arn, * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `spaceId` (String) Space ID. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import a CloudWatch Omni Space using the `spaceId`. For example: * * ```sh * $ pulumi import aws:cloudwatchomni/space:Space example 12345678-1234-1234-1234-123456789012 * ``` */ export declare class Space extends pulumi.CustomResource { /** * Get an existing Space resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: SpaceState, opts?: pulumi.CustomResourceOptions): Space; /** * Check whether an existing Space resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: SpaceState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of Space. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Space; /** * ARN of the IAM role used by AgentCore online evaluation. Changing this forces a new resource. */ readonly agentCoreEvaluationRoleArn: pulumi.Output; /** * ARN of the IAM role CloudWatch Omni assumes to access data. Must be in the same account as the space. Changing this forces a new resource. */ readonly dataAccessRoleArn: pulumi.Output; /** * ARN of the domain the space belongs to. */ readonly domainArn: pulumi.Output; /** * ID of the CloudWatch Omni domain the space belongs to. Changing this forces a new resource. */ readonly domainId: pulumi.Output; /** * Encryption of the space's data at rest. Omit for AWS owned encryption. See below. */ readonly encryptionConfiguration: pulumi.Output; /** * Name of the space. Must be 3-64 characters of lowercase letters, numbers and hyphens, must begin and end with a letter or number, and cannot contain consecutive hyphens. * * The following arguments are optional: */ readonly name: pulumi.Output; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * ARN of the space. */ readonly spaceArn: pulumi.Output; /** * Unique ID of the space. */ readonly spaceId: pulumi.Output; /** * Status of the space. */ readonly status: pulumi.Output; /** * Create a Space resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SpaceArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Space resources. */ export interface SpaceState { /** * ARN of the IAM role used by AgentCore online evaluation. Changing this forces a new resource. */ agentCoreEvaluationRoleArn?: pulumi.Input; /** * ARN of the IAM role CloudWatch Omni assumes to access data. Must be in the same account as the space. Changing this forces a new resource. */ dataAccessRoleArn?: pulumi.Input; /** * ARN of the domain the space belongs to. */ domainArn?: pulumi.Input; /** * ID of the CloudWatch Omni domain the space belongs to. Changing this forces a new resource. */ domainId?: pulumi.Input; /** * Encryption of the space's data at rest. Omit for AWS owned encryption. See below. */ encryptionConfiguration?: pulumi.Input; /** * Name of the space. Must be 3-64 characters of lowercase letters, numbers and hyphens, must begin and end with a letter or number, and cannot contain consecutive hyphens. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * ARN of the space. */ spaceArn?: pulumi.Input; /** * Unique ID of the space. */ spaceId?: pulumi.Input; /** * Status of the space. */ status?: pulumi.Input; } /** * The set of arguments for constructing a Space resource. */ export interface SpaceArgs { /** * ARN of the IAM role used by AgentCore online evaluation. Changing this forces a new resource. */ agentCoreEvaluationRoleArn?: pulumi.Input; /** * ARN of the IAM role CloudWatch Omni assumes to access data. Must be in the same account as the space. Changing this forces a new resource. */ dataAccessRoleArn: pulumi.Input; /** * ID of the CloudWatch Omni domain the space belongs to. Changing this forces a new resource. */ domainId: pulumi.Input; /** * Encryption of the space's data at rest. Omit for AWS owned encryption. See below. */ encryptionConfiguration?: pulumi.Input; /** * Name of the space. Must be 3-64 characters of lowercase letters, numbers and hyphens, must begin and end with a letter or number, and cannot contain consecutive hyphens. * * The following arguments are optional: */ name?: pulumi.Input; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; } //# sourceMappingURL=space.d.ts.map