Skip to content

batch_get_artifact_metadata async

batch_get_artifact_metadata(
    agent_space_id: AgentSpaceId,
    artifact_ids: ArtifactIds,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> BatchGetArtifactMetadataOutput

Retrieves metadata for one or more artifacts in an agent space.

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the agent space that contains the artifacts.

  • artifact_ids (ArtifactIds) –

    The list of artifact identifiers to retrieve metadata for.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def batch_get_artifact_metadata(
    self,
    agent_space_id: "capo_securityagent.types.agent_space_id.AgentSpaceId",
    artifact_ids: "capo_securityagent.types.artifact_ids.ArtifactIds",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
) -> "capo_securityagent.types.batch_get_artifact_metadata_output.BatchGetArtifactMetadataOutput":
    """<p>Retrieves metadata for one or more artifacts in an agent space.</p>

    Args:
        agent_space_id: <p>The unique identifier of the agent space that contains the artifacts.</p>
        artifact_ids: <p>The list of artifact identifiers to retrieve metadata for.</p>

    Raises:
        capo_securityagent.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_securityagent.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of your request.</p>
        capo_securityagent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource identifier is correct and that the resource exists in the specified agent space or account.</p>
        capo_securityagent.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_securityagent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityagent.types.batch_get_artifact_metadata_input.BatchGetArtifactMetadataInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.batch_get_artifact_metadata_output.BatchGetArtifactMetadataOutput"
    ]:
        import capo_securityagent._operations.security_agent.batch_get_artifact_metadata

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetArtifactMetadata")
    )
    input_: capo_securityagent.types.batch_get_artifact_metadata_input.BatchGetArtifactMetadataInput = {
        "agent_space_id": agent_space_id,
        "artifact_ids": artifact_ids,
    }

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