Skip to content

describe_portfolio_shares async

describe_portfolio_shares(
    portfolio_id: Id,
    type: DescribePortfolioShareType,
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    page_token: Optional[PageToken] = None,
    page_size: Optional[PageSizeMax100] = None,
) -> DescribePortfolioSharesOutput

Returns a summary of each of the portfolio shares that were created for the specified portfolio.

You can use this API to determine which accounts or organizational nodes this portfolio have been shared, whether the recipient entity has imported the share, and whether TagOptions are included with the share.

The PortfolioId and Type parameters are both required.

Parameters:

  • portfolio_id (Id) –

    The unique identifier of the portfolio for which shares will be retrieved.

  • type (DescribePortfolioShareType) –

    The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can be one of the following:

    1. ACCOUNT - Represents an external account to account share.

    2. ORGANIZATION - Represents a share to an organization. This share is available to every account in the organization.

    3. ORGANIZATIONAL_UNIT - Represents a share to an organizational unit.

    4. ORGANIZATION_MEMBER_ACCOUNT - Represents a share to an account in the 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[PageSizeMax100], 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 describe_portfolio_shares(
    self,
    portfolio_id: "capo_service_catalog.types.id.Id",
    type: "capo_service_catalog.types.describe_portfolio_share_type.DescribePortfolioShareType",
    *,
    config_overrides: Optional[AsyncServiceCatalogClientConfig] = None,
    page_token: Optional["capo_service_catalog.types.page_token.PageToken"] = None,
    page_size: Optional[
        "capo_service_catalog.types.page_size_max100.PageSizeMax100"
    ] = None,
) -> "capo_service_catalog.types.describe_portfolio_shares_output.DescribePortfolioSharesOutput":
    """<p>Returns a summary of each of the portfolio shares that were created for the specified portfolio.</p> <p>You can use this API to determine which accounts or organizational nodes this portfolio have been shared, whether the recipient entity has imported the share, and whether TagOptions are included with the share.</p> <p>The <code>PortfolioId</code> and <code>Type</code> parameters are both required.</p>

    Args:
        portfolio_id: <p>The unique identifier of the portfolio for which shares will be retrieved.</p>
        type: <p>The type of portfolio share to summarize. This field acts as a filter on the type of portfolio share, which can be one of the following:</p> <p>1. <code>ACCOUNT</code> - Represents an external account to account share.</p> <p>2. <code>ORGANIZATION</code> - Represents a share to an organization. This share is available to every account in the organization.</p> <p>3. <code>ORGANIZATIONAL_UNIT</code> - Represents a share to an organizational unit.</p> <p>4. <code>ORGANIZATION_MEMBER_ACCOUNT</code> - Represents a share to an account in the organization.</p>
        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.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.describe_portfolio_shares_input.DescribePortfolioSharesInput]",
    ) -> AsyncOperationResponse[
        "capo_service_catalog.types.describe_portfolio_shares_output.DescribePortfolioSharesOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.describe_portfolio_shares

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribePortfolioShares")
    )
    input_: capo_service_catalog.types.describe_portfolio_shares_input.DescribePortfolioSharesInput = {
        "portfolio_id": portfolio_id,
        "type": type,
    }
    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