Audit Targets Resource#
This page documents the Auditor targets resource class from the nemo_microservices
package.
- class nemo_microservices.resources.beta.audit.targets.TargetsResource(client: NeMoMicroservices)#
Bases:
SyncAPIResource
- property with_raw_response: TargetsResourceWithRawResponse#
This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers
- property with_streaming_response: TargetsResourceWithStreamingResponse#
An alternative to .with_raw_response that doesn’t eagerly read the response body.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response
- create(
- *,
- model: str,
- type: str,
- id: str | NotGiven = NOT_GIVEN,
- created_at: str | datetime | NotGiven = NOT_GIVEN,
- custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- entity_id: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- namespace: str | NotGiven = NOT_GIVEN,
- options: object | NotGiven = NOT_GIVEN,
- ownership: Ownership | NotGiven = NOT_GIVEN,
- project: str | NotGiven = NOT_GIVEN,
- schema_version: str | NotGiven = NOT_GIVEN,
- type_prefix: str | NotGiven = NOT_GIVEN,
- updated_at: str | datetime | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Post Target
- Parameters:
id – The ID of the entity.
- With the exception of namespaces, this is always a
semantically-prefixed base58-encoded uuid4 [<prefix>-base58(uuid4())].
created_at: Timestamp for when the entity was created.
custom_fields: A set of custom fields that the user can define and use for various purposes.
description: The description of the entity.
entity_id: The entity id. If first version, it will match version id
- name: The name of the entity. Must be unique inside the namespace. If not specified,
it will be the same as the automatically generated id.
- namespace: The namespace of the entity. This can be missing for namespace entities or in
deployments that don’t use namespaces.
ownership: Information about ownership of an entity.
If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.
project: The URN of the project associated with this entity.
schema_version: The version of the schema for the object. Internal use only.
- type_prefix: The type prefix of the entity ID. If not specified, it will be inferred from the
entity type name, but this will likely result in long prefixes.
updated_at: Timestamp for when the entity was last updated.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
- retrieve(
- target_name: str,
- *,
- namespace: str,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get Target
- Parameters:
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- update(
- target_name: str,
- *,
- namespace: str,
- custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- model: str | NotGiven = NOT_GIVEN,
- options: object | NotGiven = NOT_GIVEN,
- ownership: Ownership | NotGiven = NOT_GIVEN,
- project: str | NotGiven = NOT_GIVEN,
- schema_version: str | NotGiven = NOT_GIVEN,
- type: str | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Update Target
- Parameters:
custom_fields – A set of custom fields that the user can define and use for various purposes.
description – The description of the entity.
ownership –
Information about ownership of an entity.
If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.
project – The URN of the project associated with this entity.
schema_version – The version of the schema for the object. Internal use only.
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- list(
- *,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get Targets
- delete(
- target_name: str,
- *,
- namespace: str,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Delete Target
- Parameters:
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- list_versions(
- target_name: str,
- *,
- namespace: str,
- filter: target_list_versions_params.Filter | NotGiven = NOT_GIVEN,
- page: int | NotGiven = NOT_GIVEN,
- page_size: int | NotGiven = NOT_GIVEN,
- sort: Literal['created_at', '-created_at'] | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get all historical versions of a target
- Parameters:
filter – Filter versions on various criteria.
page – Page number.
page_size – Page size.
sort – The field to sort by. To sort in descending order, use - in front of the field name.
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- create_from_dict(data: dict[str, object]) object #
- class nemo_microservices.resources.beta.audit.targets.AsyncTargetsResource(client: AsyncNeMoMicroservices)#
Bases:
AsyncAPIResource
- property with_raw_response: AsyncTargetsResourceWithRawResponse#
This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#accessing-raw-response-data-e-g-headers
- property with_streaming_response: AsyncTargetsResourceWithStreamingResponse#
An alternative to .with_raw_response that doesn’t eagerly read the response body.
For more information, see https://docs.nvidia.com/nemo/microservices/latest/pysdk/index.html#with_streaming_response
- async create(
- *,
- model: str,
- type: str,
- id: str | NotGiven = NOT_GIVEN,
- created_at: str | datetime | NotGiven = NOT_GIVEN,
- custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- entity_id: str | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
- namespace: str | NotGiven = NOT_GIVEN,
- options: object | NotGiven = NOT_GIVEN,
- ownership: Ownership | NotGiven = NOT_GIVEN,
- project: str | NotGiven = NOT_GIVEN,
- schema_version: str | NotGiven = NOT_GIVEN,
- type_prefix: str | NotGiven = NOT_GIVEN,
- updated_at: str | datetime | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Post Target
- Parameters:
id – The ID of the entity.
- With the exception of namespaces, this is always a
semantically-prefixed base58-encoded uuid4 [<prefix>-base58(uuid4())].
created_at: Timestamp for when the entity was created.
custom_fields: A set of custom fields that the user can define and use for various purposes.
description: The description of the entity.
entity_id: The entity id. If first version, it will match version id
- name: The name of the entity. Must be unique inside the namespace. If not specified,
it will be the same as the automatically generated id.
- namespace: The namespace of the entity. This can be missing for namespace entities or in
deployments that don’t use namespaces.
ownership: Information about ownership of an entity.
If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.
project: The URN of the project associated with this entity.
schema_version: The version of the schema for the object. Internal use only.
- type_prefix: The type prefix of the entity ID. If not specified, it will be inferred from the
entity type name, but this will likely result in long prefixes.
updated_at: Timestamp for when the entity was last updated.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
extra_body: Add additional JSON properties to the request
timeout: Override the client-level default timeout for this request, in seconds
- async retrieve(
- target_name: str,
- *,
- namespace: str,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get Target
- Parameters:
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- async update(
- target_name: str,
- *,
- namespace: str,
- custom_fields: Dict[str, str] | NotGiven = NOT_GIVEN,
- description: str | NotGiven = NOT_GIVEN,
- model: str | NotGiven = NOT_GIVEN,
- options: object | NotGiven = NOT_GIVEN,
- ownership: Ownership | NotGiven = NOT_GIVEN,
- project: str | NotGiven = NOT_GIVEN,
- schema_version: str | NotGiven = NOT_GIVEN,
- type: str | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Update Target
- Parameters:
custom_fields – A set of custom fields that the user can define and use for various purposes.
description – The description of the entity.
ownership –
Information about ownership of an entity.
If the entity is a namespace, the access_policies will typically apply to all entities inside the namespace.
project – The URN of the project associated with this entity.
schema_version – The version of the schema for the object. Internal use only.
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- async list(
- *,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get Targets
- async delete(
- target_name: str,
- *,
- namespace: str,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Delete Target
- Parameters:
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- list_versions(
- target_name: str,
- *,
- namespace: str,
- filter: target_list_versions_params.Filter | NotGiven = NOT_GIVEN,
- page: int | NotGiven = NOT_GIVEN,
- page_size: int | NotGiven = NOT_GIVEN,
- sort: Literal['created_at', '-created_at'] | NotGiven = NOT_GIVEN,
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
Get all historical versions of a target
- Parameters:
filter – Filter versions on various criteria.
page – Page number.
page_size – Page size.
sort – The field to sort by. To sort in descending order, use - in front of the field name.
extra_headers – Send extra headers
extra_query – Add additional query parameters to the request
extra_body – Add additional JSON properties to the request
timeout – Override the client-level default timeout for this request, in seconds
- create_from_dict(
- data: dict[str, object],