Skip to content

update_agent_space async

update_agent_space(
    agent_space_id: AgentSpaceId,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    name: Optional[AgentName] = None,
    description: Optional[str] = None,
    aws_resources: Optional[AWSResources] = None,
    target_domain_ids: Optional[TargetDomainIdList] = None,
    code_review_settings: Optional[CodeReviewSettings] = None,
) -> UpdateAgentSpaceOutput

Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the agent space to update.

  • name (Optional[AgentName], default: None ) –

    The updated name of the agent space.

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

    The updated description of the agent space.

  • aws_resources (Optional[AWSResources], default: None ) –

    The updated AWS resources to associate with the agent space.

  • target_domain_ids (Optional[TargetDomainIdList], default: None ) –

    The updated list of target domain identifiers to associate with the agent space.

  • code_review_settings (Optional[CodeReviewSettings], default: None ) –

    The updated code review settings for the agent space.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def update_agent_space(
    self,
    agent_space_id: "capo_securityagent.types.agent_space_id.AgentSpaceId",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    name: Optional["capo_securityagent.types.agent_name.AgentName"] = None,
    description: Optional[str] = None,
    aws_resources: Optional[
        "capo_securityagent.types.aws_resources.AWSResources"
    ] = None,
    target_domain_ids: Optional[
        "capo_securityagent.types.target_domain_id_list.TargetDomainIdList"
    ] = None,
    code_review_settings: Optional[
        "capo_securityagent.types.code_review_settings.CodeReviewSettings"
    ] = None,
) -> "capo_securityagent.types.update_agent_space_output.UpdateAgentSpaceOutput":
    """<p>Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.</p>

    Args:
        agent_space_id: <p>The unique identifier of the agent space to update.</p>
        name: <p>The updated name of the agent space.</p>
        description: <p>The updated description of the agent space.</p>
        aws_resources: <p>The updated AWS resources to associate with the agent space.</p>
        target_domain_ids: <p>The updated list of target domain identifiers to associate with the agent space.</p>
        code_review_settings: <p>The updated code review settings for the agent space.</p>

    Raises:
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityagent.types.update_agent_space_input.UpdateAgentSpaceInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.update_agent_space_output.UpdateAgentSpaceOutput"
    ]:
        import capo_securityagent._operations.security_agent.update_agent_space

        (
            output,
            http_response,
        ) = await capo_securityagent._operations.security_agent.update_agent_space.async_update_agent_space(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAgentSpace")
    )
    input_: capo_securityagent.types.update_agent_space_input.UpdateAgentSpaceInput = {
        "agent_space_id": agent_space_id
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if aws_resources is not None:
        input_["aws_resources"] = aws_resources
    if target_domain_ids is not None:
        input_["target_domain_ids"] = target_domain_ids
    if code_review_settings is not None:
        input_["code_review_settings"] = code_review_settings

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