Skip to content

Commit

Permalink
CodeGen from PR 15416 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[QuotaRP] Split QuotaLimits API to - Usages and Quotas API (Azure#15416)

* 1.Breaking Change - Removing duplicate autoQuotaIncreaseState from supportTicketAction.
2. Removing state=enabledForPreview.
3. Updating Example.

* Updating Provider name in example.

* Capacity RP Quota APIs for GA

* Adding preview version to stable dir as base files.

* Files from preview version, which will be removed.

* Updating to GA Version.

* 1. Updated reservation version tag to - Microsoft.Capacity/preview/2020-10-01-preview/reservations.json, which matches the previous SDK release.
2. Documentation changes.

* Documentation updates for put and patch request, which includes only ONE quota request, so changing quotas to quota.

* Update documenation for put.

* Doc update.

* Adding -preview tag for GO sdk.

* Updating Go settings for output folder to be -preview.

* Adding preview subdir for GO package.

* Adding preview subdir to Go sdk path.

* Removing tag - tag: package-2020-10-25-preview

* introduce a new tag to keep the go sdk package unchanged

* Revert "introduce a new tag to keep the go sdk package unchanged"

This reverts commit 8f58d3451e9ae5a4746d2a5883911f14ca261f1b.

* Adding Azure CLI readme configuration.

* Updating the ReadMe configurations.

* Updating readme.md

* Removing duplicate cli: tag.

* Fixing build issues.

* Removing Parameter alias.

* cli config changes.

* Updating the package name to reservation.

* Updates - removin .az.md.

* Updating Example names to be unique for Get PUT

* Adding operations and python-sdk-output-folder.

* Updates.

* Removing unused file.

* Revert "Removing unused file."

This reverts commit 4f763bdb14240a3f1ba8e1dce6c7f0b643ee6a9e.

* Revert "Revert "Removing unused file.""

This reverts commit 60c520e5b50bc13c42d8227624f32031c7ca7694.

* Add reference to python readme.md file.

* Adding python readme file.

* Adding Operations for test-scenario

* Adding split

* Disabling few operation, which is not needed.

* Removing split for Operation

* Disabling the reservation Operations.

* Disable reservation operations.

* Revert "Disable reservation operations."

This reverts commit d98cbcbafeb855395f9de45292dfc9db2f5aea9d.

* Adding client-subscription-bound: false

* Adding Network RP examples and references.

* Updating Network Put and Patch requests.

* Updating GetQuotaRequests example.

* Fixing formatting.

* Updating examples.

* Adding error details for the quota request status.

* Updating examples

* Fixing formatting

* Fixing model definition.

* Revert "Fixing model definition."

This reverts commit cef9f52f142cf6c420a5f89bd0e2d806e29530c1.

* Updating example.

* Making ResoureType as String, as it will change with different RPs and all possible values cannot be added in advance.

* Adding Location header to Put and Path calls 200 response.

* Adding example for Network StandardSkuPublicIpAddresses

* Fixing spelling

* Adding error code to Failed requests and updating examples.

* Updating error message and code.

* Updating example for Network - StandardSkuPublicIpAddresses

* Adding oneOf construct. If supported, then I will update the examples.

* Adding discriminator for Limit.

* Adding discriminator to limit.

* Updating network UsagesValue example for discriminator

* Adding limitType definition.

* Adding type to the Limit objects.

* Updating type and example for discriminator

* Updating type for discriminator

* fixinf type definition for discriminator

* Updating schema for discriminator and example.

* Update network example.

* Fixing network example.

* Fixing schema.

* Fixing network example.

* Fix example.

* Updating schema.

* Updating schema and example.

* Update example.

* Examples update.

* Update

* Updated schema for discriminator

* Adding value as required.

* Schema Update.

* Replace Limt with LimitObject to fix reference.

* Updates.

* Updates.

* Updating Put/Ptach examples.

* Updating erxamples.

* Schema updated for requestStatus.

* Schema Update.

* Updates to QuotaRequestStatus example.
Change api to quota. Add usages API and update examples reference.

* 1. Split quotas and usages apis.
2. Add and update examples for quotas and usages.

* Updating example filename references

* Update Put example and operations id.

* Updating limiType field to limitObjectType

* Updating "limitType" to "limitObjectType"

* Updating Get Examples.
Adding extra property to quotas/limit object.

* 1. Updating tags for usages.
2. Rename LimitObjectType to LimitObjectTypes.

* Adding  "limitType": "Independent"

* Updating Operations Tag.

* Updating subscription ids.

* Updating Operations Name.

* Updating the documentations and examples.

* Updates.

* Updates.

* Updating Quota reference to base object type.

* Updating examples and restoring the api name to quotaLimitsProviders.

* Updating usages model and examples.

* Update quotaLimitProviders to remove resourceQuery.

* Revert "Update quotaLimitProviders to remove resourceQuery."

This reverts commit 301092d496b2834d2e5110aa7b7f32c6f9802951.

* Updating Operation API example for quotaLimitProviders rename.

* Removing quotaLimitProviders API, as it's not needed by the azure portal.
There wasn't a use case for the end user, that's why our team decided to remove it from public API.

* 1. Removing unused models for quotaLimitProviders.
2. Update operations example.

* Remove allof from usages.

* 1. Updating 202 response schema.
2. Adding location header as per - https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/async-api-reference.md#updating-using-patch

* Updating Patch 202 response model type.

* Updating description of put and API api to check location header for detailed status.

* Updates to description.

* Update quota.json

* Update quota.json

Text scrub up to line 256

* Update quota.json

Scrubbed all text strings.

* Running prettier.

* Updating Network examples to include resourceType.

* Updating Networking Examples.

* Remove 202 response body for Put and Patch.

* preRemove example - putMachineLearningServicesQuotaRequestDedicated.json

* Remove example - putMachineLearningServicesQuotaRequestDedicated.json

Co-authored-by: Arcturus Zhang <[email protected]>
Co-authored-by: Pilar Ackerman <[email protected]>
  • Loading branch information
3 people committed Aug 31, 2021
1 parent 9c9628b commit 8776794
Show file tree
Hide file tree
Showing 76 changed files with 7,978 additions and 0 deletions.
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ com.azure.resourcemanager:azure-resourcemanager-security;1.0.0-beta.1;1.0.0-beta
com.azure.resourcemanager:azure-resourcemanager-azurearcdata;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-hybridnetwork;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.1

# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@
<module>sdk/powerbidedicated</module>
<module>sdk/purview</module>
<module>sdk/quantum</module>
<module>sdk/quota</module>
<module>sdk/recoveryservices</module>
<module>sdk/recoveryservicesbackup</module>
<module>sdk/redisenterprise</module>
Expand Down
5 changes: 5 additions & 0 deletions sdk/quota/azure-resourcemanager-quota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release History

## 1.0.0-beta.1 (2021-08-31)

- Azure Resource Manager quota client library for Java. This package contains Microsoft Azure SDK for quota Management SDK. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
101 changes: 101 additions & 0 deletions sdk/quota/azure-resourcemanager-quota/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Azure Resource Manager quota client library for Java

Azure Resource Manager quota client library for Java.

This package contains Microsoft Azure SDK for quota Management SDK. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview. 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

We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.

If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.

Thank you in advance for your collaboration. We really appreciate your time!

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]

