Skip to content

Commit

Permalink
CodeGen from PR 17439 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Dev IoT Central Microsoft.IotCentral 2021-11-01-preview (Azure#17439)

* Adds base for updating Microsoft.IoTCentral from version stable/2021-06-01 to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* Initial update of IoT Central r resource definition

* Initial work on private endpoint connection apis

* more work on the private endpoint apis

* removing some comments

* updating put api

* Adding examples

* Fixing example file

* Fixing api spec formatting

* Formatting examples

* Updating use of  in App model definition

* ...

* Getting rid of  definition

* Referencing the common types Resource Def instead

* ...

* more updates

* more updates

* more updates 2:30PM

* more updates 4:20

* Adding private link api

* fixing the schema used by private link list

* Fix private link list example

* addressing some comments

* marking default responses as error responses

* Updating examples

* removing body from some example responses

* Adding x-ms-identifier

* deleting invisible characters

* Adding a common privatelinks.json v4

* updating network ruleset properties

* forgot to update examples

* trying to remove default responses from example files

* Rogelio's comments

* moving to the more common 'groupId' private link resource name

* fixes and a revert of a change for breaking changes

* rule fixes

* adding list identifier for operations

* fixed one rule and broke another

* fixing broken validation rules

* finishing up changes for ro's comments

* updates

* adding type to resource def

* updating casing of iotApps to IoTApps

* changing back to camelCased 'iotApps'

* Delete old privatepreview version from repo

* patch back to 202

* example fix and suppression

* trying another supression config

* improving async header documentation

* trying to deduplicate schema definitions

* updating the status response schemas for long running apis

* updating examples

* removing status responses from async apis

* suppressing another error for networking

* Update delete response codes

* forgot to update delete operations

* Updating response codes for put and delete apis

* move from azure-asyncoperation to location header

* Captilizing headers in examples

* standardizing capitalization of 'IoT'

* Adding provisioning state property

* Adding 201 response to Application PUT

* commit to start validation checks after tooling update

* removing location header from put requests

* adding azure-asyncoperation header back

* adding a better description to the azure-asyncoperation header
  • Loading branch information
SDKAuto committed Mar 29, 2022
1 parent ea4789c commit 987b831
Show file tree
Hide file tree
Showing 84 changed files with 5,391 additions and 297 deletions.
4 changes: 3 additions & 1 deletion sdk/iotcentral/azure-resourcemanager-iotcentral/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.0.0-beta.1 (2022-03-29)

- 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-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
4 changes: 2 additions & 2 deletions sdk/iotcentral/azure-resourcemanager-iotcentral/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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).
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-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-iotcentral</artifactId>
<version>1.0.0</version>
<version>1.1.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
194 changes: 175 additions & 19 deletions sdk/iotcentral/azure-resourcemanager-iotcentral/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
## Operations

