-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[TSP Migration]--RedisEnterprise #38436
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
Open
welovej
wants to merge
23
commits into
Azure:main
Choose a base branch
from
welovej:TspMig-redisenterprise
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,817
−2,530
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
c64f464
just converted
welovej dd215c6
could compile
welovej 8003e4a
update
welovej aa1158e
update
welovej 686c381
Update tspconfig.yaml
welovej 2c01cf9
update
welovej 0f1e516
Update tspconfig.yaml
welovej f54149d
Update tspconfig.yaml
welovej 62023da
Update tspconfig.yaml
welovej a50bfb8
update
welovej 7c1b4a9
update
welovej 5d997cc
Merge remote-tracking branch 'upstream/main' into TspMig-redisenterprise
welovej 4e3ed8b
update
welovej 510e1be
update
welovej 2d90c75
update client name
v-jiaodi 4b7e8b1
Merge branch 'main' into TspMig-redisenterprise
msyyc 19b9792
update config for python
msyyc 00eac75
updaate
welovej dbc90f6
add config
jliusan 94cc698
remove example config
jliusan 7152446
revert code
jliusan a36581b
fix PrivateEndpointConnection duplicate schema
XiaofeiCao f8cbcb5
remove java config
XiaofeiCao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
specification/redisenterprise/RedisEnterprise.Management/AccessPolicyAssignment.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
| import "@typespec/openapi"; | ||
| import "@typespec/rest"; | ||
| import "./models.tsp"; | ||
| import "./Database.tsp"; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Http; | ||
| using TypeSpec.OpenAPI; | ||
|
|
||
| namespace Microsoft.Cache; | ||
| /** | ||
| * Describes the access policy assignment of Redis Enterprise database | ||
| */ | ||
| @parentResource(Database) | ||
| model AccessPolicyAssignment | ||
| is Azure.ResourceManager.ProxyResource<AccessPolicyAssignmentProperties> { | ||
| ...ResourceNameParameter< | ||
| Resource = AccessPolicyAssignment, | ||
| KeyName = "accessPolicyAssignmentName", | ||
| SegmentName = "accessPolicyAssignments", | ||
| NamePattern = "^[A-Za-z0-9]{1,60}$" | ||
| >; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface AccessPolicyAssignments { | ||
| /** | ||
| * Gets information about access policy assignment for database. | ||
| */ | ||
| get is ArmResourceRead<AccessPolicyAssignment>; | ||
|
|
||
| /** | ||
| * Creates/Updates a particular access policy assignment for a database | ||
| */ | ||
| @Azure.Core.useFinalStateVia("original-uri") | ||
| createUpdate is ArmResourceCreateOrReplaceAsync<AccessPolicyAssignment>; | ||
|
|
||
| /** | ||
| * Deletes a single access policy assignment. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| delete is ArmResourceDeleteWithoutOkAsync< | ||
| AccessPolicyAssignment, | ||
| LroHeaders = ArmCombinedLroHeaders & Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Gets all access policy assignments.. | ||
| */ | ||
| list is ArmResourceListByParent< | ||
| AccessPolicyAssignment, | ||
| Response = ArmResponse<AccessPolicyAssignmentList> | ||
| >; | ||
| } | ||
|
|
||
| @@doc(AccessPolicyAssignment.name, | ||
| "The name of the Redis Enterprise database access policy assignment." | ||
| ); | ||
| @@doc(AccessPolicyAssignment.properties, | ||
| "Properties of the access policy assignment." | ||
| ); | ||
| @@doc(AccessPolicyAssignments.createUpdate::parameters.resource, | ||
| "Parameters supplied to the create access policy assignment for database." | ||
| ); |
128 changes: 128 additions & 0 deletions
128
specification/redisenterprise/RedisEnterprise.Management/Cluster.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,128 @@ | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
| import "@typespec/openapi"; | ||
| import "@typespec/rest"; | ||
| import "./models.tsp"; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Http; | ||
| using TypeSpec.OpenAPI; | ||
|
|
||
| namespace Microsoft.Cache; | ||
| /** | ||
| * Describes the Redis Enterprise cluster | ||
| */ | ||
| model Cluster | ||
| is Azure.ResourceManager.TrackedResource<ClusterCreateProperties> { | ||
| ...ResourceNameParameter< | ||
| Resource = Cluster, | ||
| KeyName = "clusterName", | ||
| SegmentName = "redisEnterprise", | ||
| NamePattern = "^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" | ||
| >; | ||
|
|
||
| /** | ||
| * Distinguishes the kind of cluster. Read-only. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @visibility(Lifecycle.Read) | ||
| kind?: Kind; | ||
|
|
||
| /** | ||
| * The SKU to create, which affects price, performance, and features. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| sku: Sku; | ||
|
|
||
| ...Azure.ResourceManager.AvailabilityZonesProperty; | ||
|
|
||
| /** | ||
| * The identity of the resource. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| identity?: Azure.ResourceManager.CommonTypes.ManagedServiceIdentity; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface Clusters { | ||
| /** | ||
| * Gets information about a Redis Enterprise cluster | ||
| */ | ||
| get is ArmResourceRead<Cluster>; | ||
|
|
||
| /** | ||
| * Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster | ||
| */ | ||
| @Azure.Core.useFinalStateVia("original-uri") | ||
| create is ArmResourceCreateOrReplaceAsync<Cluster>; | ||
|
|
||
| /** | ||
| * Updates an existing Redis Enterprise cluster | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| @patch(#{ implicitOptionality: false }) | ||
| update is ArmCustomPatchAsync< | ||
| Cluster, | ||
| PatchModel = ClusterUpdate, | ||
| LroHeaders = ArmCombinedLroHeaders<FinalResult = Cluster> & | ||
| Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Deletes a Redis Enterprise cache cluster. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| delete is ArmResourceDeleteWithoutOkAsync< | ||
| Cluster, | ||
| Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse<ArmCombinedLroHeaders & | ||
| Azure.Core.Foundations.RetryAfterHeader> | ArmDeletedNoContentResponse | ||
| >; | ||
|
|
||
| /** | ||
| * Lists all Redis Enterprise clusters in a resource group. | ||
| */ | ||
| listByResourceGroup is ArmResourceListByParent< | ||
| Cluster, | ||
| Response = ArmResponse<ClusterList> | ||
| >; | ||
|
|
||
| /** | ||
| * Lists all Redis Enterprise clusters in the specified subscription. | ||
| */ | ||
| list is ArmListBySubscription<Cluster, Response = ArmResponse<ClusterList>>; | ||
|
|
||
| /** | ||
| * Lists the available SKUs for scaling the Redis Enterprise cluster. | ||
| */ | ||
| listSkusForScaling is ArmResourceActionSync< | ||
| Cluster, | ||
| void, | ||
| ArmResponse<SkuDetailsList> | ||
| >; | ||
|
|
||
| /** | ||
| * Gets the private link resources that need to be created for a Redis Enterprise cluster. | ||
| */ | ||
| @list | ||
| @get | ||
| @action("privateLinkResources") | ||
| listByCluster is ArmResourceActionSync< | ||
| Cluster, | ||
| void, | ||
| ArmResponse<PrivateLinkResourceListResult> | ||
| >; | ||
| } | ||
|
|
||
| @@doc(Cluster.name, | ||
| "The name of the Redis Enterprise cluster. Name must be 1-60 characters long. Allowed characters(A-Z, a-z, 0-9) and hyphen(-). There can be no leading nor trailing nor consecutive hyphens" | ||
| ); | ||
| @@doc(Cluster.properties, "Other properties of the cluster."); | ||
| @@doc(Clusters.create::parameters.resource, | ||
| "Parameters supplied to the Create Redis Enterprise operation." | ||
| ); | ||
| @@doc(Clusters.update::parameters.properties, | ||
| "Parameters supplied to the Update Redis Enterprise operation." | ||
| ); | ||
185 changes: 185 additions & 0 deletions
185
specification/redisenterprise/RedisEnterprise.Management/Database.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,185 @@ | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
| import "@typespec/openapi"; | ||
| import "@typespec/rest"; | ||
| import "./models.tsp"; | ||
| import "./Cluster.tsp"; | ||
|
|
||
| using TypeSpec.Rest; | ||
| using Azure.ResourceManager; | ||
| using TypeSpec.Http; | ||
| using TypeSpec.OpenAPI; | ||
|
|
||
| namespace Microsoft.Cache; | ||
| /** | ||
| * Describes a database on the Redis Enterprise cluster | ||
| */ | ||
| @parentResource(Cluster) | ||
| model Database | ||
| is Azure.ResourceManager.ProxyResource<DatabaseCreateProperties> { | ||
| ...ResourceNameParameter< | ||
| Resource = Database, | ||
| KeyName = "databaseName", | ||
| SegmentName = "databases", | ||
| NamePattern = "^(?=.{1,60}$)[A-Za-z0-9]+(-[A-Za-z0-9]+)*$" | ||
| >; | ||
| } | ||
|
|
||
| @armResourceOperations | ||
| interface Databases { | ||
| /** | ||
| * Gets information about a database in a Redis Enterprise cluster. | ||
| */ | ||
| get is ArmResourceRead<Database>; | ||
|
|
||
| /** | ||
| * Creates a database | ||
| */ | ||
| @Azure.Core.useFinalStateVia("original-uri") | ||
| create is ArmResourceCreateOrReplaceAsync<Database>; | ||
|
|
||
| /** | ||
| * Updates a database | ||
| */ | ||
| @patch(#{ implicitOptionality: false }) | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| update is ArmCustomPatchAsync< | ||
| Database, | ||
| PatchModel = DatabaseUpdate, | ||
| LroHeaders = ArmCombinedLroHeaders<FinalResult = Database> & | ||
| Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Deletes a single database | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| delete is ArmResourceDeleteWithoutOkAsync< | ||
| Database, | ||
| Response = ArmDeletedResponse | ArmDeleteAcceptedLroResponse<ArmCombinedLroHeaders & | ||
| Azure.Core.Foundations.RetryAfterHeader> | ArmDeletedNoContentResponse | ||
| >; | ||
|
|
||
| /** | ||
| * Gets all databases in the specified Redis Enterprise cluster. | ||
| */ | ||
| listByCluster is ArmResourceListByParent< | ||
| Database, | ||
| Response = ArmResponse<DatabaseList> | ||
| >; | ||
|
|
||
| /** | ||
| * Retrieves the access keys for the Redis Enterprise database. | ||
| */ | ||
| listKeys is ArmResourceActionSync<Database, void, ArmResponse<AccessKeys>>; | ||
|
|
||
| /** | ||
| * Regenerates the Redis Enterprise database's access keys. | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| regenerateKey is ArmResourceActionAsync< | ||
| Database, | ||
| RegenerateKeyParameters, | ||
| ArmResponse<AccessKeys>, | ||
| LroHeaders = ArmCombinedLroHeaders<FinalResult = AccessKeys> & | ||
| Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Imports database files to target database. | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| `import` is ArmResourceActionAsync< | ||
| Database, | ||
| ImportClusterParameters, | ||
| OkResponse, | ||
| LroHeaders = ArmCombinedLroHeaders & Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Exports a database file from target database. | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| export is ArmResourceActionAsync< | ||
| Database, | ||
| ExportClusterParameters, | ||
| OkResponse, | ||
| LroHeaders = ArmCombinedLroHeaders & Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Forcibly removes the link to the specified database resource. | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| forceUnlink is ArmResourceActionAsync< | ||
| Database, | ||
| ForceUnlinkParameters, | ||
| OkResponse, | ||
| LroHeaders = ArmCombinedLroHeaders & Azure.Core.Foundations.RetryAfterHeader | ||
| >; | ||
|
|
||
| /** | ||
| * Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. **IMPORTANT NOTE:** All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. | ||
| */ | ||
| @Azure.Core.useFinalStateVia("azure-async-operation") | ||
| forceLinkToReplicationGroup is ArmResourceActionAsyncBase< | ||
| Database, | ||
| ForceLinkParameters, | ||
| ArmAcceptedLroResponse<LroHeaders = ArmCombinedLroHeaders & | ||
| Azure.Core.Foundations.RetryAfterHeader>, | ||
| BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters<Database> | ||
| >; | ||
|
|
||
| /** | ||
| * Flushes all the keys in this database and also from its linked databases. | ||
| */ | ||
| flush is ArmResourceActionAsyncBase< | ||
| Database, | ||
| FlushParameters, | ||
| Response = OkResponse | ArmAcceptedLroResponse<LroHeaders = ArmCombinedLroHeaders & | ||
| Azure.Core.Foundations.RetryAfterHeader>, | ||
| OptionalRequestBody = true, | ||
| BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters<Database> | ||
| >; | ||
|
|
||
| /** | ||
| * Upgrades the database Redis version to the latest available. | ||
| */ | ||
| #suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" | ||
| upgradeDBRedisVersion is ArmResourceActionAsyncBase< | ||
| Database, | ||
| void, | ||
| Response = ArmAcceptedLroResponse<LroHeaders = ArmCombinedLroHeaders & | ||
| Azure.Core.Foundations.RetryAfterHeader>, | ||
| BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters<Database> | ||
| >; | ||
| } | ||
|
|
||
| @@doc(Database.name, "The name of the Redis Enterprise database."); | ||
| @@doc(Database.properties, "Other properties of the database."); | ||
| @@doc(Databases.create::parameters.resource, | ||
| "Parameters supplied to the create or update database operation." | ||
| ); | ||
| @@doc(Databases.update::parameters.properties, | ||
| "Parameters supplied to the create or update database operation." | ||
| ); | ||
| @@doc(Databases.regenerateKey::parameters.body, | ||
| "Specifies which key to regenerate." | ||
| ); | ||
| @@doc(Databases.`import`::parameters.body, | ||
| "Storage information for importing into the cluster" | ||
| ); | ||
| @@doc(Databases.export::parameters.body, | ||
| "Storage information for exporting into the cluster" | ||
| ); | ||
| @@doc(Databases.forceUnlink::parameters.body, | ||
| "Information identifying the database to be unlinked." | ||
| ); | ||
| @@doc(Databases.forceLinkToReplicationGroup::parameters.body, | ||
| "Information identifying the database to be unlinked." | ||
| ); | ||
| @@doc(Databases.flush::parameters.body, | ||
| "Information identifying the databases to be flushed" | ||
| ); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there in call to action to service team for these for future iteration? if yes then what is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's service team's call to fix. We cannot make decision for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, with the provided link I could not understand what is the issue here we are suppressing, could you please explain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is a placeholder. We are going to fill in later. For this specific linter suppression, it means Property "xxx" is not valid in the resource envelope. Please remove this property, or add it to the resource-specific property bag.
Envelop property means some standard properties provided by TypeSpec ARM library. Your property doesn't fit into any standard one so that we are not using.