View a markdown version of this page

구성 번들 가져오기 - Amazon Bedrock AgentCore

구성 번들 가져오기

구성 번들을 검색하여 메타데이터를 검사하거나 특정 버전의 전체 구성 콘텐츠를 읽습니다. 두 가지 작업을 사용할 수 있습니다.

  • GetConfigurationBundle - 번들의 최신 버전을 반환합니다. 이 지정된 경우 branchName는 해당 브랜치의 최신 버전을 반환합니다. 생략하면 모든 브랜치에서 최신 버전을 반환합니다. 이를 사용하여 현재 활성 구성을 읽습니다.

  • GetConfigurationBundleVersion - 버전 ID별로 특정 기록 버전을 반환합니다. 이를 사용하여 과거 구성을 검사하거나 버전을 비교할 수 있습니다.

번들 메타데이터와 버전 콘텐츠

GetConfigurationBundle는 번들 수준 메타데이터(이름, 설명, ARN)와 전체 버전 콘텐츠(구성 키-값 페어가 있는 구성 요소)를 모두 반환합니다. 전체 콘텐츠를 가져오지 않고 존재하는 버전만 알아야 하는 경우 ListConfigurationBundleVersions 대신를 사용합니다.

GetConfigurationBundleVersion는 동일한 필드와를 반환합니다. versionCreatedAt이 필드는 특정 버전이 생성된 시기를 정확히 알려줍니다(번들 자체가 처음 생성된 시기createdAt인 와는 반대).

코드 샘플

AgentCore CLI

번들의 버전 기록 보기:

agentcore config-bundle versions --name myAgentConfig

두 버전을 나란히 비교합니다.

agentcore config-bundle diff --name myAgentConfig \ --from <version-1> \ --to <version-2>
참고

직접 "번들 콘텐츠 가져오기" CLI 명령은 없습니다. config-bundle 하위 명령은 versions, diff및 입니다create-branch. 버전을 열거하고 IDs 캡처하려면 agentcore config-bundle versions --name myAgentConfig --json (선택 사항으로 --branch <name>, --latest-per-branch또는 --created-by <name>)를 사용한 다음 버전 IDs에 공급합니다config-bundle diff. 번들 버전의 전체 구성 콘텐츠를 가져오려면 아래 표시된 SDK/REST GetConfigurationBundleVersion 작업을 사용합니다.

AWS SDK (boto3)

번들 메타데이터 및 최신 버전 콘텐츠 가져오기:

import boto3 client = boto3.client("bedrock-agentcore-control", region_name="us-west-2") response = client.get_configuration_bundle( bundleId="myAgentConfig-a1b2c3d4e5" ) print(f"Bundle: {response['bundleName']}") print(f"Version: {response['versionId']}") print(f"Branch: {response.get('lineageMetadata', {}).get('branchName', 'N/A')}") print(f"Components: {response['components']}")

특정 기록 버전을 가져옵니다.

response = client.get_configuration_bundle_version( bundleId="myAgentConfig-a1b2c3d4e5", versionId="12345678-1234-1234-1234-123456789012" ) print(f"Version: {response['versionId']}") print(f"Version created at: {response['versionCreatedAt']}") print(f"Commit message: {response.get('lineageMetadata', {}).get('commitMessage', '')}") print(f"Components: {response['components']}")

요청 파라미터

GetConfigurationBundle

파라미터 유형 필수 설명

bundleId

문자열

구성 번들의 ID입니다. 경로 파라미터로 전달됩니다.

branchName

문자열

No

최신 버전을 가져올 브랜치 이름입니다. 생략하면 모든 브랜치에서 최신 버전을 반환합니다.

GetConfigurationBundleVersion

파라미터 유형 필수 설명

bundleId

문자열

구성 번들의 ID입니다. 경로 파라미터로 전달됩니다.

versionId

문자열

검색할 특정 버전의 UUID입니다. 경로 파라미터로 전달됩니다.

응답

두 작업 모두 동일한 필드를 반환합니다. GetConfigurationBundleVersion 추가로는를 반환합니다versionCreatedAt.

Field 유형 설명

bundleArn

문자열

구성 번들의 ARN입니다.

bundleId

문자열

구성 번들의 ID입니다.

bundleName

문자열

번들의 이름입니다.

description

문자열

번들에 대한 설명(설정된 경우).

versionId

문자열

반환된 버전의 UUID입니다.

components

구성 요소 구성에 대한 구성 요소 식별자 맵입니다. 각 값에는이 버전에 저장된 키-값 페어가 있는 configuration 객체가 포함됩니다.

lineageMetadata

객체

parentVersionIds, branchName, createdBy및를 포함한 버전 계보 메타데이터입니다commitMessage.

createdAt

타임스탬프

번들이 원래 생성된 시간입니다.

updatedAt

타임스탬프

번들이 마지막으로 업데이트된 시간(GetConfigurationBundle만 해당).

versionCreatedAt

타임스탬프

이 특정 버전이 생성된 시점(GetConfigurationBundleVersion만 해당).

오류

오류 HTTP 상태 설명

ValidationException

400

잘못된 요청 파라미터입니다.

ResourceNotFoundException

404

지정된 bundleId 또는 versionId이 존재하지 않습니다.

AccessDeniedException

403

권한이 부족합니다. IAM 정책에 bedrock-agentcore:GetConfigurationBundle 또는가 포함되어 있는지 확인합니다bedrock-agentcore:GetConfigurationBundleVersion.

ThrottlingException

429

요청 속도가 초과되었습니다. 지수 백오프를 사용하여 재시도하세요.

InternalServerException

500

서비스 측 오류입니다. 요청을 다시 시도하세요.