Skip to content

list_organization_portfolio_access async

list_organization_portfolio_access(
    portfolio_id: Id,
    organization_node_type: OrganizationNodeType,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[AcceptLanguage] = None,
    page_token: Optional[PageToken] = None,
    page_size: Optional[PageSize] = None,
) -> ListOrganizationPortfolioAccessOutput

Lists the organization nodes that have access to the specified portfolio. This API can only be called by the management account in the organization or by a delegated admin.

If a delegated admin is de-registered, they can no longer perform this operation.

Parameters:

  • accept_language (Optional[AcceptLanguage], default: None ) –

    The language code.

    • jp - Japanese

    • zh - Chinese

  • portfolio_id (Id) –

    The portfolio identifier. For example, port-2abcdext3y5fk.

  • organization_node_type (OrganizationNodeType) –

    The organization node type that will be returned in the output.

    • ORGANIZATION - Organization that has access to the portfolio.

    • ORGANIZATIONAL_UNIT - Organizational unit that has access to the portfolio within your organization.

    • ACCOUNT - Account that has access to the portfolio within your organization.

  • page_token (Optional[PageToken], default: None ) –

    The page token for the next set of results. To retrieve the first set of results, use null.

  • page_size (Optional[PageSize], default: None ) –

    The maximum number of items to return with this call.

Raises:

Source code in docs_src/capo_service_catalog/_services/async_service_catalog.py
async def list_organization_portfolio_access(
    self,
    portfolio_id: "capo_service_catalog.types.id.Id",
    organization_node_type: "capo_service_catalog.types.organization_node_type.OrganizationNodeType",
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    accept_language: Optional[
        "capo_service_catalog.types.accept_language.AcceptLanguage"
    ] = None,
    page_token: Optional["capo_service_catalog.types.page_token.PageToken"] = None,
    page_size: Optional["capo_service_catalog.types.page_size.PageSize"] = None,
) -> "capo_service_catalog.types.list_organization_portfolio_access_output.ListOrganizationPortfolioAccessOutput":
    """<p>Lists the organization nodes that have access to the specified portfolio. This API can only be called by the management account in the organization or by a delegated admin.</p> <p>If a delegated admin is de-registered, they can no longer perform this operation.</p>

    Args:
        accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
        portfolio_id: <p>The portfolio identifier. For example, <code>port-2abcdext3y5fk</code>.</p>
        organization_node_type: <p>The organization node type that will be returned in the output.</p> <ul> <li> <p> <code>ORGANIZATION</code> - Organization that has access to the portfolio. </p> </li> <li> <p> <code>ORGANIZATIONAL_UNIT</code> - Organizational unit that has access to the portfolio within your organization.</p> </li> <li> <p> <code>ACCOUNT</code> - Account that has access to the portfolio within your organization.</p> </li> </ul>
        page_token: <p>The page token for the next set of results. To retrieve the first set of results, use null.</p>
        page_size: <p>The maximum number of items to return with this call.</p>

    Raises:
        capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
        capo_service_catalog.errors.operation_not_supported_exception.OperationNotSupportedException: <p>The operation is not supported.</p>
        capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_service_catalog.types.list_organization_portfolio_access_input.ListOrganizationPortfolioAccessInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.list_organization_portfolio_access_output.ListOrganizationPortfolioAccessOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.list_organization_portfolio_access

        (
            output,
            http_response,
        ) = await capo_service_catalog._operations.aws242_service_catalog_service.list_organization_portfolio_access.async_list_organization_portfolio_access(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListOrganizationPortfolioAccess")
    )
    input_: capo_service_catalog.types.list_organization_portfolio_access_input.ListOrganizationPortfolioAccessInput = {
        "portfolio_id": portfolio_id,
        "organization_node_type": organization_node_type,
    }
    if accept_language is not None:
        input_["accept_language"] = accept_language
    if page_token is not None:
        input_["page_token"] = page_token
    if page_size is not None:
        input_["page_size"] = page_size

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output