Retrieves the resource shares associated with an account. Use the filter parameter to retrieve a specific subset of the shares.
Parameters:
-
resource_owner
(ResourceOwner)
–
The account that owns the resource shares.
-
filter
(Optional[Filter], default:
None
)
–
Attributes that you use to filter for a specific subset of resource shares.
-
next_token
(Optional[str], default:
None
)
–
Next token returned in the response of a previous ListReadSetUploadPartsRequest call. Used to get the next page of results.
-
max_results
(Optional[int], default:
None
)
–
The maximum number of shares to return in one page of results.
Raises:
Source code in docs_src/capo_omics/_services/async_omics.py
| async def list_shares(
self,
resource_owner: "capo_omics.types.resource_owner.ResourceOwner",
*,
config_overrides: Optional[AsyncOmicsClientConfig] = None,
filter: Optional["capo_omics.types.filter.Filter"] = None,
next_token: Optional[str] = None,
max_results: Optional[int] = None,
) -> "capo_omics.types.list_shares_response.ListSharesResponse":
"""<p>Retrieves the resource shares associated with an account. Use the filter parameter to retrieve a specific subset of the shares.</p>
Args:
resource_owner: <p>The account that owns the resource shares.</p>
filter: <p>Attributes that you use to filter for a specific subset of resource shares.</p>
next_token: <p>Next token returned in the response of a previous ListReadSetUploadPartsRequest call. Used to get the next page of results.</p>
max_results: <p>The maximum number of shares to return in one page of results.</p>
Raises:
capo_omics.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_omics.errors.conflict_exception.ConflictException: <p>The request cannot be applied to the target resource in its current state.</p>
capo_omics.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred. Try the request again.</p>
capo_omics.errors.resource_not_found_exception.ResourceNotFoundException: <p>The target resource was not found in the current Region.</p>
capo_omics.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota.</p>
capo_omics.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_omics.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_omics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_omics.types.list_shares_request.ListSharesRequest]",
) -> AsyncOperationResponse[
"capo_omics.types.list_shares_response.ListSharesResponse"
]:
import capo_omics._operations.omics.list_shares
(
output,
http_response,
) = await capo_omics._operations.omics.list_shares.async_list_shares(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListShares")
)
input_: capo_omics.types.list_shares_request.ListSharesRequest = {
"resource_owner": resource_owner
}
if filter is not None:
input_["filter"] = filter
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|