Skip to content

update_agent_runtime async

update_agent_runtime(
    agent_runtime_id: AgentRuntimeId,
    agent_runtime_artifact: AgentRuntimeArtifact,
    role_arn: RoleArn,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    network_configuration: Optional[NetworkConfiguration] = None,
    description: Optional[Description] = None,
    authorizer_configuration: Optional[AuthorizerConfiguration] = None,
    request_header_configuration: Optional[RequestHeaderConfiguration] = None,
    protocol_configuration: Optional[ProtocolConfiguration] = None,
    lifecycle_configuration: Optional[LifecycleConfiguration] = None,
    metadata_configuration: Optional[RuntimeMetadataConfiguration] = None,
    environment_variables: Optional[EnvironmentVariablesMap] = None,
    filesystem_configurations: Optional[FilesystemConfigurations] = None,
    capacity_provider_configuration: Optional[CapacityProviderConfiguration] = None,
    platform_version: Optional[PlatformVersion] = None,
    client_token: Optional[ClientToken] = None,
) -> UpdateAgentRuntimeResponse

Updates an existing Amazon Secure Agent.

Parameters:

  • agent_runtime_id (AgentRuntimeId) –

    The unique identifier of the AgentCore Runtime to update.

  • agent_runtime_artifact (AgentRuntimeArtifact) –

    The updated artifact of the AgentCore Runtime.

  • role_arn (RoleArn) –

    The updated IAM role ARN that provides permissions for the AgentCore Runtime.

  • network_configuration (Optional[NetworkConfiguration], default: None ) –

    The updated network configuration for the AgentCore Runtime.

  • description (Optional[Description], default: None ) –

    The updated description of the AgentCore Runtime.

  • authorizer_configuration (Optional[AuthorizerConfiguration], default: None ) –

    The updated authorizer configuration for the AgentCore Runtime.

  • request_header_configuration (Optional[RequestHeaderConfiguration], default: None ) –

    The updated configuration for HTTP request headers that will be passed through to the runtime.

  • lifecycle_configuration (Optional[LifecycleConfiguration], default: None ) –

    The updated life cycle configuration for the AgentCore Runtime.

  • metadata_configuration (Optional[RuntimeMetadataConfiguration], default: None ) –

    The updated configuration for microVM Metadata Service (MMDS) settings for the AgentCore Runtime.

  • environment_variables (Optional[EnvironmentVariablesMap], default: None ) –

    Updated environment variables to set in the AgentCore Runtime environment.

  • filesystem_configurations (Optional[FilesystemConfigurations], default: None ) –

    The updated filesystem configurations to mount into the AgentCore Runtime.

  • capacity_provider_configuration (Optional[CapacityProviderConfiguration], default: None ) –

    The updated capacity provider configuration for the AgentCore Runtime.

  • platform_version (Optional[PlatformVersion], default: None ) –

    The updated version of the runtime platform to use for the AgentCore Runtime.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure idempotency of the request.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def update_agent_runtime(
    self,
    agent_runtime_id: "capo_bedrock_agentcore_control.types.agent_runtime_id.AgentRuntimeId",
    agent_runtime_artifact: "capo_bedrock_agentcore_control.types.agent_runtime_artifact.AgentRuntimeArtifact",
    role_arn: "capo_bedrock_agentcore_control.types.role_arn.RoleArn",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    network_configuration: Optional[
        "capo_bedrock_agentcore_control.types.network_configuration.NetworkConfiguration"
    ] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.description.Description"
    ] = None,
    authorizer_configuration: Optional[
        "capo_bedrock_agentcore_control.types.authorizer_configuration.AuthorizerConfiguration"
    ] = None,
    request_header_configuration: Optional[
        "capo_bedrock_agentcore_control.types.request_header_configuration.RequestHeaderConfiguration"
    ] = None,
    protocol_configuration: Optional[
        "capo_bedrock_agentcore_control.types.protocol_configuration.ProtocolConfiguration"
    ] = None,
    lifecycle_configuration: Optional[
        "capo_bedrock_agentcore_control.types.lifecycle_configuration.LifecycleConfiguration"
    ] = None,
    metadata_configuration: Optional[
        "capo_bedrock_agentcore_control.types.runtime_metadata_configuration.RuntimeMetadataConfiguration"
    ] = None,
    environment_variables: Optional[
        "capo_bedrock_agentcore_control.types.environment_variables_map.EnvironmentVariablesMap"
    ] = None,
    filesystem_configurations: Optional[
        "capo_bedrock_agentcore_control.types.filesystem_configurations.FilesystemConfigurations"
    ] = None,
    capacity_provider_configuration: Optional[
        "capo_bedrock_agentcore_control.types.capacity_provider_configuration.CapacityProviderConfiguration"
    ] = None,
    platform_version: Optional[
        "capo_bedrock_agentcore_control.types.platform_version.PlatformVersion"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.update_agent_runtime_response.UpdateAgentRuntimeResponse":
    """<p>Updates an existing Amazon Secure Agent.</p>

    Args:
        agent_runtime_id: <p>The unique identifier of the AgentCore Runtime to update.</p>
        agent_runtime_artifact: <p>The updated artifact of the AgentCore Runtime.</p>
        role_arn: <p>The updated IAM role ARN that provides permissions for the AgentCore Runtime.</p>
        network_configuration: <p>The updated network configuration for the AgentCore Runtime.</p>
        description: <p>The updated description of the AgentCore Runtime.</p>
        authorizer_configuration: <p>The updated authorizer configuration for the AgentCore Runtime.</p>
        request_header_configuration: <p>The updated configuration for HTTP request headers that will be passed through to the runtime.</p>
        lifecycle_configuration: <p>The updated life cycle configuration for the AgentCore Runtime.</p>
        metadata_configuration: <p>The updated configuration for microVM Metadata Service (MMDS) settings for the AgentCore Runtime.</p>
        environment_variables: <p>Updated environment variables to set in the AgentCore Runtime environment.</p>
        filesystem_configurations: <p>The updated filesystem configurations to mount into the AgentCore Runtime.</p>
        capacity_provider_configuration: <p>The updated capacity provider configuration for the AgentCore Runtime.</p>
        platform_version: <p>The updated version of the runtime platform to use for the AgentCore Runtime.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</p>
        capo_bedrock_agentcore_control.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception is thrown when a request is made beyond the service quota</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.update_agent_runtime_request.UpdateAgentRuntimeRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.update_agent_runtime_response.UpdateAgentRuntimeResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_agent_runtime

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.update_agent_runtime.async_update_agent_runtime(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_agentcore_control.types.update_agent_runtime_request.UpdateAgentRuntimeRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.update_agent_runtime_request

        return capo_bedrock_agentcore_control.types.update_agent_runtime_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateAgentRuntime", redact_input=_redact_input),
    )
    input_: capo_bedrock_agentcore_control.types.update_agent_runtime_request.UpdateAgentRuntimeRequest = {
        "agent_runtime_id": agent_runtime_id,
        "agent_runtime_artifact": agent_runtime_artifact,
        "role_arn": role_arn,
    }
    if network_configuration is not None:
        input_["network_configuration"] = network_configuration
    if description is not None:
        input_["description"] = description
    if authorizer_configuration is not None:
        input_["authorizer_configuration"] = authorizer_configuration
    if request_header_configuration is not None:
        input_["request_header_configuration"] = request_header_configuration
    if protocol_configuration is not None:
        input_["protocol_configuration"] = protocol_configuration
    if lifecycle_configuration is not None:
        input_["lifecycle_configuration"] = lifecycle_configuration
    if metadata_configuration is not None:
        input_["metadata_configuration"] = metadata_configuration
    if environment_variables is not None:
        input_["environment_variables"] = environment_variables
    if filesystem_configurations is not None:
        input_["filesystem_configurations"] = filesystem_configurations
    if capacity_provider_configuration is not None:
        input_["capacity_provider_configuration"] = capacity_provider_configuration
    if platform_version is not None:
        input_["platform_version"] = platform_version
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output