Skip to content

Commit adfb34d

Browse files
author
SDKAuto
committed
CodeGen from PR 33888 in Azure/azure-rest-api-specs
Merge 5959b29d90c516bd52f1d1094aad4a769709449b into 6ea706e86e0f35817367e394146d337154536350
1 parent 41e7411 commit adfb34d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+218
-421
lines changed

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

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

3-
## 1.0.0-beta.2 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-15)
4+
5+
- Azure Resource Manager AzureTerraform client library for Java. This package contains Microsoft Azure SDK for AzureTerraform Management SDK. AzureTerraform Client. Package tag package-2023-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Azure Resource Manager Azure Terraform client library for Java
1+
# Azure Resource Manager AzureTerraform client library for Java
22

3-
Azure Resource Manager Azure Terraform client library for Java.
3+
Azure Resource Manager AzureTerraform client library for Java.
44

5-
This package contains Microsoft Azure SDK for Azure Terraform Management SDK. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources. 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 AzureTerraform Management SDK. AzureTerraform Client. Package tag package-2023-07-01-preview. 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

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
AzureTerraformManager manager = AzureTerraformManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100100
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101101
[coc]: https://opensource.microsoft.com/codeofconduct/
102102
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

sdk/terraform/azure-resourcemanager-terraform/SAMPLE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
*/
1717
public final class OperationsListSamples {
1818
/*
19-
* x-ms-original-file: 2023-07-01-preview/ListOperations.json
19+
* x-ms-original-file:
20+
* specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/examples/
21+
* ListOperations.json
2022
*/
2123
/**
2224
* Sample code: Get a list of operations for a resource provider.
@@ -40,7 +42,9 @@ import com.azure.resourcemanager.terraform.models.ExportResourceGroup;
4042
*/
4143
public final class TerraformExportTerraformSamples {
4244
/*
43-
* x-ms-original-file: 2023-07-01-preview/ExportTerraform.json
45+
* x-ms-original-file:
46+
* specification/terraform/resource-manager/Microsoft.AzureTerraform/preview/2023-07-01-preview/examples/
47+
* ExportTerraform.json
4448
*/
4549
/**
4650
* Sample code: ExportTerraform.

sdk/terraform/azure-resourcemanager-terraform/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
~ Copyright (c) Microsoft Corporation. All rights reserved.
33
~ Licensed under the MIT License.
4-
~ Code generated by Microsoft (R) TypeSpec Code Generator.
4+
~ Code generated by Microsoft (R) AutoRest Code Generator.
55
-->
66
<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">
77
<modelVersion>4.0.0</modelVersion>
@@ -17,8 +17,8 @@
1717
<version>1.0.0-beta.2</version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager-terraform;current} -->
1818
<packaging>jar</packaging>
1919

20-
<name>Microsoft Azure SDK for Azure Terraform Management</name>
21-
<description>This package contains Microsoft Azure SDK for Azure Terraform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform resources.</description>
20+
<name>Microsoft Azure SDK for AzureTerraform Management</name>
21+
<description>This package contains Microsoft Azure SDK for AzureTerraform Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. AzureTerraform Client. Package tag package-2023-07-01-preview.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>

sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/AzureTerraformManager.java

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
package com.azure.resourcemanager.terraform;
66

@@ -24,8 +24,8 @@
2424
import com.azure.core.util.Configuration;
2525
import com.azure.core.util.CoreUtils;
2626
import com.azure.core.util.logging.ClientLogger;
27-
import com.azure.resourcemanager.terraform.fluent.AzureTerraformClient;
28-
import com.azure.resourcemanager.terraform.implementation.AzureTerraformClientBuilder;
27+
import com.azure.resourcemanager.terraform.fluent.AzureTerraformManagementClient;
28+
import com.azure.resourcemanager.terraform.implementation.AzureTerraformManagementClientBuilder;
2929
import com.azure.resourcemanager.terraform.implementation.OperationsImpl;
3030
import com.azure.resourcemanager.terraform.implementation.TerraformsImpl;
3131
import com.azure.resourcemanager.terraform.models.Operations;
@@ -40,32 +40,31 @@
4040

4141
/**
4242
* Entry point to AzureTerraformManager.
43-
* The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform
44-
* resources.
43+
* AzureTerraform Client.
4544
*/
4645
public final class AzureTerraformManager {
4746
private Operations operations;
4847

4948
private Terraforms terraforms;
5049

51-
private final AzureTerraformClient clientObject;
50+
private final AzureTerraformManagementClient clientObject;
5251

5352
private AzureTerraformManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
5453
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
5554
Objects.requireNonNull(profile, "'profile' cannot be null.");
56-
this.clientObject = new AzureTerraformClientBuilder().pipeline(httpPipeline)
55+
this.clientObject = new AzureTerraformManagementClientBuilder().pipeline(httpPipeline)
5756
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
5857
.subscriptionId(profile.getSubscriptionId())
5958
.defaultPollInterval(defaultPollInterval)
6059
.buildClient();
6160
}
6261

6362
/**
64-
* Creates an instance of Azure Terraform service API entry point.
63+
* Creates an instance of AzureTerraform service API entry point.
6564
*
6665
* @param credential the credential to use.
6766
* @param profile the Azure profile for client.
68-
* @return the Azure Terraform service API instance.
67+
* @return the AzureTerraform service API instance.
6968
*/
7069
public static AzureTerraformManager authenticate(TokenCredential credential, AzureProfile profile) {
7170
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -74,11 +73,11 @@ public static AzureTerraformManager authenticate(TokenCredential credential, Azu
7473
}
7574

7675
/**
77-
* Creates an instance of Azure Terraform service API entry point.
76+
* Creates an instance of AzureTerraform service API entry point.
7877
*
7978
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
8079
* @param profile the Azure profile for client.
81-
* @return the Azure Terraform service API instance.
80+
* @return the AzureTerraform service API instance.
8281
*/
8382
public static AzureTerraformManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
8483
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
@@ -200,11 +199,11 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
200199
}
201200

202201
/**
203-
* Creates an instance of Azure Terraform service API entry point.
202+
* Creates an instance of AzureTerraform service API entry point.
204203
*
205204
* @param credential the credential to use.
206205
* @param profile the Azure profile for client.
207-
* @return the Azure Terraform service API instance.
206+
* @return the AzureTerraform service API instance.
208207
*/
209208
public AzureTerraformManager authenticate(TokenCredential credential, AzureProfile profile) {
210209
Objects.requireNonNull(credential, "'credential' cannot be null.");
@@ -288,12 +287,12 @@ public Terraforms terraforms() {
288287
}
289288

290289
/**
291-
* Gets wrapped service client AzureTerraformClient providing direct access to the underlying auto-generated API
292-
* implementation, based on Azure REST API.
290+
* Gets wrapped service client AzureTerraformManagementClient providing direct access to the underlying
291+
* auto-generated API implementation, based on Azure REST API.
293292
*
294-
* @return Wrapped service client AzureTerraformClient.
293+
* @return Wrapped service client AzureTerraformManagementClient.
295294
*/
296-
public AzureTerraformClient serviceClient() {
295+
public AzureTerraformManagementClient serviceClient() {
297296
return this.clientObject;
298297
}
299298
}

sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/fluent/AzureTerraformClient.java renamed to sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/fluent/AzureTerraformManagementClient.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
package com.azure.resourcemanager.terraform.fluent;
66

77
import com.azure.core.http.HttpPipeline;
88
import java.time.Duration;
99

1010
/**
11-
* The interface for AzureTerraformClient class.
11+
* The interface for AzureTerraformManagementClient class.
1212
*/
13-
public interface AzureTerraformClient {
13+
public interface AzureTerraformManagementClient {
1414
/**
15-
* Gets Service host.
15+
* Gets The ID of the target subscription. The value must be an UUID.
1616
*
17-
* @return the endpoint value.
17+
* @return the subscriptionId value.
1818
*/
19-
String getEndpoint();
19+
String getSubscriptionId();
2020

2121
/**
22-
* Gets Version parameter.
22+
* Gets server parameter.
2323
*
24-
* @return the apiVersion value.
24+
* @return the endpoint value.
2525
*/
26-
String getApiVersion();
26+
String getEndpoint();
2727

2828
/**
29-
* Gets The ID of the target subscription. The value must be an UUID.
29+
* Gets Api Version.
3030
*
31-
* @return the subscriptionId value.
31+
* @return the apiVersion value.
3232
*/
33-
String getSubscriptionId();
33+
String getApiVersion();
3434

3535
/**
3636
* Gets The HTTP pipeline to send requests through.

sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/fluent/OperationsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
package com.azure.resourcemanager.terraform.fluent;
66

sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/fluent/TerraformsClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
package com.azure.resourcemanager.terraform.fluent;
66

sdk/terraform/azure-resourcemanager-terraform/src/main/java/com/azure/resourcemanager/terraform/fluent/models/OperationInner.java

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
package com.azure.resourcemanager.terraform.fluent.models;
66

7-
import com.azure.core.annotation.Immutable;
7+
import com.azure.core.annotation.Fluent;
88
import com.azure.json.JsonReader;
99
import com.azure.json.JsonSerializable;
1010
import com.azure.json.JsonToken;
@@ -15,9 +15,11 @@
1515
import java.io.IOException;
1616

1717
/**
18+
* REST API Operation
19+
*
1820
* Details of a REST API operation, returned from the Resource Provider Operations API.
1921
*/
20-
@Immutable
22+
@Fluent
2123
public final class OperationInner implements JsonSerializable<OperationInner> {
2224
/*
2325
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
@@ -26,8 +28,8 @@ public final class OperationInner implements JsonSerializable<OperationInner> {
2628
private String name;
2729

2830
/*
29-
* Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
30-
* Resource Manager/control-plane operations.
31+
* Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
32+
* ARM/control-plane operations.
3133
*/
3234
private Boolean isDataAction;
3335

@@ -43,14 +45,14 @@ public final class OperationInner implements JsonSerializable<OperationInner> {
4345
private Origin origin;
4446

4547
/*
46-
* Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
48+
* Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
4749
*/
4850
private ActionType actionType;
4951

5052
/**
5153
* Creates an instance of OperationInner class.
5254
*/
53-
private OperationInner() {
55+
public OperationInner() {
5456
}
5557

5658
/**
@@ -65,7 +67,7 @@ public String name() {
6567

6668
/**
6769
* Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
68-
* operations and "false" for Azure Resource Manager/control-plane operations.
70+
* operations and "false" for ARM/control-plane operations.
6971
*
7072
* @return the isDataAction value.
7173
*/
@@ -82,6 +84,17 @@ public OperationDisplay display() {
8284
return this.display;
8385
}
8486

87+
/**
88+
* Set the display property: Localized display information for this particular operation.
89+
*
90+
* @param display the display value to set.
91+
* @return the OperationInner object itself.
92+
*/
93+
public OperationInner withDisplay(OperationDisplay display) {
94+
this.display = display;
95+
return this;
96+
}
97+
8598
/**
8699
* Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
87100
* audit logs UX. Default value is "user,system".
@@ -93,8 +106,8 @@ public Origin origin() {
93106
}
94107

95108
/**
96-
* Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
97-
* for internal only APIs.
109+
* Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
110+
* only APIs.
98111
*
99112
* @return the actionType value.
100113
*/
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
3-
// Code generated by Microsoft (R) TypeSpec Code Generator.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
44

55
/**
6-
* Package containing the inner data models for AzureTerraform.
7-
* The Azure Terraform management API provides a RESTful set of web services that used to manage your Azure Terraform
8-
* resources.
6+
* Package containing the inner data models for AzureTerraformManagementClient.
7+
* AzureTerraform Client.
98
*/
109
package com.azure.resourcemanager.terraform.fluent.models;

0 commit comments

Comments
 (0)