forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataCollectionRuleAssociationProxyOnlyResource.tsp
More file actions
115 lines (105 loc) · 3.75 KB
/
Copy pathDataCollectionRuleAssociationProxyOnlyResource.tsp
File metadata and controls
115 lines (105 loc) · 3.75 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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 DataCollectionApi;
/**
* Definition of generic ARM proxy resource.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-base-parameter" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@extensionResource
model DataCollectionRuleAssociationProxyOnlyResource
is Azure.ResourceManager.ExtensionResource<DataCollectionRuleAssociationProxyOnlyResourceProperties> {
...ResourceNameParameter<
Resource = DataCollectionRuleAssociationProxyOnlyResource,
KeyName = "associationName",
SegmentName = "dataCollectionRuleAssociations",
NamePattern = ""
>;
#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
...Azure.ResourceManager.Legacy.EntityTagProperty;
}
alias DataCollectionRuleAssociationProxyOnlyResourcesOps = Azure.ResourceManager.Legacy.ExtensionOperations<
{
...ApiVersionParameter;
/**
* The fully qualified Azure Resource manager identifier of the resource.
*/
@path(#{ allowReserved: true })
@minLength(1)
resourceUri: string;
},
{
...Azure.ResourceManager.Legacy.Provider;
},
{
...Azure.ResourceManager.Legacy.Provider;
/**
* The name of the association. The name is case insensitive.
*/
@path
@segment("dataCollectionRuleAssociations")
associationName: string;
},
"DataCollectionRuleAssociation"
>;
@armResourceOperations(#{ omitTags: true })
interface DataCollectionRuleAssociationProxyOnlyResources {
/**
* Returns the specified association.
*/
@tag("DataCollectionRuleAssociations")
@summary("Returns the specified association.")
get is DataCollectionRuleAssociationProxyOnlyResourcesOps.Read<
DataCollectionRuleAssociationProxyOnlyResource,
ErrorType = ErrorResponseCommonV2
>;
/**
* Creates or updates an association.
*/
#suppress "@azure-tools/typespec-azure-core/operation-missing-api-version" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@tag("DataCollectionRuleAssociations")
@summary("Creates or updates an association.")
create is DataCollectionRuleAssociationProxyOnlyResourcesOps.CreateOrUpdateSync<
DataCollectionRuleAssociationProxyOnlyResource,
OptionalRequestBody = true,
Response =
| DataCollectionRuleAssociationProxyOnlyResource
| ArmResourceCreatedSyncResponse<DataCollectionRuleAssociationProxyOnlyResource>,
ErrorType = ErrorResponseCommonV2
>;
/**
* Deletes an association.
*/
@tag("DataCollectionRuleAssociations")
@summary("Deletes an association.")
delete is DataCollectionRuleAssociationProxyOnlyResourcesOps.DeleteSync<
DataCollectionRuleAssociationProxyOnlyResource,
ErrorType = ErrorResponseCommonV2
>;
/**
* Lists associations for the specified resource.
*/
@tag("DataCollectionRuleAssociations")
@summary("Lists associations for the specified resource.")
listByResource is DataCollectionRuleAssociationProxyOnlyResourcesOps.List<
DataCollectionRuleAssociationProxyOnlyResource,
ErrorType = ErrorResponseCommonV2
>;
}
@@doc(
DataCollectionRuleAssociationProxyOnlyResource.name,
"The name of the association. The name is case insensitive."
);
@@doc(DataCollectionRuleAssociationProxyOnlyResource.properties, "");
@@doc(
DataCollectionRuleAssociationProxyOnlyResources.create::parameters.resource,
"The payload"
);
@@key(Extension.ScopeParameter.scope, "resourceUri");
@@minLength(Extension.ScopeParameter.scope, 1);