Skip to content

[AutoPR azure-resourcemanager-synapse] Added workspace per subscription usage api #3682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.8 (Unreleased)
## 1.0.0-beta.1 (2023-04-12)

- Azure Resource Manager Synapse client library for Java. This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v2. 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
2 changes: 1 addition & 1 deletion sdk/synapse/azure-resourcemanager-synapse/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-synapse</artifactId>
<version>1.0.0-beta.7</version>
<version>1.0.0-beta.8</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
21 changes: 21 additions & 0 deletions sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
- [CheckNameAvailability](#operations_checknameavailability)
- [GetAzureAsyncHeaderResult](#operations_getazureasyncheaderresult)
- [GetLocationHeaderResult](#operations_getlocationheaderresult)
- [GetWorkspacePerSubscriptionQuota](#operations_getworkspacepersubscriptionquota)
- [List](#operations_list)

## PrivateEndpointConnections
Expand Down Expand Up @@ -3276,6 +3277,26 @@ public final class OperationsGetLocationHeaderResultSamples {
}
```

### Operations_GetWorkspacePerSubscriptionQuota

```java
/** Samples for Operations GetWorkspacePerSubscriptionQuota. */
public final class OperationsGetWorkspacePerSubscriptionQuotaSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspacePerSubscriptionUsageGet.json
*/
/**
* Sample code: Workspace per subscription usage in given location.
*
* @param manager Entry point to SynapseManager.
*/
public static void workspacePerSubscriptionUsageInGivenLocation(
com.azure.resourcemanager.synapse.SynapseManager manager) {
manager.operations().getWorkspacePerSubscriptionQuotaWithResponse("WestUS", com.azure.core.util.Context.NONE);
}
}
```

### Operations_List

```java
Expand Down
8 changes: 7 additions & 1 deletion sdk/synapse/azure-resourcemanager-synapse/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<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>
Expand Down Expand Up @@ -38,7 +43,8 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof
.append("-")
.append("com.azure.resourcemanager.synapse")
.append("/")
.append("1.0.0-beta.7");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.resourcemanager.synapse.fluent.models.AvailableRpOperationInner;
import com.azure.resourcemanager.synapse.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.synapse.fluent.models.OperationResourceInner;
import com.azure.resourcemanager.synapse.fluent.models.WorkspaceUsageQuotaResponseInner;
import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityRequest;
import java.util.List;

Expand Down Expand Up @@ -139,4 +140,30 @@ Response<OperationResourceInner> getAzureAsyncHeaderResultWithResponse(
@ServiceMethod(returns = ReturnType.SINGLE)
OperationResourceInner getAzureAsyncHeaderResult(
String resourceGroupName, String workspaceName, String operationId);

/**
* Gets the current usage and quota of workspaces in a subscription/region.
*
* @param location The location on which resource usage is queried.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the current usage and quota of workspaces in a subscription/region along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<WorkspaceUsageQuotaResponseInner> getWorkspacePerSubscriptionQuotaWithResponse(
String location, Context context);

/**
* Gets the current usage and quota of workspaces in a subscription/region.
*
* @param location The location on which resource usage is queried.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the current usage and quota of workspaces in a subscription/region.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
WorkspaceUsageQuotaResponseInner getWorkspacePerSubscriptionQuota(String location);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public interface SqlPoolMetadataSyncConfigsClient {
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the metadata sync configuration for a SQL pool along with {@link Response}.
*/
Expand All @@ -40,6 +42,8 @@ Response<MetadataSyncConfigInner> getWithResponse(
* @param sqlPoolName SQL pool name.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the metadata sync configuration for a SQL pool.
*/
Expand All @@ -58,6 +62,8 @@ Response<MetadataSyncConfigInner> getWithResponse(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return metadata sync configuration along with {@link Response}.
*/
Expand All @@ -80,6 +86,8 @@ Response<MetadataSyncConfigInner> createWithResponse(
* @param metadataSyncConfiguration Metadata sync configuration.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return metadata sync configuration.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ SqlPoolInner update(
* @param sqlPoolInfo The SQL pool to create.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of sQL pool.
*/
Expand All @@ -163,6 +165,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of sQL pool.
*/
Expand All @@ -181,6 +185,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param sqlPoolInfo The SQL pool to create.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return sQL pool.
*/
Expand All @@ -199,6 +205,8 @@ SyncPoller<PollResult<SqlPoolInner>, SqlPoolInner> beginCreate(
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on
* status code 404.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return sQL pool.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.synapse.fluent.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Workspaces per subscription usage and limit. */
@Immutable
public final class WorkspaceUsageQuotaResponseInner {
/*
* User-readable name of the metric.
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;

/*
* Current value of the metric.
*/
@JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY)
private Double currentValue;

/*
* Boundary value of the metric.
*/
@JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY)
private Double limit;

/*
* Unit of the metric.
*/
@JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY)
private String unit;

/** Creates an instance of WorkspaceUsageQuotaResponseInner class. */
public WorkspaceUsageQuotaResponseInner() {
}

/**
* Get the name property: User-readable name of the metric.
*
* @return the name value.
*/
public String name() {
return this.name;
}

/**
* Get the currentValue property: Current value of the metric.
*
* @return the currentValue value.
*/
public Double currentValue() {
return this.currentValue;
}

/**
* Get the limit property: Boundary value of the metric.
*
* @return the limit value.
*/
public Double limit() {
return this.limit;
}

/**
* Get the unit property: Unit of the metric.
*
* @return the unit value.
*/
public String unit() {
return this.unit;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public final class AzureADOnlyAuthenticationsClientImpl implements AzureADOnlyAu
public interface AzureADOnlyAuthenticationsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AzureADOnlyAuthenticationInner>> get(
Expand All @@ -84,8 +83,7 @@ Mono<Response<AzureADOnlyAuthenticationInner>> get(

@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}")
@ExpectedResponses({200, 201, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> create(
Expand All @@ -101,8 +99,7 @@ Mono<Response<Flux<ByteBuffer>>> create(

@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/azureADOnlyAuthentications")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<AzureADOnlyAuthenticationListResult>> list(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public final class BigDataPoolsClientImpl implements BigDataPoolsClient {
public interface BigDataPoolsService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/bigDataPools/{bigDataPoolName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<BigDataPoolResourceInfoInner>> get(
Expand All @@ -84,8 +83,7 @@ Mono<Response<BigDataPoolResourceInfoInner>> get(

@Headers({"Content-Type: application/json"})
@Patch(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/bigDataPools/{bigDataPoolName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<BigDataPoolResourceInfoInner>> update(
Expand All @@ -101,8 +99,7 @@ Mono<Response<BigDataPoolResourceInfoInner>> update(

@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/bigDataPools/{bigDataPoolName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}")
@ExpectedResponses({200, 202})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> createOrUpdate(
Expand All @@ -119,8 +116,7 @@ Mono<Response<Flux<ByteBuffer>>> createOrUpdate(

@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/bigDataPools/{bigDataPoolName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Flux<ByteBuffer>>> delete(
Expand All @@ -135,8 +131,7 @@ Mono<Response<Flux<ByteBuffer>>> delete(

@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/bigDataPools")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<BigDataPoolResourceInfoListResult>> listByWorkspace(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public final class DataMaskingPoliciesClientImpl implements DataMaskingPoliciesC
public interface DataMaskingPoliciesService {
@Headers({"Content-Type: application/json"})
@Put(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DataMaskingPolicyInner>> createOrUpdate(
Expand All @@ -73,8 +72,7 @@ Mono<Response<DataMaskingPolicyInner>> createOrUpdate(

@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces"
+ "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}")
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<DataMaskingPolicyInner>> get(
Expand Down
Loading