# CfnSpaceProps

Properties for defining a `CfnSpace`.

Used as props by: [CfnSpace](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnSpace.html)

- Source: Generated at build time
- Type last changed: v2.276.0 · 10 Nov 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnSpaceProps: cloudwatch.CfnSpaceProps = {
  dataAccessRoleArn: 'dataAccessRoleArn',
  domainId: 'domainId',
  name: 'name',

  // the properties below are optional
  agentCoreEvaluationRoleArn: 'agentCoreEvaluationRoleArn',
  encryptionConfiguration: {
    encryptionStrategy: 'encryptionStrategy',

    // the properties below are optional
    kmsKeyArn: 'kmsKeyArn',
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_cloudwatch as cloudwatch

cfn_space_props = cloudwatch.CfnSpaceProps(
    data_access_role_arn="dataAccessRoleArn",
    domain_id="domainId",
    name="name",

    # the properties below are optional
    agent_core_evaluation_role_arn="agentCoreEvaluationRoleArn",
    encryption_configuration=cloudwatch.CfnSpace.EncryptionConfigurationProperty(
        encryption_strategy="encryptionStrategy",

        # the properties below are optional
        kms_key_arn="kmsKeyArn"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.cloudwatch.*;

CfnSpaceProps cfnSpaceProps = CfnSpaceProps.builder()
        .dataAccessRoleArn("dataAccessRoleArn")
        .domainId("domainId")
        .name("name")

        // the properties below are optional
        .agentCoreEvaluationRoleArn("agentCoreEvaluationRoleArn")
        .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                .encryptionStrategy("encryptionStrategy")

                // the properties below are optional
                .kmsKeyArn("kmsKeyArn")
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CloudWatch;

var cfnSpaceProps = new CfnSpaceProps {
    DataAccessRoleArn = "dataAccessRoleArn",
    DomainId = "domainId",
    Name = "name",

    // the properties below are optional
    AgentCoreEvaluationRoleArn = "agentCoreEvaluationRoleArn",
    EncryptionConfiguration = new EncryptionConfigurationProperty {
        EncryptionStrategy = "encryptionStrategy",

        // the properties below are optional
        KmsKeyArn = "kmsKeyArn"
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSpaceProps := &CfnSpaceProps{
	DataAccessRoleArn: jsii.String("dataAccessRoleArn"),
	DomainId: jsii.String("domainId"),
	Name: jsii.String("name"),

	// the properties below are optional
	AgentCoreEvaluationRoleArn: jsii.String("agentCoreEvaluationRoleArn"),
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		EncryptionStrategy: jsii.String("encryptionStrategy"),

		// the properties below are optional
		KmsKeyArn: jsii.String("kmsKeyArn"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `agentCoreEvaluationRoleArn`: string — The ARN of the IAM role used by AgentCore online evaluation.

  Absent when the space was created without one.

- `dataAccessRoleArn`: string (required) — The ARN of the IAM role used for data access.

- `domainId`: string (required) — The ID of the domain to create the space in.

- `encryptionConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnSpace.EncryptionConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.CfnSpace.EncryptionConfigurationProperty.html) — The encryption configuration for the space.

- `name`: string (required) — A name that identifies the space.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.
