Table of Contents
SimSpaceWeaver.
Client
¶A low-level client representing AWS SimSpace Weaver
Amazon Web Services SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale spatial simulations in the Amazon Web Services Cloud. For example, you can create a digital twin of a city, crowd simulations with millions of people and objects, and massilvely-multiplayer games with hundreds of thousands of connected players. For more information about SimSpace Weaver, see the Amazon Web Services SimSpace Weaver User Guide .
This API reference describes the API operations and data types that you can use to communicate directly with SimSpace Weaver.
SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The SimSpace Weaver app SDK API reference is included in the SimSpace Weaver app SDK documentation, which is part of the SimSpace Weaver app SDK distributable package.
import boto3
client = boto3.client('simspaceweaver')
These are the available methods:
can_paginate()
close()
delete_app()
delete_simulation()
describe_app()
describe_simulation()
get_paginator()
get_waiter()
list_apps()
list_simulations()
list_tags_for_resource()
start_app()
start_clock()
start_simulation()
stop_app()
stop_clock()
stop_simulation()
tag_resource()
untag_resource()
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
delete_app
(**kwargs)¶Deletes the instance of the given custom app.
See also: AWS API Documentation
Request Syntax
response = client.delete_app(
App='string',
Domain='string',
Simulation='string'
)
[REQUIRED]
The name of the app.
[REQUIRED]
The name of the domain of the app.
[REQUIRED]
The name of the simulation of the app.
dict
Response Syntax
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
delete_simulation
(**kwargs)¶Deletes all SimSpace Weaver resources assigned to the given simulation.
Note
Your simulation uses resources in other Amazon Web Services services. This API operation doesn't delete resources in other Amazon Web Services services.
See also: AWS API Documentation
Request Syntax
response = client.delete_simulation(
Simulation='string'
)
[REQUIRED]
The name of the simulation.
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
describe_app
(**kwargs)¶Returns the state of the given custom app.
See also: AWS API Documentation
Request Syntax
response = client.describe_app(
App='string',
Domain='string',
Simulation='string'
)
[REQUIRED]
The name of the app.
[REQUIRED]
The name of the domain of the app.
[REQUIRED]
The name of the simulation of the app.
dict
Response Syntax
{
'Description': 'string',
'Domain': 'string',
'EndpointInfo': {
'Address': 'string',
'IngressPortMappings': [
{
'Actual': 123,
'Declared': 123
},
]
},
'LaunchOverrides': {
'LaunchCommands': [
'string',
]
},
'Name': 'string',
'Simulation': 'string',
'Status': 'STARTING'|'STARTED'|'STOPPING'|'STOPPED'|'ERROR'|'UNKNOWN',
'TargetStatus': 'UNKNOWN'|'STARTED'|'STOPPED'
}
Response Structure
(dict) --
Description (string) --
The description of the app.
Domain (string) --
The name of the domain of the app.
EndpointInfo (dict) --
Information about the network endpoint for the custom app. You can use the endpoint to connect to the custom app.
Address (string) --
The IP address of the app. SimSpace Weaver dynamically assigns this IP address when the app starts.
IngressPortMappings (list) --
The inbound TCP/UDP port numbers of the app. The combination of an IP address and a port number form a network endpoint.
(dict) --
A collection of TCP/UDP ports for a custom or service app.
Actual (integer) --
The TCP/UDP port number of the running app. SimSpace Weaver dynamically assigns this port number when the app starts. SimSpace Weaver maps the Declared
port to the Actual
port. Clients connect to the app using the app's IP address and the Actual
port number.
Declared (integer) --
The TCP/UDP port number of the app, declared in the simulation schema. SimSpace Weaver maps the Declared
port to the Actual
port. The source code for the app should bind to the Declared
port.
LaunchOverrides (dict) --
Options that apply when the app starts. These optiAons override default behavior.
LaunchCommands (list) --
App launch commands and command line parameters that override the launch command configured in the simulation schema.
Name (string) --
The name of the app.
Simulation (string) --
The name of the simulation of the app.
Status (string) --
The current lifecycle state of the custom app.
TargetStatus (string) --
The desired lifecycle state of the custom app.
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
describe_simulation
(**kwargs)¶Returns the current state of the given simulation.
See also: AWS API Documentation
Request Syntax
response = client.describe_simulation(
Simulation='string'
)
[REQUIRED]
The name of the simulation.
{
'Arn': 'string',
'CreationTime': datetime(2015, 1, 1),
'Description': 'string',
'ExecutionId': 'string',
'LiveSimulationState': {
'Clocks': [
{
'Status': 'UNKNOWN'|'STARTING'|'STARTED'|'STOPPING'|'STOPPED',
'TargetStatus': 'UNKNOWN'|'STARTED'|'STOPPED'
},
],
'Domains': [
{
'Lifecycle': 'Unknown'|'PerWorker'|'BySpatialSubdivision'|'ByRequest',
'Name': 'string'
},
]
},
'LoggingConfiguration': {
'Destinations': [
{
'CloudWatchLogsLogGroup': {
'LogGroupArn': 'string'
}
},
]
},
'MaximumDuration': 'string',
'Name': 'string',
'RoleArn': 'string',
'SchemaError': 'string',
'SchemaS3Location': {
'BucketName': 'string',
'ObjectKey': 'string'
},
'Status': 'UNKNOWN'|'STARTING'|'STARTED'|'STOPPING'|'STOPPED'|'FAILED'|'DELETING'|'DELETED',
'TargetStatus': 'UNKNOWN'|'STARTED'|'STOPPED'|'DELETED'
}
Response Structure
The Amazon Resource Name (ARN) of the simulation. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
The time when the simulation was created, expressed as the number of seconds and milliseconds in UTC since the Unix epoch (0:0:0.000, January 1, 1970).
The description of the simulation.
A universally unique identifier (UUID) for this simulation.
A collection of additional state information, such as domain and clock configuration.
A list of simulation clocks.
Note
At this time, a simulation has only one clock.
Status information about the simulation clock.
The current status of the simulation clock.
The desired status of the simulation clock.
A list of domains for the simulation. For more information about domains, see Key concepts in the Amazon Web Services SimSpace Weaver User Guide .
A collection of app instances that run the same executable app code and have the same launch options and commands.
For more information about domains, see Key concepts in the Amazon Web Services SimSpace Weaver User Guide .
The type of lifecycle management for apps in the domain. This value indicates whether apps in this domain are managed (SimSpace Weaver starts and stops the apps) or unmanaged (you must start and stop the apps).
Lifecycle types
PerWorker
– Managed: SimSpace Weaver starts 1 app on each workerBySpatialSubdivision
– Managed: SimSpace Weaver starts 1 app for each spatial partitionByRequest
– Unmanaged: You use the StartApp API to start the apps and use the StopApp API to stop the apps.Note
The lifecycle types will change when the service is released for general availability (GA).
The name of the domain.
Settings that control how SimSpace Weaver handles your simulation log data.
A list of the locations where SimSpace Weaver sends simulation log data.
The location where SimSpace Weaver sends simulation log data.
An Amazon CloudWatch Logs log group that stores simulation log data. For more information about log groups, see Working with log groups and log streams in the Amazon CloudWatch Logs User Guide .
The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log group for the simulation. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference . For more information about log groups, see Working with log groups and log streams in the Amazon CloudWatch Logs User Guide .
The maximum running time of the simulation, specified as a number of months (m or M), hours (h or H), or days (d or D). The simulation stops when it reaches this limit.
The name of the simulation.
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference . For more information about IAM roles, see IAM roles in the Identity and Access Management User Guide .
An error message that SimSpace Weaver returns only if there is a problem with the simulation schema.
The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the Amazon Simple Storage Service User Guide.
The name of an Amazon S3 bucket. For more information about buckets, see Creating, configuring, and working with Amazon S3 buckets in the Amazon Simple Storage Service User Guide .
The key name of an object in Amazon S3. For more information about Amazon S3 objects and object keys, see Uploading, downloading, and working with objects in Amazon S3 in the Amazon Simple Storage Service User Guide .
The current lifecycle state of the simulation.
The desired lifecycle state of the simulation.
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
list_apps
(**kwargs)¶Lists all custom apps or service apps for the given simulation and domain.
See also: AWS API Documentation
Request Syntax
response = client.list_apps(
Domain='string',
MaxResults=123,
NextToken='string',
Simulation='string'
)
nextToken
, there are more results available. The value of nextToken
is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, nextToken
is set to null
. Each pagination token expires after 24 hours. If you provide a token that isn't valid, you receive an HTTP 400 ValidationException error.[REQUIRED]
The name of the simulation that you want to list apps for.
dict
Response Syntax
{
'Apps': [
{
'Domain': 'string',
'Name': 'string',
'Simulation': 'string',
'Status': 'STARTING'|'STARTED'|'STOPPING'|'STOPPED'|'ERROR'|'UNKNOWN',
'TargetStatus': 'UNKNOWN'|'STARTED'|'STOPPED'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
Apps (list) --
The list of apps for the given simulation and domain.
(dict) --
A collection of metadata about an app.
Domain (string) --
The domain of the app. For more information about domains, see Key concepts in the Amazon Web Services SimSpace Weaver User Guide .
Name (string) --
The name of the app.
Simulation (string) --
The name of the simulation of the app.
Status (string) --
The current status of the app.
TargetStatus (string) --
The desired status of the app.
NextToken (string) --
If SimSpace Weaver returns nextToken
, there are more results available. The value of nextToken
is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, nextToken
is set to null
. Each pagination token expires after 24 hours. If you provide a token that isn't valid, you receive an HTTP 400 ValidationException error.
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
list_simulations
(**kwargs)¶Lists the SimSpace Weaver simulations in the Amazon Web Services account used to make the API call.
See also: AWS API Documentation
Request Syntax
response = client.list_simulations(
MaxResults=123,
NextToken='string'
)
nextToken
, there are more results available. The value of nextToken
is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, nextToken
is set to null
. Each pagination token expires after 24 hours. If you provide a token that isn't valid, you receive an HTTP 400 ValidationException error.dict
Response Syntax
{
'NextToken': 'string',
'Simulations': [
{
'Arn': 'string',
'CreationTime': datetime(2015, 1, 1),
'Name': 'string',
'Status': 'UNKNOWN'|'STARTING'|'STARTED'|'STOPPING'|'STOPPED'|'FAILED'|'DELETING'|'DELETED',
'TargetStatus': 'UNKNOWN'|'STARTED'|'STOPPED'|'DELETED'
},
]
}
Response Structure
(dict) --
NextToken (string) --
If SimSpace Weaver returns nextToken
, there are more results available. The value of nextToken
is a unique pagination token for each page. To retrieve the next page, call the operation again using the returned token. Keep all other arguments unchanged. If no results remain, nextToken
is set to null
. Each pagination token expires after 24 hours. If you provide a token that isn't valid, you receive an HTTP 400 ValidationException error.
Simulations (list) --
The list of simulations.
(dict) --
A collection of data about the simulation.
Arn (string) --
The Amazon Resource Name (ARN) of the simulation. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
CreationTime (datetime) --
The time when the simulation was created, expressed as the number of seconds and milliseconds in UTC since the Unix epoch (0:0:0.000, January 1, 1970).
Name (string) --
The name of the simulation.
Status (string) --
The current status of the simulation.
TargetStatus (string) --
The desired status of the simulation.
Exceptions
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
Lists all tags on a SimSpace Weaver resource.
See also: AWS API Documentation
Request Syntax
response = client.list_tags_for_resource(
ResourceArn='string'
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
{
'Tags': {
'string': 'string'
}
}
Response Structure
The list of tags for the resource.
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.ValidationException
start_app
(**kwargs)¶Starts a custom app with the configuration specified in the simulation schema.
See also: AWS API Documentation
Request Syntax
response = client.start_app(
ClientToken='string',
Description='string',
Domain='string',
LaunchOverrides={
'LaunchCommands': [
'string',
]
},
Name='string',
Simulation='string'
)
A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A ClientToken
is also known as an idempotency token . A ClientToken
expires after 24 hours.
This field is autopopulated if not provided.
[REQUIRED]
The name of the domain of the app.
Options that apply when the app starts. These optiAons override default behavior.
App launch commands and command line parameters that override the launch command configured in the simulation schema.
[REQUIRED]
The name of the app.
[REQUIRED]
The name of the simulation of the app.
dict
Response Syntax
{
'Domain': 'string',
'Name': 'string',
'Simulation': 'string'
}
Response Structure
(dict) --
Domain (string) --
The name of the domain of the app.
Name (string) --
The name of the app.
Simulation (string) --
The name of the simulation of the app.
Exceptions
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ServiceQuotaExceededException
SimSpaceWeaver.Client.exceptions.ConflictException
start_clock
(**kwargs)¶Starts the simulation clock.
See also: AWS API Documentation
Request Syntax
response = client.start_clock(
Simulation='string'
)
[REQUIRED]
The name of the simulation.
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
start_simulation
(**kwargs)¶Starts a simulation with the given name and schema.
See also: AWS API Documentation
Request Syntax
response = client.start_simulation(
ClientToken='string',
Description='string',
MaximumDuration='string',
Name='string',
RoleArn='string',
SchemaS3Location={
'BucketName': 'string',
'ObjectKey': 'string'
},
Tags={
'string': 'string'
}
)
A value that you provide to ensure that repeated calls to this API operation using the same parameters complete only once. A ClientToken
is also known as an idempotency token . A ClientToken
expires after 24 hours.
This field is autopopulated if not provided.
[REQUIRED]
The name of the simulation.
[REQUIRED]
The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that the simulation assumes to perform actions. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference . For more information about IAM roles, see IAM roles in the Identity and Access Management User Guide .
[REQUIRED]
The location of the simulation schema in Amazon Simple Storage Service (Amazon S3). For more information about Amazon S3, see the Amazon Simple Storage Service User Guide.
The name of an Amazon S3 bucket. For more information about buckets, see Creating, configuring, and working with Amazon S3 buckets in the Amazon Simple Storage Service User Guide .
The key name of an object in Amazon S3. For more information about Amazon S3 objects and object keys, see Uploading, downloading, and working with objects in Amazon S3 in the Amazon Simple Storage Service User Guide .
A list of tags for the simulation. For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .
dict
Response Syntax
{
'Arn': 'string',
'CreationTime': datetime(2015, 1, 1),
'ExecutionId': 'string'
}
Response Structure
(dict) --
Arn (string) --
The Amazon Resource Name (ARN) of the simulation. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
CreationTime (datetime) --
The time when the simulation was created, expressed as the number of seconds and milliseconds in UTC since the Unix epoch (0:0:0.000, January 1, 1970).
ExecutionId (string) --
A universally unique identifier (UUID) for this simulation.
Exceptions
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ServiceQuotaExceededException
SimSpaceWeaver.Client.exceptions.ConflictException
stop_app
(**kwargs)¶Stops the given custom app and shuts down all of its allocated compute resources.
See also: AWS API Documentation
Request Syntax
response = client.stop_app(
App='string',
Domain='string',
Simulation='string'
)
[REQUIRED]
The name of the app.
[REQUIRED]
The name of the domain of the app.
[REQUIRED]
The name of the simulation of the app.
dict
Response Syntax
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
stop_clock
(**kwargs)¶Stops the simulation clock.
See also: AWS API Documentation
Request Syntax
response = client.stop_clock(
Simulation='string'
)
[REQUIRED]
The name of the simulation.
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
stop_simulation
(**kwargs)¶Stops the given simulation.
Warning
You can't restart a simulation after you stop it. If you need to restart a simulation, you must stop it, delete it, and start a new instance of it.
See also: AWS API Documentation
Request Syntax
response = client.stop_simulation(
Simulation='string'
)
[REQUIRED]
The name of the simulation.
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.InternalServerException
SimSpaceWeaver.Client.exceptions.AccessDeniedException
SimSpaceWeaver.Client.exceptions.ValidationException
SimSpaceWeaver.Client.exceptions.ConflictException
tag_resource
(**kwargs)¶Adds tags to a SimSpace Weaver resource. For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .
See also: AWS API Documentation
Request Syntax
response = client.tag_resource(
ResourceArn='string',
Tags={
'string': 'string'
}
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to add tags to. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
[REQUIRED]
A list of tags to apply to the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.TooManyTagsException
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.ValidationException
untag_resource
(**kwargs)¶Removes tags from a SimSpace Weaver resource. For more information about tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .
See also: AWS API Documentation
Request Syntax
response = client.untag_resource(
ResourceArn='string',
TagKeys=[
'string',
]
)
[REQUIRED]
The Amazon Resource Name (ARN) of the resource that you want to remove tags from. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference .
[REQUIRED]
A list of tag keys to remove from the resource.
dict
Response Syntax
{}
Response Structure
Exceptions
SimSpaceWeaver.Client.exceptions.ResourceNotFoundException
SimSpaceWeaver.Client.exceptions.ValidationException
The available paginators are: