기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
AgentCore 코드 해석기 세션 중지
Code Interpreter 세션 사용을 마치면 이를 중지하여 리소스를 해제하고 불필요한 요금을 방지해야 합니다.
예
- AWS CLI
-
-
AWS CLI를 사용하여 코드 인터프리터 세션을 중지하려면
stop-code-interpreter-session명령을 사용합니다.aws bedrock-agentcore stop-code-interpreter-session \ --region <Region> \ --code-interpreter-id "<your-code-interpreter-id>" \ --session-id "<your-session-id>"
-
- Boto3
-
-
AWS SDK for Python을 사용하여 코드 해석기 세션을 중지하려면
stop_code_interpreter_session메서드를 사용합니다.import boto3 # Initialize the boto3 client dp_client = boto3.client( 'bedrock-agentcore', region_name="<Region>", endpoint_url="https://bedrock-agentcore.<Region>.amazonaws.com" ) # Stop the Code Interpreter session response = dp_client.stop_code_interpreter_session( codeInterpreterIdentifier="aws.codeinterpreter.v1", sessionId="<your-session-id>" ) print("Session stopped successfully")
-
- API
-
-
API를 사용하여 코드 인터프리터 세션을 중지하려면 다음 호출을 사용합니다.
# Using awscurl awscurl -X PUT \ "https://bedrock-agentcore.<Region>.amazonaws.com/code-interpreters/aws.codeinterpreter.v1/sessions/stop?sessionId=<your-session-id>" \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ --service bedrock-agentcore \ --region <Region>
-
런타임 선택
파일 시스템 구성