- [List](#operations_list)

## PrivateEndpointConnections

- [Create](#privateendpointconnections_create)
- [Delete](#privateendpointconnections_delete)
- [Get](#privateendpointconnections_get)
- [List](#privateendpointconnections_list)

## PrivateLinks

- [Get](#privatelinks_get)
- [List](#privatelinks_list)
### Apps_CheckNameAvailability

```java
Expand All @@ -25,7 +37,7 @@ import com.azure.resourcemanager.iotcentral.models.OperationInputs;
/** Samples for Apps CheckNameAvailability. */
public final class AppsCheckNameAvailabilitySamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckNameAvailability.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckNameAvailability.json
*/
/**
* Sample code: Apps_CheckNameAvailability.
Expand All @@ -50,7 +62,7 @@ import com.azure.resourcemanager.iotcentral.models.OperationInputs;
/** Samples for Apps CheckSubdomainAvailability. */
public final class AppsCheckSubdomainAvailabilitySamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CheckSubdomainAvailability.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CheckSubdomainAvailability.json
*/
/**
* Sample code: Apps_SubdomainAvailability.
Expand All @@ -77,7 +89,7 @@ import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentity
/** Samples for Apps CreateOrUpdate. */
public final class AppsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_CreateOrUpdate.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_CreateOrUpdate.json
*/
/**
* Sample code: Apps_CreateOrUpdate.
Expand Down Expand Up @@ -109,7 +121,7 @@ import com.azure.core.util.Context;
/** Samples for Apps Delete. */
public final class AppsDeleteSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Delete.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Delete.json
*/
/**
* Sample code: Apps_Delete.
Expand All @@ -130,7 +142,7 @@ import com.azure.core.util.Context;
/** Samples for Apps GetByResourceGroup. */
public final class AppsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Get.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Get.json
*/
/**
* Sample code: Apps_Get.
Expand All @@ -151,7 +163,7 @@ import com.azure.core.util.Context;
/** Samples for Apps List. */
public final class AppsListSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListBySubscription.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListBySubscription.json
*/
/**
* Sample code: Apps_ListBySubscription.
Expand All @@ -172,7 +184,7 @@ import com.azure.core.util.Context;
/** Samples for Apps ListByResourceGroup. */
public final class AppsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_ListByResourceGroup.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_ListByResourceGroup.json
*/
/**
* Sample code: Apps_ListByResourceGroup.
Expand All @@ -193,7 +205,7 @@ import com.azure.core.util.Context;
/** Samples for Apps ListTemplates. */
public final class AppsListTemplatesSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Templates.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Templates.json
*/
/**
* Sample code: Apps_ListTemplates.
Expand All @@ -210,29 +222,31 @@ public final class AppsListTemplatesSamples {

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.iotcentral.models.App;
import com.azure.resourcemanager.iotcentral.models.AppPatch;
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentity;
import com.azure.resourcemanager.iotcentral.models.SystemAssignedServiceIdentityType;

/** Samples for Apps Update. */
public final class AppsUpdateSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Apps_Update.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Apps_Update.json
*/
/**
* Sample code: Apps_Update.
*
* @param manager Entry point to IotCentralManager.
*/
public static void appsUpdate(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
App resource =
manager.apps().getByResourceGroupWithResponse("resRg", "myIoTCentralApp", Context.NONE).getValue();
resource
.update()
.withIdentity(
new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withDisplayName("My IoT Central App 2")
.apply();
manager
.apps()
.update(
"resRg",
"myIoTCentralApp",
new AppPatch()
.withIdentity(
new SystemAssignedServiceIdentity().withType(SystemAssignedServiceIdentityType.SYSTEM_ASSIGNED))
.withDisplayName("My IoT Central App 2"),
Context.NONE);
}
}
```
Expand All @@ -245,7 +259,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/stable/2021-06-01/examples/Operations_List.json
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
Expand All @@ -258,3 +272,145 @@ public final class OperationsListSamples {
}
```

### PrivateEndpointConnections_Create

```java
import com.azure.resourcemanager.iotcentral.models.PrivateEndpointServiceConnectionStatus;
import com.azure.resourcemanager.iotcentral.models.PrivateLinkServiceConnectionState;

/** Samples for PrivateEndpointConnections Create. */
public final class PrivateEndpointConnectionsCreateSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Update.json
*/
/**
* Sample code: PrivateEndpointConnections_Update.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateEndpointConnectionsUpdate(
com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager
.privateEndpointConnections()
.define("myIoTCentralAppEndpoint")
.withExistingIotApp("resRg", "myIoTCentralApp")
.withPrivateLinkServiceConnectionState(
new PrivateLinkServiceConnectionState()
.withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
.withDescription("Auto-approved")
.withActionsRequired("None"))
.create();
}
}
```

### PrivateEndpointConnections_Delete

```java
import com.azure.core.util.Context;

/** Samples for PrivateEndpointConnections Delete. */
public final class PrivateEndpointConnectionsDeleteSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Delete.json
*/
/**
* Sample code: PrivateEndpointConnections_Delete.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateEndpointConnectionsDelete(
com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager
.privateEndpointConnections()
.delete("resRg", "myIoTCentralApp", "myIoTCentralAppEndpoint", Context.NONE);
}
}
```

### PrivateEndpointConnections_Get

```java
import com.azure.core.util.Context;

/** Samples for PrivateEndpointConnections Get. */
public final class PrivateEndpointConnectionsGetSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_Get.json
*/
/**
* Sample code: PrivateEndpointConnections_Get.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateEndpointConnectionsGet(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager
.privateEndpointConnections()
.getWithResponse("resRg", "myIoTCentralApp", "myIoTCentralAppEndpoint", Context.NONE);
}
}
```

### PrivateEndpointConnections_List

```java
import com.azure.core.util.Context;

/** Samples for PrivateEndpointConnections List. */
public final class PrivateEndpointConnectionsListSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateEndpointConnections_List.json
*/
/**
* Sample code: PrivateEndpointConnections_List.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateEndpointConnectionsList(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager.privateEndpointConnections().list("resRg", "myIoTCentralApp", Context.NONE);
}
}
```

### PrivateLinks_Get

```java
import com.azure.core.util.Context;

/** Samples for PrivateLinks Get. */
public final class PrivateLinksGetSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_Get.json
*/
/**
* Sample code: PrivateLinks_Get.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateLinksGet(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager.privateLinks().getWithResponse("resRg", "myIoTCentralApp", "iotApp", Context.NONE);
}
}
```

### PrivateLinks_List

```java
import com.azure.core.util.Context;

/** Samples for PrivateLinks List. */
public final class PrivateLinksListSamples {
/*
* x-ms-original-file: specification/iotcentral/resource-manager/Microsoft.IoTCentral/preview/2021-11-01-preview/examples/PrivateLinks_List.json
*/
/**
* Sample code: PrivateLinks_List.
*
* @param manager Entry point to IotCentralManager.
*/
public static void privateLinksList(com.azure.resourcemanager.iotcentral.IotCentralManager manager) {
manager.privateLinks().list("resRg", "myIoTCentralApp", Context.NONE);
}
}
```

2 changes: 1 addition & 1 deletion sdk/iotcentral/azure-resourcemanager-iotcentral/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for IotCentral Management</name>
<description>This package contains Microsoft Azure SDK for IotCentral Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage IoT Central Applications in your Azure subscription. Package tag package-2021-06.</description>
<description>This package contains Microsoft Azure SDK for IotCentral Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Use this API to manage IoT Central Applications in your Azure subscription. Package tag package-preview-2021-11.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Loading

0 comments on commit 987b831

Please sign in to comment.