forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.tsp
More file actions
60 lines (52 loc) · 1.99 KB
/
main.tsp
File metadata and controls
60 lines (52 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import "./LiftrBase.Data/main.tsp";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-autorest";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
using TypeSpec.Http;
using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Versioning;
using LiftrBase.Data;
@armProviderNamespace
@service({
title: "Astronomer.Astro",
})
@versioned(Astronomer.Astro.Versions)
namespace Astronomer.Astro;
@doc("Supported API versions for the Astronomer.Astro resource provider.")
enum Versions {
@doc("Dependent on Azure.ResourceManager.Versions.v1_0_Preview_1, LiftrBase.Versions.v1_preview, LiftrBase.Data.Versions.v1_preview")
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
@useDependency(LiftrBase.Versions.v1_preview)
@useDependency(LiftrBase.Data.Versions.v1_preview)
v1_preview: "2023-08-01-preview",
}
interface Operations extends Azure.ResourceManager.Operations {}
@doc("Organization Resource by Astronomer")
model OrganizationResource is TrackedResource<OrganizationProperties> {
@key("organizationName")
@pattern("^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$")
@segment("organizations")
@minLength(1)
@maxLength(50)
@doc("Name of the Organizations resource")
@path
name: string;
...Legacy.ManagedServiceIdentityV4Property;
}
@armResourceOperations
interface Organizations {
get is ArmResourceRead<OrganizationResource>;
#suppress "@azure-tools/typespec-azure-core/invalid-final-state" "MUST CHANGE ON NEXT UPDATE"
@Azure.Core.useFinalStateVia("azure-async-operation")
createOrUpdate is ArmResourceCreateOrUpdateAsync<
OrganizationResource,
LroHeaders = Azure.Core.Foundations.RetryAfterHeader
>;
update is ArmResourcePatchAsync<OrganizationResource, OrganizationProperties>;
delete is ArmResourceDeleteWithoutOkAsync<OrganizationResource>;
listByResourceGroup is ArmResourceListByParent<OrganizationResource>;
listBySubscription is ArmListBySubscription<OrganizationResource>;
}