Organization - Create API Key
Creates API key for a schema registry Cluster ID or Kafka Cluster ID under a environment
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations/{organizationName}/environments/{environmentId}/clusters/{clusterId}/createAPIKey?api-version=2024-07-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
cluster
|
path | True |
string |
Confluent kafka or schema registry cluster id |
environment
|
path | True |
string |
Confluent environment id |
organization
|
path | True |
string |
Organization resource name |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
description |
string |
Description of the API Key |
name |
string |
Name of the API Key |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Azure operation completed successfully. |
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Organization_CreateClusterAPIKey
Sample request
POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Confluent/organizations/myOrganization/environments/env-12132/clusters/clusterId-123/createAPIKey?api-version=2024-07-01
{
"name": "CI kafka access key",
"description": "This API key provides kafka access to cluster x"
}
Sample response
{
"id": "JDCXTFUVFVQGF56J",
"kind": "ApiKey",
"properties": {
"metadata": {
"createdTimestamp": "2023-11-15T16:15:44.489498Z",
"resourceName": "crn://api.stag.cpdev.cloud/organization=37d1220b-93a6-43e3-a114-dd8a20a94a31/service-account=sa-wwn7mm/api-key=JDCXTFUVFVQGF56J",
"self": "https://api.stag.cpdev.cloud/iam/v2/api-keys/JDCXTFUVFVQGF56J",
"updatedTimestamp": "2023-11-15T16:15:44.489498Z"
},
"spec": {
"name": "CI kafka access key",
"description": "This API key provides kafka access to cluster x",
"owner": {
"id": "sa-wwn7mm",
"kind": "ServiceAccount",
"related": "https://api.stag.cpdev.cloud/iam/v2/service-accounts/sa-wwn7mm",
"resourceName": "crn://api.stag.cpdev.cloud/organization=37d1220b-93a6-43e3-a114-dd8a20a94a31/service-account=sa-wwn7mm"
},
"resource": {
"id": "lsrc-stgc1yrzz3",
"kind": "SchemaRegistry",
"related": "https://api.stag.cpdev.cloud/srcm/v2/schema-registries/lsrc-stgc1yrzz3",
"resourceName": "crn://api.stag.cpdev.cloud/organization=37d1220b-93a6-43e3-a114-dd8a20a94a31/schema-registry=lsrc-stgc1yrzz3"
},
"secret": ""
}
}
}
Definitions
Name | Description |
---|---|
APIKey |
API Key Owner details which can be a user or service account |
APIKey |
Details API key |
APIKey |
API Key Resource details which can be kafka cluster or schema registry cluster |
APIKey |
Spec of the API Key record |
Create |
Create API Key model |
Error |
Response body of Error |
Resource |
Default error response for resource provider |
SCMetadata |
Metadata of the data record |
APIKeyOwnerEntity
API Key Owner details which can be a user or service account
Name | Type | Description |
---|---|---|
id |
string |
API Key owner id |
kind |
string |
Type of the owner service or user account |
related |
string |
API URL for accessing or modifying the referred object |
resourceName |
string |
CRN reference to the referred resource |
APIKeyRecord
Details API key
Name | Type | Description |
---|---|---|
id |
string |
Id of the api key |
kind |
string |
Type of api key |
properties.metadata |
Metadata of the record |
|
properties.spec |
Specification of the API Key |
APIKeyResourceEntity
API Key Resource details which can be kafka cluster or schema registry cluster
Name | Type | Description |
---|---|---|
environment |
string |
The environment of the api key |
id |
string |
Id of the resource |
kind |
string |
Type of the owner which can be service or user account |
related |
string |
API URL for accessing or modifying the api key resource object |
resourceName |
string |
CRN reference to the referred resource |
APIKeySpecEntity
Spec of the API Key record
Name | Type | Description |
---|---|---|
description |
string |
The description of the API Key |
name |
string |
The name of the API Key |
owner |
Specification of the cluster |
|
resource |
Specification of the cluster |
|
secret |
string (password) |
API Key Secret |
CreateAPIKeyModel
Create API Key model
Name | Type | Description |
---|---|---|
description |
string |
Description of the API Key |
name |
string |
Name of the API Key |
ErrorResponseBody
Response body of Error
Name | Type | Description |
---|---|---|
code |
string |
Error code |
details |
Error detail |
|
message |
string |
Error message |
target |
string |
Error target |
ResourceProviderDefaultErrorResponse
Default error response for resource provider
Name | Type | Description |
---|---|---|
error |
Response body of Error |
SCMetadataEntity
Metadata of the data record
Name | Type | Description |
---|---|---|
createdTimestamp |
string |
Created Date Time |
deletedTimestamp |
string |
Deleted Date time |
resourceName |
string |
Resource name of the record |
self |
string |
Self lookup url |
updatedTimestamp |
string |
Updated Date time |