Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
Signed-off-by: nithyatsu <[email protected]>

wip

Signed-off-by: nithyatsu <[email protected]>

update description

Signed-off-by: nithyatsu <[email protected]>

nit

Signed-off-by: nithyatsu <[email protected]>

wip

Signed-off-by: nithyatsu <[email protected]>
  • Loading branch information
nithyatsu committed Jul 3, 2024
1 parent b22efbb commit 259d384
Show file tree
Hide file tree
Showing 24 changed files with 578 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pkg/ucp/api/v20231001preview/zz_generated_constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/ucp/api/v20231001preview/zz_generated_models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AwsCredentials_CreateOrUpdate",
"title": "Create or update an AWS credential",
"title": "Create or update an AWS AccessKey credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"operationId": "AwsCredentials_Delete",
"title": "Delete an AWS AccessKey credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
"planeName": "awscloud",
"credentialName": "default"
},
"responses": {
"200": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AwsCredentials_Get",
"title": "Get an AWS credential",
"title": "Get an AWS AccessKey credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AwsCredentials_List",
"title": "List AWS credentials",
"title": "List AWS AccessKey credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AwsCredentials_Update",
"title": "Update an AWS credential",
"title": "Update an AWS AccessKey credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"operationId": "AwsCredentials_CreateOrUpdate",
"title": "Create or update an AWS IRSA 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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"operationId": "AwsCredentials_Delete",
"title": "Delete an AWS credential",
"title": "Delete an AWS IRSA credential",
"parameters": {
"api-version": "2023-10-01-preview",
"planeType": "aws",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"operationId": "AwsCredentials_Get",
"title": "Get an AWS IRSA 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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"operationId": "AwsCredentials_List",
"title": "List AWS IRSA 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"
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"operationId": "AwsCredentials_Update",
"title": "Update an AWS IRSA 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"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,11 @@
}
},
"x-ms-examples": {
"List AWS credentials": {
"$ref": "./examples/AWSCredential_List.json"
"List AWS AccessKey credential": {
"$ref": "./examples/AWSCredential_AccessKey_List.json"
},
"List AWS IRSA credentials": {
"$ref": "./examples/AWSCredential_IRSA_List.json"
}
},
"x-ms-pageable": {
Expand Down Expand Up @@ -423,8 +426,11 @@
}
},
"x-ms-examples": {
"Get an AWS credential": {
"$ref": "./examples/AWSCredential_Get.json"
"Get an AWS AccessKey credential": {
"$ref": "./examples/AWSCredential_AccessKey_Get.json"
},
"Get an AWS IRSA credential": {
"$ref": "./examples/AWSCredential_IRSA_Get.json"
}
}
},
Expand Down Expand Up @@ -481,8 +487,11 @@
}
},
"x-ms-examples": {
"Create or update an AWS credential": {
"$ref": "./examples/AWSCredential_CreateOrUpdate.json"
"Create or update an AWS AccessKey credential": {
"$ref": "./examples/AWSCredential_AccessKey_CreateOrUpdate.json"
},
"Create or update an AWS IRSA credential": {
"$ref": "./examples/AWSCredential_IRSA_CreateOrUpdate.json"
}
}
},
Expand Down Expand Up @@ -533,8 +542,11 @@
}
},
"x-ms-examples": {
"Update an AWS credential": {
"$ref": "./examples/AWSCredential_Update.json"
"Update an AWS AccessKey credential": {
"$ref": "./examples/AWSCredential_AccessKey_Update.json"
},
"Update an AWS IRSA credential": {
"$ref": "./examples/AWSCredential_IRSA_Update.json"
}
}
},
Expand Down Expand Up @@ -576,8 +588,11 @@
}
},
"x-ms-examples": {
"Delete an AWS credential": {
"$ref": "./examples/AWSCredential_Delete.json"
"Delete an AWS AccessKey credential": {
"$ref": "./examples/AWSCredential_AccessKey_Delete.json"
},
"Delete an AWS IRSA credential": {
"$ref": "./examples/AWSCredential_IRSA_Delete.json"
}
}
}
Expand Down Expand Up @@ -1664,14 +1679,14 @@
{
"name": "IRSA",
"value": "IRSA",
"description": "The AWS IRSA credential"
"description": "AWS IAM roles for service accounts. For more information, please see: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html"
}
]
}
},
"AwsAccessKeyCredentialProperties": {
"type": "object",
"description": "AWS credential storage properties",
"description": "AWS credential properties for Access Key",
"properties": {
"accessKeyId": {
"type": "string",
Expand Down Expand Up @@ -1780,7 +1795,7 @@
},
"AwsIRSACredentialProperties": {
"type": "object",
"description": "AWS credential storage properties",
"description": "AWS credential properties for IAM Roles for Service Accounts (IRSA)",
"properties": {
"roleARN": {
"type": "string",
Expand Down
6 changes: 3 additions & 3 deletions typespec/UCP/aws-credentials.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ enum AWSCredentialKind {
@doc("The AWS Access Key credential")
AccessKey,

@doc("The AWS IRSA credential")
@doc("AWS IAM roles for service accounts. For more information, please see: https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html")
IRSA,
}

Expand All @@ -79,7 +79,7 @@ model AwsCredentialProperties {
provisioningState?: ProvisioningState;
}

@doc("AWS credential storage properties")
@doc("AWS credential properties for Access Key")
model AwsAccessKeyCredentialProperties extends AwsCredentialProperties {
@doc("Access Key kind")
kind: AWSCredentialKind.AccessKey;
Expand All @@ -96,7 +96,7 @@ model AwsAccessKeyCredentialProperties extends AwsCredentialProperties {
storage: CredentialStorageProperties;
}

@doc("AWS credential storage properties")
@doc("AWS credential properties for IAM Roles for Service Accounts (IRSA)")
model AwsIRSACredentialProperties extends AwsCredentialProperties {
@doc("IRSA credential kind")
kind: AWSCredentialKind.IRSA;
Expand Down
Loading

0 comments on commit 259d384

Please sign in to comment.