Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples for project, provider, schema #445

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions proto/spaceone/api/identity/v2/project.proto
Original file line number Diff line number Diff line change
Expand Up @@ -213,30 +213,31 @@ message ProjectSearchQuery {
// "results": [
// {
// "created_at": "2024-11-13T07:01:56.295Z",
// "created_by": "[email protected]",
// "domain_id": "domain-d11d0ccbbea8",
// "name": "hanhyung-project1",
// "project_group_id": "pg-0a33ab207144",
// "project_id": "project-5c84552701b1",
// "project_type": "PRIVATE",
// "users": [
// "[email protected]"
// ],
// "workspace_id": "workspace-a13327969661"
// },
// {
// "created_at": "2024-11-13T06:35:11.877Z",
// "created_by": "[email protected]",
// "domain_id": "domain-d11d0ccbbea8",
// "name": "hanhyung-project2",
// "project_group_id": "pg-0a33ab207144",
// "project_id": "project-cc4e2ebecc4e",
// "project_type": "PRIVATE",
// "users": [
// "[email protected]"
// ],
// "workspace_id": "workspace-a13327969661"
// }
// "created_by": "[email protected]",
// "domain_id": "domain-a1b2c3d4e5f6",
// "name": "Wonny Project",
// "project_group_id": "pg-a1b2c3d4e5f6",
// "project_id": "project-a1b2c3d4e5f6",
// "project_type": "PRIVATE",
// "users": [
// "[email protected]"
// ],
// "workspace_id": "workspace-a1b2c3d4e5f6"
// },
// {
// "created_at": "2024-11-13T06:35:11.877Z",
// "created_by": "[email protected]",
// "domain_id": "domain-a1b2c3d4e5f6",
// "name": "Cloudforet Project",
// "project_group_id": "pg-a1b2c3d4e5f6",
// "project_id": "project-g7h8i9j1k2l3",
// "project_type": "PRIVATE",
// "users": [
// "[email protected]",
// "[email protected]"
// ],
// "workspace_id": "workspace-a1b2c3d4e5f6"
// }
// ],
// "total_count": 2
//}
Expand Down
60 changes: 59 additions & 1 deletion proto/spaceone/api/identity/v2/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ message CreateProviderRequest {
// "order": 2,
// "options": {
// "supported_trusted_account": false
// },
// }
//}
message UpdateProviderRequest {
string provider = 1;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
147 changes: 147 additions & 0 deletions proto/spaceone/api/identity/v2/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Loading