From 0b852566d8a27c26e000dada392c2684d252e721 Mon Sep 17 00:00:00 2001 From: nithyatsu Date: Thu, 27 Jun 2024 14:27:14 -0700 Subject: [PATCH] update examples --- ... => credentialresource-aws-accesskey.json} | 0 .../testdata/credentialresource-aws-irsa.json | 16 ++++++ ...SCredential_AccessKey_CreateOrUpdate.json} | 0 ...on => AWSCredential_AccessKey_Delete.json} | 0 ....json => AWSCredential_AccessKey_Get.json} | 0 ...json => AWSCredential_AccessKey_List.json} | 0 ...on => AWSCredential_AccessKey_Update.json} | 0 .../AWSCredential_IRSA_CreateOrUpdate.json | 54 +++++++++++++++++++ .../AWSCredential_IRSA_Delete.json | 14 +++++ .../AWSCredential_IRSA_Get.json | 28 ++++++++++ .../AWSCredential_IRSA_List.json | 31 +++++++++++ .../AWSCredential_IRSA_Update.json | 54 +++++++++++++++++++ 12 files changed, 197 insertions(+) rename pkg/ucp/api/v20231001preview/testdata/{credentialresource-aws.json => credentialresource-aws-accesskey.json} (100%) create mode 100644 pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-irsa.json rename typespec/UCP/examples/2023-10-01-preview/{AWSCredential_CreateOrUpdate.json => AWSCredential_AccessKey_CreateOrUpdate.json} (100%) rename typespec/UCP/examples/2023-10-01-preview/{AWSCredential_Delete.json => AWSCredential_AccessKey_Delete.json} (100%) rename typespec/UCP/examples/2023-10-01-preview/{AWSCredential_Get.json => AWSCredential_AccessKey_Get.json} (100%) rename typespec/UCP/examples/2023-10-01-preview/{AWSCredential_List.json => AWSCredential_AccessKey_List.json} (100%) rename typespec/UCP/examples/2023-10-01-preview/{AWSCredential_Update.json => AWSCredential_AccessKey_Update.json} (100%) create mode 100644 typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_CreateOrUpdate.json create mode 100644 typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Delete.json create mode 100644 typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Get.json create mode 100644 typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_List.json create mode 100644 typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Update.json diff --git a/pkg/ucp/api/v20231001preview/testdata/credentialresource-aws.json b/pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-accesskey.json similarity index 100% rename from pkg/ucp/api/v20231001preview/testdata/credentialresource-aws.json rename to pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-accesskey.json diff --git a/pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-irsa.json b/pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-irsa.json new file mode 100644 index 0000000000..b514808879 --- /dev/null +++ b/pkg/ucp/api/v20231001preview/testdata/credentialresource-aws-irsa.json @@ -0,0 +1,16 @@ +{ + "id": "/planes/aws/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "west-us-2", + "tags": { + "env": "dev" + }, + "properties": { + "roleARN": "arn:aws:iam::000000000000:role/role-name", + "kind": "AccessKey", + "storage": { + "kind": "Internal" + } + } +} \ No newline at end of file diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_CreateOrUpdate.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_CreateOrUpdate.json similarity index 100% rename from typespec/UCP/examples/2023-10-01-preview/AWSCredential_CreateOrUpdate.json rename to typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_CreateOrUpdate.json diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_Delete.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Delete.json similarity index 100% rename from typespec/UCP/examples/2023-10-01-preview/AWSCredential_Delete.json rename to typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Delete.json diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_Get.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Get.json similarity index 100% rename from typespec/UCP/examples/2023-10-01-preview/AWSCredential_Get.json rename to typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Get.json diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_List.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_List.json similarity index 100% rename from typespec/UCP/examples/2023-10-01-preview/AWSCredential_List.json rename to typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_List.json diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_Update.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Update.json similarity index 100% rename from typespec/UCP/examples/2023-10-01-preview/AWSCredential_Update.json rename to typespec/UCP/examples/2023-10-01-preview/AWSCredential_AccessKey_Update.json diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_CreateOrUpdate.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_CreateOrUpdate.json new file mode 100644 index 0000000000..ff89530b74 --- /dev/null +++ b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_CreateOrUpdate.json @@ -0,0 +1,54 @@ +{ + "operationId": "AwsCredentials_CreateOrUpdate", + "title": "Create or update an AWS credential", + "parameters": { + "api-version": "2023-10-01-preview", + "planeType": "aws", + "planeName": "aws", + "credentialName": "default", + "Credential": { + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleARN": "enterRoleARN", + "storage": { + "kind": "Internal" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleARN": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + }, + "201": { + "body": { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleARN": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + } + } +} \ No newline at end of file diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Delete.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Delete.json new file mode 100644 index 0000000000..129dbbc139 --- /dev/null +++ b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Delete.json @@ -0,0 +1,14 @@ +{ + "operationId": "AwsCredentials_Delete", + "title": "Delete an AWS credential", + "parameters": { + "api-version": "2023-10-01-preview", + "planeType": "aws", + "planeName": "awscloud", + "credentialName": "default" + }, + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Get.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Get.json new file mode 100644 index 0000000000..7170fd911e --- /dev/null +++ b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Get.json @@ -0,0 +1,28 @@ +{ + "operationId": "AwsCredentials_Get", + "title": "Get an AWS credential", + "parameters": { + "api-version": "2023-10-01-preview", + "planeType": "aws", + "planeName": "awscloud", + "credentialName": "default" + }, + "responses": { + "200": { + "body": { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleArn": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + } + } +} \ No newline at end of file diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_List.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_List.json new file mode 100644 index 0000000000..2d5c21c01b --- /dev/null +++ b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_List.json @@ -0,0 +1,31 @@ +{ + "operationId": "AwsCredentials_List", + "title": "List AWS credentials", + "parameters": { + "api-version": "2023-10-01-preview", + "planeType": "aws", + "planeName": "awscloud" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleArn": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Update.json b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Update.json new file mode 100644 index 0000000000..e48e9d7d76 --- /dev/null +++ b/typespec/UCP/examples/2023-10-01-preview/AWSCredential_IRSA_Update.json @@ -0,0 +1,54 @@ +{ + "operationId": "AwsCredentials_Update", + "title": "Update an AWS credential", + "parameters": { + "api-version": "2023-10-01-preview", + "planeType": "aws", + "planeName": "aws", + "credentialName": "default", + "Credential": { + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleArn": "enterRoleARN", + "storage": { + "kind": "Internal" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "IRSA", + "roleArn": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + }, + "201": { + "body": { + "id": "/planes/AWS/aws/providers/System.AWS/credentials/default", + "name": "default", + "type": "System.AWS/credentials", + "location": "us-west-2", + "properties": { + "kind": "AccessKey", + "roleArn": "enterRoleARN", + "storage": { + "kind": "Internal", + "secretName": "aws-awscloud-default" + } + } + } + } + } +} \ No newline at end of file