## Getting started

### Prerequisites

- [Java Development Kit (JDK)][jdk] with version 8 or above
- [Azure Subscription][azure_subscription]

### Adding the package to your product

[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-quota;current})
```xml
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-quota</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Include the recommended packages

Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.

[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.

### Authentication

By default, Azure Active Directory token authentication depends on correct configure of following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.

In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.

With above configuration, `azure` client can be authenticated by following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
QuotaManager manager = QuotaManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.

See [Authentication][authenticate] for more options.

## Key concepts

See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.

## Examples



## Troubleshooting

## Next steps

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
86 changes: 86 additions & 0 deletions sdk/quota/azure-resourcemanager-quota/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>

<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-quota</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-quota;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for quota Management</name>
<description>This package contains Microsoft Azure SDK for quota Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Azure Quota Resource Provider. Package tag package-2021-03-15-preview.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.19.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-core-management;dependency} -->
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version> <!-- {x-version-update;org.jacoco:jacoco-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.11.2</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
<configuration>
<analysisConfiguration>
<revapi.ignore>
<item>
<code>java.method.addedToInterface</code>
</item>
<item>
<regex>true</regex>
<code>.*</code>
<package>com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*</package>
</item>
</revapi.ignore>
</analysisConfiguration>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 8776794

Please sign in to comment.