Skip to content

Commit 09f9a77

Browse files
author
SDKAuto
committed
CodeGen from PR 16393 in Azure/azure-rest-api-specs
Merge 1e49df24d4ae2cffb01fb276d19f191648348096 into 60723d13309c8f8060d020a7f3dd9d6e380f0bbd
1 parent 01ad248 commit 09f9a77

31 files changed

+1155
-301
lines changed

sdk/iotcentral/azure-resourcemanager-iotcentral/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2021-10-14)
44

5+
- Azure Resource Manager IotCentral client library for Java. This package contains Microsoft Azure SDK for IotCentral Management SDK. Use this API to manage IoT Central Applications in your Azure subscription. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
56

67
## 1.0.0-beta.1 (2021-04-22)
78

sdk/iotcentral/azure-resourcemanager-iotcentral/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager IotCentral client library for Java.
44

5-
This package contains Microsoft Azure SDK for IotCentral Management SDK. Use this API to manage IoT Central Applications in your Azure subscription. Package tag package-2018-09-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
This package contains Microsoft Azure SDK for IotCentral Management SDK. Use this API to manage IoT Central Applications in your Azure subscription. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-iotcentral</artifactId>
35-
<version>1.0.0-beta.1</version>
35+
<version>1.0.0-beta.2</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/iotcentral/azure-resourcemanager-iotcentral/SAMPLE.md)
78+
79+
7780
## Troubleshooting
7881

