CloudWatchOmni / Client / create_space
create_space¶
- CloudWatchOmni.Client.create_space(**kwargs)¶
Creates a space in a domain.
Use GetSpace to retrieve the space, ListSpaces to enumerate spaces, UpdateSpace to modify it, and DeleteSpace to remove it.
See also: AWS API Documentation
Request Syntax
response = client.create_space( name='string', domainId='string', dataAccessRoleArn='string', agentCoreEvaluationRoleArn='string', encryptionConfiguration={ 'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED', 'kmsKeyArn': 'string' }, tags={ 'string': 'string' }, clientToken='string' )
- Parameters:
name (string) –
[REQUIRED]
A name that identifies the space. Must be 3-64 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
domainId (string) –
[REQUIRED]
The ID of the domain to create the space in.
dataAccessRoleArn (string) –
[REQUIRED]
The ARN of the IAM role used for data access. The role must be in the caller’s account.
agentCoreEvaluationRoleArn (string) – The ARN of the IAM role used by AgentCore online evaluation. Must be in the caller’s account. Omit if the space does not use AgentCore online evaluation.
encryptionConfiguration (dict) –
How to encrypt the space’s data at rest. Omit for service owned encryption, which is equivalent to passing
encryptionStrategyAWS_OWNED.encryptionStrategy (string) – [REQUIRED]
Which kind of key to use. Required.
kmsKeyArn (string) –
Customer managed KMS key ARN. Required when
encryptionStrategyis CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller’s account and region.
tags (dict) –
The tags to associate with the space.
(string) –
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) –
Tag value. AWS-standard maximum length; may be empty.
clientToken (string) –
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'space': { 'spaceId': 'string', 'name': 'string', 'spaceArn': 'string', 'domainArn': 'string', 'region': 'string', 'ownerAccountId': 'string', 'dataAccessRoleArn': 'string', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'agentCoreEvaluationRoleArn': 'string', 'status': 'ACTIVE'|'SUSPENDED'|'MOVING', 'statusReason': 'string', 'encryptionConfiguration': { 'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED', 'kmsKeyArn': 'string' } } }
Response Structure
(dict) –
space (dict) –
The details of the created space.
spaceId (string) –
The unique ID of the space.
name (string) –
A name that identifies the space.
spaceArn (string) –
The Amazon Resource Name (ARN) of the space.
domainArn (string) –
The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
region (string) –
The region where this space was created.
ownerAccountId (string) –
AWS account ID that owns this space.
dataAccessRoleArn (string) –
The ARN of the IAM role used for data access.
createdAt (datetime) –
The timestamp when the space was created.
updatedAt (datetime) –
The timestamp when the space was last updated.
agentCoreEvaluationRoleArn (string) –
The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
status (string) –
The status of the space.
statusReason (string) –
Reason for the current space status.
encryptionConfiguration (dict) –
How the space’s data at rest is encrypted. Always populated: a space with no customer managed key reports
encryptionStrategyAWS_OWNED and nokmsKeyArn.encryptionStrategy (string) –
Which kind of key to use. Required.
kmsKeyArn (string) –
Customer managed KMS key ARN. Required when
encryptionStrategyis CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller’s account and region.
Exceptions