Skip to content

Commit

Permalink
CodeGen from PR 21749 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 2d11ab7cfdac1bd0bd4ada9c3dec83f81072eab7 into 63adf8a58565b729f70895b65aa7d1333b22d15f
  • Loading branch information
SDKAuto committed Dec 8, 2022
1 parent 85c5970 commit 108fcc8
Show file tree
Hide file tree
Showing 762 changed files with 13,824 additions and 7,826 deletions.
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.7 (Unreleased)
## 1.0.0-beta.1 (2022-12-08)

- 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
25 changes: 14 additions & 11 deletions 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.6</version>
<version>1.0.0-beta.7</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -41,19 +41,19 @@ Various documentation is available to help you get started

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.
[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.

### Authentication

By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
By default, Azure Active Directory token authentication depends on correct configuration of the 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`.
In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

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

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on

## Contributing

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

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
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.microsoft.com>.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact <opencode@microsoft.com> with any additional questions or comments.

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
Expand All @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[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
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
128 changes: 82 additions & 46 deletions sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
- [Get](#extendedsqlpoolblobauditingpolicies_get)
- [ListBySqlPool](#extendedsqlpoolblobauditingpolicies_listbysqlpool)

## Get

- [IntegrationRuntimeStart](#get_integrationruntimestart)

## IntegrationRuntimeAuthKeysOperation

- [List](#integrationruntimeauthkeysoperation_list)
Expand Down Expand Up @@ -146,6 +150,10 @@
- [Get](#kustopoolprincipalassignments_get)
- [List](#kustopoolprincipalassignments_list)

## KustoPoolPrivateLinkResourcesOperation

- [List](#kustopoolprivatelinkresourcesoperation_list)

## KustoPools

- [AddLanguageExtensions](#kustopools_addlanguageextensions)
Expand Down Expand Up @@ -205,10 +213,10 @@
- [ListByResourceGroup](#privatelinkhubs_listbyresourcegroup)
- [Update](#privatelinkhubs_update)

## PrivateLinkResources
## PrivateLinkResourcesOperation

- [Get](#privatelinkresources_get)
- [List](#privatelinkresources_list)
- [Get](#privatelinkresourcesoperation_get)
- [List](#privatelinkresourcesoperation_list)

## RestorableDroppedSqlPools

Expand Down Expand Up @@ -546,6 +554,7 @@ public final class BigDataPoolsCreateOrUpdateSamples {
.withTags(mapOf("key", "value"))
.withAutoScale(new AutoScaleProperties().withMinNodeCount(3).withEnabled(true).withMaxNodeCount(50))
.withAutoPause(new AutoPauseProperties().withDelayInMinutes(15).withEnabled(true))
.withIsAutotuneEnabled(false)
.withSparkEventsFolder("/events")
.withNodeCount(4)
.withLibraryRequirements(new LibraryRequirements().withContent("").withFilename("requirements.txt"))
Expand Down Expand Up @@ -1015,6 +1024,34 @@ public final class ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples {
}
```

### Get_IntegrationRuntimeStart

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

/** Samples for Get IntegrationRuntimeStart. */
public final class GetIntegrationRuntimeStartSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start_OperationStatus.json
*/
/**
* Sample code: Get integration runtime operation status.
*
* @param manager Entry point to SynapseManager.
*/
public static void getIntegrationRuntimeOperationStatus(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager
.gets()
.integrationRuntimeStartWithResponse(
"drage-felles-prod-rg",
"felles-prod-synapse-workspace",
"SSIS-intergrationRuntime-Drage",
"5752dcdf918e4aecb941245ddf6ebb83",
Context.NONE);
}
}
```

### IntegrationRuntimeAuthKeysOperation_List

```java
Expand Down Expand Up @@ -1637,11 +1674,11 @@ public final class IpFirewallRulesGetSamples {
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetIpFirewallRule.json
*/
/**
* Sample code: Create an IP firewall rule.
* Sample code: Get IP firewall rule.
*
* @param manager Entry point to SynapseManager.
*/
public static void createAnIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) {
public static void getIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager
.ipFirewallRules()
.getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", Context.NONE);
Expand Down Expand Up @@ -2628,6 +2665,29 @@ public final class KustoPoolPrincipalAssignmentsListSamples {
}
```

### KustoPoolPrivateLinkResourcesOperation_List

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

/** Samples for KustoPoolPrivateLinkResourcesOperation List. */
public final class KustoPoolPrivateLinkResourcesOperationListSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/KustoPoolPrivateLinkResourcesList.json
*/
/**
* Sample code: KustoPoolPrivateLinkResourcesList.
*
* @param manager Entry point to SynapseManager.
*/
public static void kustoPoolPrivateLinkResourcesList(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager
.kustoPoolPrivateLinkResourcesOperations()
.list("DP-900", "synapse-ws-ebi-data", "dataexplorerpool900", Context.NONE);
}
}
```

### KustoPools_AddLanguageExtensions

```java
Expand Down Expand Up @@ -3014,7 +3074,6 @@ public final class KustoPoolsUpdateSamples {
.withSku(new AzureSku().withName(SkuName.STORAGE_OPTIMIZED).withCapacity(2).withSize(SkuSize.MEDIUM))
.withEnableStreamingIngest(true)
.withEnablePurge(true)
.withWorkspaceUid("11111111-2222-3333-444444444444")
.apply();
}
}
Expand Down Expand Up @@ -3531,13 +3590,13 @@ public final class PrivateLinkHubsUpdateSamples {
}
```

### PrivateLinkResources_Get
### PrivateLinkResourcesOperation_Get

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

/** Samples for PrivateLinkResources Get. */
public final class PrivateLinkResourcesGetSamples {
/** Samples for PrivateLinkResourcesOperation Get. */
public final class PrivateLinkResourcesOperationGetSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkResource.json
*/
Expand All @@ -3547,18 +3606,20 @@ public final class PrivateLinkResourcesGetSamples {
* @param manager Entry point to SynapseManager.
*/
public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager.privateLinkResources().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "sql", Context.NONE);
manager
.privateLinkResourcesOperations()
.getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "sql", Context.NONE);
}
}
```

### PrivateLinkResources_List
### PrivateLinkResourcesOperation_List

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

/** Samples for PrivateLinkResources List. */
public final class PrivateLinkResourcesListSamples {
/** Samples for PrivateLinkResourcesOperation List. */
public final class PrivateLinkResourcesOperationListSamples {
/*
* x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkResources.json
*/
Expand All @@ -3568,7 +3629,7 @@ public final class PrivateLinkResourcesListSamples {
* @param manager Entry point to SynapseManager.
*/
public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) {
manager.privateLinkResources().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE);
manager.privateLinkResourcesOperations().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE);
}
}
```
Expand Down Expand Up @@ -4088,7 +4149,7 @@ public final class SqlPoolOperationResultsGetLocationHeaderResultSamples {
com.azure.resourcemanager.synapse.SynapseManager manager) {
manager
.sqlPoolOperationResults()
.getLocationHeaderResultWithResponse(
.getLocationHeaderResult(
"ExampleResourceGroup",
"ExampleWorkspace",
"ExampleSqlPool",
Expand Down Expand Up @@ -4364,7 +4425,6 @@ import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyName;
import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState;
import com.azure.resourcemanager.synapse.models.SqlPoolSecurityAlertPolicy;
import java.util.Arrays;

/** Samples for SqlPoolSecurityAlertPolicies CreateOrUpdate. */
public final class SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples {
Expand All @@ -4387,8 +4447,6 @@ public final class SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples {
resource
.update()
.withState(SecurityAlertPolicyState.ENABLED)
.withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly"))
.withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com"))
.withEmailAccountAdmins(true)
.withStorageEndpoint("https://mystorage.blob.core.windows.net")
.withStorageAccountAccessKey(
Expand Down Expand Up @@ -5420,7 +5478,7 @@ public final class SqlPoolWorkloadGroupCreateOrUpdateSamples {
.withMinResourcePercent(0)
.withMaxResourcePercent(100)
.withMinResourcePercentPerRequest(3.0)
.withMaxResourcePercentPerRequest(3.0)
.withMaxResourcePercentPerRequest(3.0D)
.withImportance("normal")
.withQueryExecutionTimeout(0)
.create();
Expand Down Expand Up @@ -5701,7 +5759,6 @@ public final class SqlPoolsResumeSamples {
import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.models.Sku;
import com.azure.resourcemanager.synapse.models.SqlPool;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -5721,14 +5778,7 @@ public final class SqlPoolsUpdateSamples {
.sqlPools()
.getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE)
.getValue();
resource
.update()
.withTags(mapOf())
.withSku(new Sku().withTier("").withName(""))
.withMaxSizeBytes(0L)
.withCollation("")
.withRestorePointInTime(OffsetDateTime.parse("1970-01-01T00:00:00.000Z"))
.apply();
resource.update().withTags(mapOf()).withSku(new Sku().withTier("").withName("")).withMaxSizeBytes(0L).apply();
}

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -5824,8 +5874,8 @@ public final class WorkspaceAadAdminsGetSamples {
```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner;
import com.azure.resourcemanager.synapse.models.DesiredState;
import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity;
import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState;

/** Samples for WorkspaceManagedIdentitySqlControlSettings CreateOrUpdate. */
public final class WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples {
Expand All @@ -5847,9 +5897,7 @@ public final class WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSampl
new ManagedIdentitySqlControlSettingsModelInner()
.withGrantSqlControlToManagedIdentity(
new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity()
.withDesiredState(
ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState
.ENABLED)),
.withDesiredState(DesiredState.ENABLED)),
Context.NONE);
}
}
Expand Down Expand Up @@ -6361,7 +6409,6 @@ import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyNameAutoGenerated;
import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState;
import com.azure.resourcemanager.synapse.models.ServerSecurityAlertPolicy;
import java.util.Arrays;

/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy CreateOrUpdate. */
public final class WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples {
Expand All @@ -6384,13 +6431,8 @@ public final class WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSam
resource
.update()
.withState(SecurityAlertPolicyState.ENABLED)
.withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly"))
.withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com"))
.withEmailAccountAdmins(true)
.withStorageEndpoint("https://mystorage.blob.core.windows.net")
.withStorageAccountAccessKey(
"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
.withRetentionDays(5)
.apply();
}

Expand All @@ -6413,8 +6455,6 @@ public final class WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSam
resource
.update()
.withState(SecurityAlertPolicyState.DISABLED)
.withEmailAccountAdmins(true)
.withStorageEndpoint("https://mystorage.blob.core.windows.net")
.withStorageAccountAccessKey(
"sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==")
.apply();
Expand Down Expand Up @@ -6773,9 +6813,7 @@ public final class WorkspacesCreateOrUpdateSamples {
.withCmk(
new CustomerManagedKeyDetails()
.withKey(
new WorkspaceKeyDetails()
.withName("default")
.withKeyVaultUrl("https://vault.azure.net/keys/key1"))
new WorkspaceKeyDetails().withName("default").withKeyVaultUrl("fakeTokenPlaceholder"))
.withKekIdentity(
new KekIdentityProperties()
.withUserAssignedIdentity(
Expand Down Expand Up @@ -6965,9 +7003,7 @@ public final class WorkspacesUpdateSamples {
.withCmk(
new CustomerManagedKeyDetails()
.withKey(
new WorkspaceKeyDetails()
.withName("default")
.withKeyVaultUrl("https://vault.azure.net/keys/key1"))))
new WorkspaceKeyDetails().withName("default").withKeyVaultUrl("fakeTokenPlaceholder"))))
.withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED)
.apply();
}
Expand Down
Loading

0 comments on commit 108fcc8

Please sign in to comment.