Skip to main content

environments

Creates, updates, deletes, gets or lists an environments resource.

Overview​

Nameenvironments
TypeResource
Idconfluent.org.environments

Fields​

The following fields are returned by SELECT queries:

Environment.

NameDatatypeDescription
idstringID is the "natural identifier" for an object within its scope/namespace; it is normally unique across time but not space. That is, you can assume that the ID will not be reclaimed and reused after an object is deleted ("time"); however, it may collide with IDs for other object kinds or objects of the same kind within a different scope/namespace ("space"). (example: dlz-f3a90de)
display_namestringA human-readable name for the Environment (example: prod-finance01)
api_versionstringAPIVersion defines the schema version of this representation of a resource. (org/v2)
kindstringKind defines the object this REST resource represents. (Environment)
metadataobjectObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
stream_governance_configobjectStream Governance configurations for the environment

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_org_v2_environmentselectidMake a request to read an environment.
list_org_v2_environmentsselectpage_size, page_tokenRetrieve a sorted, filtered, paginated list of all environments.
create_org_v2_environmentinsertdisplay_nameMake a request to create an environment.
update_org_v2_environmentupdateidMake a request to update an environment.

delete_org_v2_environmentdeleteidMake a request to delete an environment.

If successful, this request will also recursively delete all of the environment's associated resources,
including all Kafka clusters, connectors, etc.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idstringThe unique identifier for the environment.
page_sizeintegerA pagination size for collection requests.
page_tokenstringAn opaque pagination token for collection requests.

SELECT examples​

Make a request to read an environment.

SELECT
id,
display_name,
api_version,
kind,
metadata,
stream_governance_config
FROM confluent.org.environments
WHERE id = '{{ id }}' -- required
;

INSERT examples​

Make a request to create an environment.

INSERT INTO confluent.org.environments (
display_name,
stream_governance_config
)
SELECT
'{{ display_name }}' /* required */,
'{{ stream_governance_config }}'
RETURNING
id,
display_name,
api_version,
kind,
metadata,
stream_governance_config
;

UPDATE examples​

Make a request to update an environment.

UPDATE confluent.org.environments
SET
display_name = '{{ display_name }}',
stream_governance_config = '{{ stream_governance_config }}'
WHERE
id = '{{ id }}' --required
RETURNING
id,
display_name,
api_version,
kind,
metadata,
stream_governance_config;

DELETE examples​

Make a request to delete an environment.

If successful, this request will also recursively delete all of the environment's associated resources,
including all Kafka clusters, connectors, etc.

DELETE FROM confluent.org.environments
WHERE id = '{{ id }}' --required
;