Skip to content

list_trusted_access_programs

list_trusted_access_programs(
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
    project_identifier: Optional[ProjectIdentifier] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[PaginationToken] = None,
) -> ListTrustedAccessProgramsResponse

Lists all trusted access programs visible to your account, ordered by program ID. Amazon Bedrock resolves participation for your account and its current organization. If you specify a project, Amazon Bedrock resolves participation for the project, including inheritance from the account and organization. Archived projects remain readable until they expire. Amazon Bedrock returns all visible programs in one response.

Parameters:

  • project_identifier (Optional[ProjectIdentifier], default: None ) –

    The ID or ARN of a named Bedrock project owned by the calling account in this Region. When omitted, resolves participation for the calling account, including participation inherited from its current organization. When specified, resolves participation for the project, including participation inherited from the account and its current organization. You cannot specify the default project. Omit this field to resolve its inherited participation. An ARN from another account, Region, or partition returns ValidationException. A project that does not exist in the calling account returns ResourceNotFoundException.

  • max_results (Optional[MaxResults], default: None ) –

    Reserved for future pagination support. Currently ignored; the response includes all visible programs.

  • next_token (Optional[PaginationToken], default: None ) –

    Reserved for future pagination support. Omit this field.

Raises:

Source code in docs_src/capo_bedrock/_services/bedrock.py
def list_trusted_access_programs(
    self,
    *,
    config_overrides: Optional[BedrockClientConfig] = None,
    project_identifier: Optional[
        "capo_bedrock.types.project_identifier.ProjectIdentifier"
    ] = None,
    max_results: Optional["capo_bedrock.types.max_results.MaxResults"] = None,
    next_token: Optional[
        "capo_bedrock.types.pagination_token.PaginationToken"
    ] = None,
) -> "capo_bedrock.types.list_trusted_access_programs_response.ListTrustedAccessProgramsResponse":
    """<p>Lists all trusted access programs visible to your account, ordered by program ID. Amazon Bedrock resolves participation for your account and its current organization. If you specify a project, Amazon Bedrock resolves participation for the project, including inheritance from the account and organization. Archived projects remain readable until they expire. Amazon Bedrock returns all visible programs in one response.</p>

    Args:
        project_identifier: <p>The ID or ARN of a named Bedrock project owned by the calling account in this Region. When omitted, resolves participation for the calling account, including participation inherited from its current organization. When specified, resolves participation for the project, including participation inherited from the account and its current organization. You cannot specify the default project. Omit this field to resolve its inherited participation. An ARN from another account, Region, or partition returns ValidationException. A project that does not exist in the calling account returns ResourceNotFoundException.</p>
        max_results: <p>Reserved for future pagination support. Currently ignored; the response includes all visible programs.</p>
        next_token: <p>Reserved for future pagination support. Omit this field.</p>

    Raises:
        capo_bedrock.errors.access_denied_exception.AccessDeniedException: <p>The request is denied because of missing access permissions.</p>
        capo_bedrock.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_bedrock.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
        capo_bedrock.errors.throttling_exception.ThrottlingException: <p>The number of requests exceeds the limit. Resubmit your request later.</p>
        capo_bedrock.errors.validation_exception.ValidationException: <p>Input validation failed. Check your request parameters and retry the request.</p>
        capo_bedrock.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_bedrock.types.list_trusted_access_programs_request.ListTrustedAccessProgramsRequest]",
    ) -> OperationResponse[
        "capo_bedrock.types.list_trusted_access_programs_response.ListTrustedAccessProgramsResponse"
    ]:
        import capo_bedrock._operations.amazon_bedrock_control_plane_service.list_trusted_access_programs

        output, http_response = (
            capo_bedrock._operations.amazon_bedrock_control_plane_service.list_trusted_access_programs.list_trusted_access_programs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListTrustedAccessPrograms")
    )
    input_: capo_bedrock.types.list_trusted_access_programs_request.ListTrustedAccessProgramsRequest = {}
    if project_identifier is not None:
        input_["project_identifier"] = project_identifier
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output