Gets trusted access program details and 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. Returns the same flat summary as a ListTrustedAccessPrograms item. An absent or invisible program returns ResourceNotFoundException.
Parameters:
-
program_identifier
(TrustedAccessProgramIdentifier)
–
Identifier of the trusted access program.
-
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.
Raises:
Source code in docs_src/capo_bedrock/_services/bedrock.py
| def get_trusted_access_program(
self,
program_identifier: "capo_bedrock.types.trusted_access_program_identifier.TrustedAccessProgramIdentifier",
*,
config_overrides: Optional[BedrockClientConfig] = None,
project_identifier: Optional[
"capo_bedrock.types.project_identifier.ProjectIdentifier"
] = None,
) -> "capo_bedrock.types.get_trusted_access_program_response.GetTrustedAccessProgramResponse":
"""<p>Gets trusted access program details and 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. Returns the same flat summary as a ListTrustedAccessPrograms item. An absent or invisible program returns ResourceNotFoundException.</p>
Args:
program_identifier: <p>Identifier of the trusted access program.</p>
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>
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.get_trusted_access_program_request.GetTrustedAccessProgramRequest]",
) -> OperationResponse[
"capo_bedrock.types.get_trusted_access_program_response.GetTrustedAccessProgramResponse"
]:
import capo_bedrock._operations.amazon_bedrock_control_plane_service.get_trusted_access_program
output, http_response = (
capo_bedrock._operations.amazon_bedrock_control_plane_service.get_trusted_access_program.get_trusted_access_program(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTrustedAccessProgram")
)
input_: capo_bedrock.types.get_trusted_access_program_request.GetTrustedAccessProgramRequest = {
"program_identifier": program_identifier
}
if project_identifier is not None:
input_["project_identifier"] = project_identifier
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|