7982
## Next steps
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
# Code snippets and samples
2+
3+
4+
## Apps
5+
6+
- [CheckNameAvailability](#apps_checknameavailability)
7+
- [CheckSubdomainAvailability](#apps_checksubdomainavailability)
8+
- [CreateOrUpdate](#apps_createorupdate)
9+
- [Delete](#apps_delete)
10+
- [GetByResourceGroup](#apps_getbyresourcegroup)
11+
- [List](#apps_list)
12+
- [ListByResourceGroup](#apps_listbyresourcegroup)
13+
- [ListTemplates](#apps_listtemplates)
14+
- [Update](#apps_update)
15+
16+
## Operations
17+
18+
- [List](#operations_list)
19+
### Apps_CheckNameAvailability
20+
21+
```java
22+
import com.azure.core.util.Context;
23+
import com.azure.resourcemanager.iotcentral.models.OperationInputs;
24+
25+
/** Samples for Apps CheckNameAvailability. */
26+
public final class AppsCheckNameAvailabilitySamples {
27+
/*
28+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json
29+
*/
30+
/**
31+
* Sample code: Apps_CheckNameAvailability.
32+
*
33+
* @param manager Entry point to IotCentralManager.
34+
*/
35+
public static void appsCheckNameAvailability(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
36+
manager
37+
.apps()
38+
.checkNameAvailabilityWithResponse(
39+
new OperationInputs().withName("myiotcentralapp").withType("IoTApps"), Context.NONE);
40+
}
41+
}
42+
```
43+
44+
### Apps_CheckSubdomainAvailability
45+
46+
```java
47+
import com.azure.core.util.Context;
48+
import com.azure.resourcemanager.iotcentral.models.OperationInputs;
49+
50+
/** Samples for Apps CheckSubdomainAvailability. */
51+
public final class AppsCheckSubdomainAvailabilitySamples {
52+
/*
53+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json
54+
*/
55+
/**
56+
* Sample code: Apps_SubdomainAvailability.
57+
*
58+
* @param manager Entry point to IotCentralManager.
59+
*/
60+
public static void appsSubdomainAvailability(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
61+
manager
62+
.apps()
63+
.checkSubdomainAvailabilityWithResponse(
64+
new OperationInputs().withName("myiotcentralapp").withType("IoTApps"), Context.NONE);
65+
}
66+
}
67+
```
68+
69+
### Apps_CreateOrUpdate
70+
71+
```java
72+
import com.azure.resourcemanager.iotcentral.models.AppSku;
73+
import com.azure.resourcemanager.iotcentral.models.AppSkuInfo;
74+
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentity;
75+
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentityType;
76+
77+
/** Samples for Apps CreateOrUpdate. */
78+
public final class AppsCreateOrUpdateSamples {
79+
/*
80+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json
81+
*/
82+
/**
83+
* Sample code: Apps_CreateOrUpdate.
84+
*
85+
* @param manager Entry point to IotCentralManager.
86+
*/
87+
public static void appsCreateOrUpdate(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
88+
manager
89+
.apps()
90+
.define("myIoTCentralApp")
91+
.withRegion("westus")
92+
.withExistingResourceGroup("resRg")
93+
.withSku(new AppSkuInfo().withName(AppSku.ST2))
94+
.withIdentity(
95+
new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
96+
.withDisplayName("My IoT Central App")
97+
.withSubdomain("my-iot-central-app")
98+
.withTemplate("[email protected]")
99+
.create();
100+
}
101+
}
102+
```
103+
104+
### Apps_Delete
105+
106+
```java
107+
import com.azure.core.util.Context;
108+
109+
/** Samples for Apps Delete. */
110+
public final class AppsDeleteSamples {
111+
/*
112+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
113+
*/
114+
/**
115+
* Sample code: Apps_Delete.
116+
*
117+
* @param manager Entry point to IotCentralManager.
118+
*/
119+
public static void appsDelete(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
120+
manager.apps().delete("resRg", "myIoTCentralApp", Context.NONE);
121+
}
122+
}
123+
```
124+
125+
### Apps_GetByResourceGroup
126+
127+
```java
128+
import com.azure.core.util.Context;
129+
130+
/** Samples for Apps GetByResourceGroup. */
131+
public final class AppsGetByResourceGroupSamples {
132+
/*
133+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json
134+
*/
135+
/**
136+
* Sample code: Apps_Get.
137+
*
138+
* @param manager Entry point to IotCentralManager.
139+
*/
140+
public static void appsGet(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
141+
manager.apps().getByResourceGroupWithResponse("resRg", "myIoTCentralApp", Context.NONE);
142+
}
143+
}
144+
```
145+
146+
### Apps_List
147+
148+
```java
149+
import com.azure.core.util.Context;
150+
151+
/** Samples for Apps List. */
152+
public final class AppsListSamples {
153+
/*
154+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json
155+
*/
156+
/**
157+
* Sample code: Apps_ListBySubscription.
158+
*
159+
* @param manager Entry point to IotCentralManager.
160+
*/
161+
public static void appsListBySubscription(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
162+
manager.apps().list(Context.NONE);
163+
}
164+
}
165+
```
166+
167+
### Apps_ListByResourceGroup
168+
169+
```java
170+
import com.azure.core.util.Context;
171+
172+
/** Samples for Apps ListByResourceGroup. */
173+
public final class AppsListByResourceGroupSamples {
174+
/*
175+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json
176+
*/
177+
/**
178+
* Sample code: Apps_ListByResourceGroup.
179+
*
180+
* @param manager Entry point to IotCentralManager.
181+
*/
182+
public static void appsListByResourceGroup(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
183+
manager.apps().listByResourceGroup("resRg", Context.NONE);
184+
}
185+
}
186+
```
187+
188+
### Apps_ListTemplates
189+
190+
```java
191+
import com.azure.core.util.Context;
192+
193+
/** Samples for Apps ListTemplates. */
194+
public final class AppsListTemplatesSamples {
195+
/*
196+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json
197+
*/
198+
/**
199+
* Sample code: Apps_ListTemplates.
200+
*
201+
* @param manager Entry point to IotCentralManager.
202+
*/
203+
public static void appsListTemplates(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
204+
manager.apps().listTemplates(Context.NONE);
205+
}
206+
}
207+
```
208+
209+
### Apps_Update
210+
211+
```java
212+
import com.azure.core.util.Context;
213+
import com.azure.resourcemanager.iotcentral.models.App;
214+
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentity;
215+
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentityType;
216+
217+
/** Samples for Apps Update. */
218+
public final class AppsUpdateSamples {
219+
/*
220+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json
221+
*/
222+
/**
223+
* Sample code: Apps_Update.
224+
*
225+
* @param manager Entry point to IotCentralManager.
226+
*/
227+
public static void appsUpdate(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
228+
App resource =
229+
manager.apps().getByResourceGroupWithResponse("resRg", "myIoTCentralApp", Context.NONE).getValue();
230+
resource
231+
.update()
232+
.withIdentity(
233+
new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
234+
.withDisplayName("My IoT Central App 2")
235+
.apply();
236+
}
237+
}
238+
```
239+
240+
### Operations_List
241+
242+
```java
243+
import com.azure.core.util.Context;
244+
245+
/** Samples for Operations List. */
246+
public final class OperationsListSamples {
247+
/*
248+
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json
249+
*/
250+
/**
251+
* Sample code: Operations_List.
252+
*
253+
* @param manager Entry point to IotCentralManager.
254+
*/
255+
public static void operationsList(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
256+
manager.operations().list(Context.NONE);
257+
}
258+
}
259+
```
260+

0 commit comments

Comments
 (0)