Work with Amazon SWF domains using the Amazon CLI
You can use the Amazon Command Line Interface (Amazon CLI) to manage your Amazon Simple Workflow Service (Amazon SWF) domains.
List your domains
To list the Amazon SWF domains that you have registered for your Amazon account, you can use
swf
list-domains
--registration-status
and specify either REGISTERED
or DEPRECATED
.
Here's a minimal example.
$
aws swf list-domains --registration-status REGISTERED
{ "domainInfos": [ { "status": "REGISTERED", "name": "ExampleDomain" }, { "status": "REGISTERED", "name": "mytest" } ] }
Note
For an example of using DEPRECATED
, see Deprecate a domain.
For more information, see
swf
list-domains
Get information about a domain
To get detailed information about a particular domain, use
swf
describe-domain
--name
, which takes the name of the domain you want information about,
as shown in the following example.
$
aws swf describe-domain --name
ExampleDomain
{ "domainInfo": { "status": "REGISTERED", "name": "ExampleDomain" }, "configuration": { "workflowExecutionRetentionPeriodInDays": "1" } }
For more information, see
swf
describe-domain
Register a domain
To register new domains, use
swf
register-domain
There are two required parameters: --name
and
--workflow-execution-retention-period-in-days
. The --name
parameter takes the domain name to register. The
--workflow-execution-retention-period-in-days
parameter takes an
integer to specify the number of days to retain workflow execution data on this domain,
up to a maximum period of 90 days (for more information, see the Amazon SWF FAQ
If you specify zero (0) for this value, the retention period is automatically set at the maximum duration. Otherwise, workflow execution data isn't retained after the specified number of days have passed. The following example shows how to register a new domain.
$
aws swf register-domain --name
MyNeatNewDomain
--workflow-execution-retention-period-in-days 0
The command doesn't return any output, but you can use swf list-domains
or
swf describe-domain
to see the new domain, as shown in the following
example.
$
aws swf describe-domain --name
MyNeatNewDomain
{ "domainInfo": { "status": "REGISTERED", "name": "MyNeatNewDomain" }, "configuration": { "workflowExecutionRetentionPeriodInDays": "0" } }
For more information, see
swf
register-domain
Deprecate a domain
To deprecate a domain (you can still see it, but cannot create new workflow executions
or register types on it), use
swf
deprecate-domain
--name
, which takes the name of the domain to deprecate.
$
aws swf deprecate-domain --name
MyNeatNewDomain
As with register-domain
, no output is returned. If you use
list-domains
to view the registered domains, however, you will see that
the domain no longer appears among them. You can also use --registration-status
DEPRECATED
.
$
aws swf list-domains --registration-status DEPRECATED
{ "domainInfos": [ { "status": "DEPRECATED", "name": "MyNeatNewDomain" } ] }
For more information, see
deprecate-domain