From 4631e8d946d1ef7a183c60105a5a744eeb3f48f8 Mon Sep 17 00:00:00 2001 From: lhhyung Date: Mon, 18 Nov 2024 11:43:57 +0900 Subject: [PATCH] docs: Add examples for project, provider, schema --- proto/spaceone/api/identity/v2/project.proto | 49 +++--- proto/spaceone/api/identity/v2/provider.proto | 60 ++++++- proto/spaceone/api/identity/v2/schema.proto | 147 ++++++++++++++++++ 3 files changed, 231 insertions(+), 25 deletions(-) diff --git a/proto/spaceone/api/identity/v2/project.proto b/proto/spaceone/api/identity/v2/project.proto index 85b554241..94009dbc2 100644 --- a/proto/spaceone/api/identity/v2/project.proto +++ b/proto/spaceone/api/identity/v2/project.proto @@ -213,30 +213,31 @@ message ProjectSearchQuery { // "results": [ // { // "created_at": "2024-11-13T07:01:56.295Z", -// "created_by": "lhhyung511@mz.co.kr", -// "domain_id": "domain-d11d0ccbbea8", -// "name": "hanhyung-project1", -// "project_group_id": "pg-0a33ab207144", -// "project_id": "project-5c84552701b1", -// "project_type": "PRIVATE", -// "users": [ -// "lhhyung511@mz.co.kr" -// ], -// "workspace_id": "workspace-a13327969661" -// }, -// { -// "created_at": "2024-11-13T06:35:11.877Z", -// "created_by": "lhhyung511@mz.co.kr", -// "domain_id": "domain-d11d0ccbbea8", -// "name": "hanhyung-project2", -// "project_group_id": "pg-0a33ab207144", -// "project_id": "project-cc4e2ebecc4e", -// "project_type": "PRIVATE", -// "users": [ -// "lhhyung511@mz.co.kr" -// ], -// "workspace_id": "workspace-a13327969661" -// } +// "created_by": "wonny@cloudforet.io", +// "domain_id": "domain-a1b2c3d4e5f6", +// "name": "Wonny Project", +// "project_group_id": "pg-a1b2c3d4e5f6", +// "project_id": "project-a1b2c3d4e5f6", +// "project_type": "PRIVATE", +// "users": [ +// "wonny@cloudforet.io" +// ], +// "workspace_id": "workspace-a1b2c3d4e5f6" +// }, +// { +// "created_at": "2024-11-13T06:35:11.877Z", +// "created_by": "cloudforet@cloudforet.io", +// "domain_id": "domain-a1b2c3d4e5f6", +// "name": "Cloudforet Project", +// "project_group_id": "pg-a1b2c3d4e5f6", +// "project_id": "project-g7h8i9j1k2l3", +// "project_type": "PRIVATE", +// "users": [ +// "cloudforet@cloudforet.io", +// "wonny@cloudforet.io" +// ], +// "workspace_id": "workspace-a1b2c3d4e5f6" +// } // ], // "total_count": 2 //} diff --git a/proto/spaceone/api/identity/v2/provider.proto b/proto/spaceone/api/identity/v2/provider.proto index 8f05d90b1..b5613c4f7 100644 --- a/proto/spaceone/api/identity/v2/provider.proto +++ b/proto/spaceone/api/identity/v2/provider.proto @@ -110,7 +110,7 @@ message CreateProviderRequest { // "order": 2, // "options": { // "supported_trusted_account": false -// }, +// } //} message UpdateProviderRequest { string provider = 1; @@ -163,6 +163,19 @@ message ProviderRequest { string provider = 1; } +//{ +// "alias": "AWS", +// "created_at": "2024-11-15T04:47:42.393Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "icon": "https://cloudforet.io/icons/aws.svg", +// "name": "AWS", +// "options": { +// "supported_trusted_account": false +// }, +// "order": 1, +// "provider": "aws", +// "updated_at": "2024-11-15T04:47:42.393Z" +//} message ProviderInfo { string provider = 1; string name = 2; @@ -179,6 +192,20 @@ message ProviderInfo { string updated_at = 32; } +//{ +// "query": { +// "page": { +// "start": 1, +// "limit": 10 +// }, +// "sort": [ +// { +// "key": "created_at", +// "desc": true +// } +// ] +// } +//} message ProviderSearchQuery { // +optional spaceone.api.core.v2.Query query = 1; @@ -192,6 +219,37 @@ message ProviderSearchQuery { bool is_managed = 5; } +//{ +// "results": [ +// { +// "alias": "Azure", +// "created_at": "2024-11-15T04:47:42.393Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "icon": "https://cloudforet.io/icons/azure.svg", +// "name": "Azure", +// "options": { +// "supported_trusted_account": false +// }, +// "order": 1, +// "provider": "azure", +// "updated_at": "2024-11-15T04:47:42.393Z" +// }, +// { +// "alias": "AWS", +// "created_at": "2024-11-15T04:47:42.393Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "icon": "https://cloudforet.io/icons/aws.svg", +// "name": "AWS", +// "options": { +// "supported_trusted_account": false +// }, +// "order": 1, +// "provider": "aws", +// "updated_at": "2024-11-15T04:47:42.393Z" +// } +// ], +// "total_count": 2 +//} message ProvidersInfo { repeated ProviderInfo results = 1; int32 total_count = 2; diff --git a/proto/spaceone/api/identity/v2/schema.proto b/proto/spaceone/api/identity/v2/schema.proto index afd534799..55dbf5a41 100644 --- a/proto/spaceone/api/identity/v2/schema.proto +++ b/proto/spaceone/api/identity/v2/schema.proto @@ -56,6 +56,12 @@ enum SchemaType { TRUSTING_SECRET = 4; } +//{ +// "schema_id": "aws-secret-access-key", +// "name": "AWS Access Key", +// "schema_type": "SECRET", +// "provider": "aws" +//} message CreateSchemaRequest { string schema_id = 1; string name = 2; @@ -71,6 +77,34 @@ message CreateSchemaRequest { google.protobuf.Struct tags = 8; } +//{ +// "schema_id": "aws-secret-access-key1", +// "schema": { +// "order": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "properties": { +// "aws_access_key_id": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Access Key", +// "type": "string" +// }, +// "aws_secret_access_key": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Secret Key", +// "type": "string" +// } +// }, +// "required": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "type": "object" +// } +//} message UpdateSchemaRequest { string schema_id = 1; // +optional @@ -85,10 +119,47 @@ message UpdateSchemaRequest { google.protobuf.Struct tags = 6; } +//{ +// "schema_id": "aws-secret-access-key" +//} message SchemaRequest { string schema_id = 1; } +//{ +// "created_at": "2024-11-18T01:59:00.407Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "name": "AWS Access Key", +// "provider": "aws", +// "schema": { +// "order": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "properties": { +// "aws_access_key_id": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Access Key", +// "type": "string" +// }, +// "aws_secret_access_key": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Secret Key", +// "type": "string" +// } +// }, +// "required": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "type": "object" +// }, +// "schema_id": "aws-secret-access-key", +// "schema_type": "SECRET", +// "updated_at": "2024-11-18T02:00:45.792Z" +//} message SchemaInfo { string schema_id = 1; string name = 2; @@ -104,6 +175,21 @@ message SchemaInfo { string updated_at = 32; } +//{ +// "provider": "aws", +// "query": { +// "page": { +// "start": 1, +// "limit": 10 +// }, +// "sort": [ +// { +// "key": "created_at", +// "desc": true +// } +// ] +// } +//} message SchemaSearchQuery { // +optional spaceone.api.core.v2.Query query = 1; @@ -121,6 +207,67 @@ message SchemaSearchQuery { bool is_managed = 7; } +//{ +// "results": [ +// { +// "created_at": "2024-11-18T02:08:10.216Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "name": "AWS Trusted Account", +// "provider": "aws", +// "schema": { +// "properties": { +// "account_id": { +// "minLength": 4.0, +// "title": "Account ID", +// "type": "string" +// } +// }, +// "required": [ +// "account_id" +// ], +// "type": "object" +// }, +// "schema_id": "aws-trusted-account", +// "schema_type": "TRUSTED_ACCOUNT", +// "updated_at": "2024-11-18T02:08:10.216Z" +// }, +// { +// "created_at": "2024-11-18T01:59:00.407Z", +// "domain_id": "domain-a1b2c3d4e5f6", +// "name": "AWS Access Key", +// "provider": "aws", +// "schema": { +// "order": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "properties": { +// "aws_access_key_id": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Access Key", +// "type": "string" +// }, +// "aws_secret_access_key": { +// "format": "password", +// "minLength": 4.0, +// "title": "AWS Secret Key", +// "type": "string" +// } +// }, +// "required": [ +// "aws_access_key_id", +// "aws_secret_access_key" +// ], +// "type": "object" +// }, +// "schema_id": "aws-secret-access-key", +// "schema_type": "SECRET", +// "updated_at": "2024-11-18T02:00:45.792Z" +// } +// ], +// "total_count": 2 +//} message SchemasInfo { repeated SchemaInfo results = 1; int32 total_count = 2;