Returns the list of domains registered in the account. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.
This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.
Access Control
You can use IAM policies to control this action's access to Amazon SWF resources as follows:
-
Use a Resource element with the domain name to limit the action to only specified domains. The element must be set to arn:aws:swf::AccountID:domain/*, where AccountID is the account ID, with no dashes.
-
Use an Action element to allow or deny permission to call this action.
-
You cannot use an IAM policy to constrain this action's parameters.
If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
Parameters:
-
next_page_token
(Optional[PageToken], default:
None
)
–
If NextPageToken is returned there are more results available. The value of NextPageToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has exceeded its maximum lifetime".
The configured maximumPageSize determines how many results can be returned in a single call.
-
registration_status
(RegistrationStatus)
–
Specifies the registration status of the domains to list.
-
maximum_page_size
(Optional[PageSize], default:
None
)
–
The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
-
reverse_order
(Optional[ReverseOrder], default:
None
)
–
When set to true, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by name of the domains.
Raises:
Source code in docs_src/capo_swf/_services/async_swf.py
| async def list_domains(
self,
registration_status: "capo_swf.types.registration_status.RegistrationStatus",
*,
config_overrides: Optional[AsyncSWFClientConfig] = None,
next_page_token: Optional["capo_swf.types.page_token.PageToken"] = None,
maximum_page_size: Optional["capo_swf.types.page_size.PageSize"] = None,
reverse_order: Optional["capo_swf.types.reverse_order.ReverseOrder"] = None,
) -> "capo_swf.types.domain_infos.DomainInfos":
"""<p>Returns the list of domains registered in the account. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.</p> </note> <p> <b>Access Control</b> </p> <p>You can use IAM policies to control this action's access to Amazon SWF resources as follows:</p> <ul> <li> <p>Use a <code>Resource</code> element with the domain name to limit the action to only specified domains. The element must be set to <code>arn:aws:swf::AccountID:domain/*</code>, where <i>AccountID</i> is the account ID, with no dashes.</p> </li> <li> <p>Use an <code>Action</code> element to allow or deny permission to call this action.</p> </li> <li> <p>You cannot use an IAM policy to constrain this action's parameters.</p> </li> </ul> <p>If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's <code>cause</code> parameter is set to <code>OPERATION_NOT_PERMITTED</code>. For details and example IAM policies, see <a href="https://docs.aws.amazon.com/amazonswf/latest/developerguide/swf-dev-iam.html">Using IAM to Manage Access to Amazon SWF Workflows</a> in the <i>Amazon SWF Developer Guide</i>.</p>
Args:
next_page_token: <p>If <code>NextPageToken</code> is returned there are more results available. The value of <code>NextPageToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return a <code>400</code> error: "<code>Specified token has exceeded its maximum lifetime</code>". </p> <p>The configured <code>maximumPageSize</code> determines how many results can be returned in a single call. </p>
registration_status: <p>Specifies the registration status of the domains to list.</p>
maximum_page_size: <p>The maximum number of results that are returned per call. Use <code>nextPageToken</code> to obtain further pages of results. </p>
reverse_order: <p>When set to <code>true</code>, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by <code>name</code> of the domains.</p>
Raises:
capo_swf.errors.operation_not_permitted_fault.OperationNotPermittedFault: <p>Returned when the caller doesn't have sufficient permissions to invoke the action.</p>
capo_swf.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_swf.types.list_domains_input.ListDomainsInput]",
) -> AsyncOperationResponse["capo_swf.types.domain_infos.DomainInfos"]:
import capo_swf._operations.simple_workflow_service.list_domains
(
output,
http_response,
) = await capo_swf._operations.simple_workflow_service.list_domains.async_list_domains(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListDomains")
)
input_: capo_swf.types.list_domains_input.ListDomainsInput = {
"registration_status": registration_status
}
if next_page_token is not None:
input_["next_page_token"] = next_page_token
if maximum_page_size is not None:
input_["maximum_page_size"] = maximum_page_size
if reverse_order is not None:
input_["reverse_order"] = reverse_order
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|