Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2022-10-18)

- Azure Resource Manager ResourceGraph client library for Java. This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2022-10. 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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager ResourceGraph client library for Java.

This package contains Microsoft Azure SDK for ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2021-03. 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 ResourceGraph Management SDK. Azure Resource Graph API Reference. Package tag package-2022-10. 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-resourcegraph</artifactId>
<version>1.0.0-beta.3</version>
<version>1.0.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
210 changes: 198 additions & 12 deletions sdk/resourcegraph/azure-resourcemanager-resourcegraph/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

## ResourceProvider

- [ResourceChangeDetails](#resourceprovider_resourcechangedetails)
- [ResourceChanges](#resourceprovider_resourcechanges)
- [Resources](#resourceprovider_resources)
- [ResourcesHistory](#resourceprovider_resourceshistory)
### Operations_List

```java
Expand All @@ -16,7 +19,7 @@ import com.azure.core.util.Context;
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/OperationsList.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/OperationsList.json
*/
/**
* Sample code: OperationsList.
Expand All @@ -29,6 +32,126 @@ public final class OperationsListSamples {
}
```

### ResourceProvider_ResourceChangeDetails

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.models.ResourceChangeDetailsRequestParameters;
import java.util.Arrays;

/** Samples for ResourceProvider ResourceChangeDetails. */
public final class ResourceProviderResourceChangeDetailsSamples {
/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2020-09-01-preview/examples/ResourceChangeDetails.json
*/
/**
* Sample code: Basic query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void basicQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourceChangeDetailsWithResponse(
new ResourceChangeDetailsRequestParameters()
.withResourceIds(
Arrays
.asList(
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"))
.withChangeIds(Arrays.asList("53dc0515-b86b-4bc2-979b-e4694ab4a556")),
Context.NONE);
}
}
```

### ResourceProvider_ResourceChanges

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParameters;
import com.azure.resourcemanager.resourcegraph.models.ResourceChangesRequestParametersInterval;
import java.time.OffsetDateTime;
import java.util.Arrays;

/** Samples for ResourceProvider ResourceChanges. */
public final class ResourceProviderResourceChangesSamples {
/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2020-09-01-preview/examples/ResourceChanges.json
*/
/**
* Sample code: Basic query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void basicQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourceChangesWithResponse(
new ResourceChangesRequestParameters()
.withResourceIds(
Arrays
.asList(
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"))
.withInterval(
new ResourceChangesRequestParametersInterval()
.withStart(OffsetDateTime.parse("2018-10-30T12:09:03.141Z"))
.withEnd(OffsetDateTime.parse("2018-10-31T12:09:03.141Z"))),
Context.NONE);
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2020-09-01-preview/examples/ResourceChangesNextPage.json
*/
/**
* Sample code: Next page query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void nextPageQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourceChangesWithResponse(
new ResourceChangesRequestParameters()
.withResourceIds(
Arrays
.asList(
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"))
.withInterval(
new ResourceChangesRequestParametersInterval()
.withStart(OffsetDateTime.parse("2018-10-30T12:09:03.141Z"))
.withEnd(OffsetDateTime.parse("2018-10-31T12:09:03.141Z")))
.withSkipToken("ew0KICAiJGlkIjogIjEiLA0KICAiRW5kVGltZSI6ICJcL0RhdGUoMTU1MDc0NT")
.withTop(2),
Context.NONE);
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2020-09-01-preview/examples/ResourceChangesFirstPage.json
*/
/**
* Sample code: First page query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void firstPageQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourceChangesWithResponse(
new ResourceChangesRequestParameters()
.withResourceIds(
Arrays
.asList(
"/subscriptions/4d962866-1e3f-47f2-bd18-450c08f914c1/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccount"))
.withInterval(
new ResourceChangesRequestParametersInterval()
.withStart(OffsetDateTime.parse("2018-10-30T12:09:03.141Z"))
.withEnd(OffsetDateTime.parse("2018-10-31T12:09:03.141Z")))
.withTop(2),
Context.NONE);
}
}
```

### ResourceProvider_Resources

```java
Expand All @@ -43,7 +166,7 @@ import java.util.Arrays;
/** Samples for ResourceProvider Resources. */
public final class ResourceProviderResourcesSamples {
/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesMgBasicQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesMgBasicQuery.json
*/
/**
* Sample code: Basic management group query.
Expand All @@ -61,7 +184,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesBasicQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesBasicQuery.json
*/
/**
* Sample code: Basic query.
Expand All @@ -79,7 +202,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFacetQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesFacetQuery.json
*/
/**
* Sample code: Query with a facet request.
Expand Down Expand Up @@ -127,7 +250,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFilterQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesFilterQuery.json
*/
/**
* Sample code: Filter resources.
Expand All @@ -147,7 +270,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesSummarizeQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesSummarizeQuery.json
*/
/**
* Sample code: Summarize resources by location.
Expand All @@ -166,7 +289,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesPropertiesQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesPropertiesQuery.json
*/
/**
* Sample code: Access a properties field.
Expand All @@ -186,7 +309,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesComplexQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesComplexQuery.json
*/
/**
* Sample code: Complex query.
Expand All @@ -206,7 +329,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesNextPageQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesNextPageQuery.json
*/
/**
* Sample code: Next page query.
Expand All @@ -227,7 +350,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesFirstPageQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesFirstPageQuery.json
*/
/**
* Sample code: First page query.
Expand All @@ -246,7 +369,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesTenantBasicQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesTenantBasicQuery.json
*/
/**
* Sample code: Basic tenant query.
Expand All @@ -262,7 +385,7 @@ public final class ResourceProviderResourcesSamples {
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2021-03-01/examples/ResourcesRandomPageQuery.json
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/stable/2022-10-01/examples/ResourcesRandomPageQuery.json
*/
/**
* Sample code: Random page query.
Expand All @@ -282,3 +405,66 @@ public final class ResourceProviderResourcesSamples {
}
```

### ResourceProvider_ResourcesHistory

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.resourcegraph.models.DateTimeInterval;
import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequest;
import com.azure.resourcemanager.resourcegraph.models.ResourcesHistoryRequestOptions;
import java.time.OffsetDateTime;
import java.util.Arrays;

/** Samples for ResourceProvider ResourcesHistory. */
public final class ResourceProviderResourcesHistorySamples {
/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesHistoryMgsGet.json
*/
/**
* Sample code: Resource History Management Group scope Query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void resourceHistoryManagementGroupScopeQuery(
com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourcesHistoryWithResponse(
new ResourcesHistoryRequest()
.withQuery("where name =~ 'cpu-utilization' | project id, name, properties")
.withOptions(
new ResourcesHistoryRequestOptions()
.withInterval(
new DateTimeInterval()
.withStart(OffsetDateTime.parse("2020-11-12T01:00:00.0000000Z"))
.withEnd(OffsetDateTime.parse("2020-11-12T01:25:00.0000000Z"))))
.withManagementGroups(Arrays.asList("e927f598-c1d4-4f72-8541-95d83a6a4ac8", "ProductionMG")),
Context.NONE);
}

/*
* x-ms-original-file: specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/preview/2021-06-01-preview/examples/ResourcesHistoryGet.json
*/
/**
* Sample code: Resource History Query.
*
* @param manager Entry point to ResourceGraphManager.
*/
public static void resourceHistoryQuery(com.azure.resourcemanager.resourcegraph.ResourceGraphManager manager) {
manager
.resourceProviders()
.resourcesHistoryWithResponse(
new ResourcesHistoryRequest()
.withSubscriptions(Arrays.asList("a7f33fdb-e646-4f15-89aa-3a360210861e"))
.withQuery("where name =~ 'cpu-utilization' | project id, name, properties")
.withOptions(
new ResourcesHistoryRequestOptions()
.withInterval(
new DateTimeInterval()
.withStart(OffsetDateTime.parse("2020-11-12T01:00:00.0000000Z"))
.withEnd(OffsetDateTime.parse("2020-11-12T01:25:00.0000000Z")))),
Context.NONE);
}
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for ResourceGraph Management</name>
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-2021-03.</description>
<description>This package contains Microsoft Azure SDK for ResourceGraph Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Resource Graph API Reference. Package tag package-2022-10.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.resourcegraph")
.append("/")
.append("1.0.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -263,15 +263,23 @@ public ResourceGraphManager authenticate(TokenCredential credential, AzureProfil
}
}

/** @return Resource collection API of ResourceProviders. */
/**
* Gets the resource collection API of ResourceProviders.
*
* @return Resource collection API of ResourceProviders.
*/
public ResourceProviders resourceProviders() {
if (this.resourceProviders == null) {
this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this);
}
return resourceProviders;
}

/** @return Resource collection API of Operations. */
/**
* Gets the resource collection API of Operations.
*
* @return Resource collection API of Operations.
*/
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ public interface ResourceGraphClient {
*/
String getEndpoint();

/**
* Gets Api Version.
*
* @return the apiVersion value.
*/
String getApiVersion();

/**
* Gets The HTTP pipeline to send requests through.
*
Expand Down
Loading