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.2 (Unreleased)
## 1.0.0-beta.1 (2022-09-30)

- Azure Resource Manager AzureTrafficCollector client library for Java. This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. Azure Traffic Collector service. Package tag package-2022-11-01. 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 AzureTrafficCollector client library for Java.

This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. Azure Traffic Collector service. Package tag package-2022-05-01. 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 AzureTrafficCollector Management SDK. Azure Traffic Collector service. Package tag package-2022-11-01. 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-networkfunction</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
64 changes: 51 additions & 13 deletions sdk/networkfunction/azure-resourcemanager-networkfunction/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
- [Delete](#collectorpolicies_delete)
- [Get](#collectorpolicies_get)
- [List](#collectorpolicies_list)
- [UpdateTags](#collectorpolicies_updatetags)

## NetworkFunction

- [ListOperations](#networkfunction_listoperations)
### AzureTrafficCollectors_CreateOrUpdate

```java
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/** Samples for AzureTrafficCollectors CreateOrUpdate. */
public final class AzureTrafficCollectorsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorCreate.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorCreate.json
*/
/**
* Sample code: Create a traffic collector.
Expand All @@ -51,7 +51,6 @@ public final class AzureTrafficCollectorsCreateOrUpdateSamples {
.withRegion("West US")
.withExistingResourceGroup("rg1")
.withTags(mapOf("key1", "value1"))
.withCollectorPolicies(Arrays.asList())
.create();
}

Expand All @@ -76,7 +75,7 @@ import com.azure.core.util.Context;
/** Samples for AzureTrafficCollectors Delete. */
public final class AzureTrafficCollectorsDeleteSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorDelete.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorDelete.json
*/
/**
* Sample code: Delete Traffic Collector.
Expand All @@ -98,7 +97,7 @@ import com.azure.core.util.Context;
/** Samples for AzureTrafficCollectors GetByResourceGroup. */
public final class AzureTrafficCollectorsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorGet.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorGet.json
*/
/**
* Sample code: Get Traffic Collector.
Expand All @@ -123,7 +122,7 @@ import java.util.Map;
/** Samples for AzureTrafficCollectors UpdateTags. */
public final class AzureTrafficCollectorsUpdateTagsSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorUpdateTags.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorUpdateTags.json
*/
/**
* Sample code: Update Traffic Collector tags.
Expand Down Expand Up @@ -158,7 +157,7 @@ import com.azure.core.util.Context;
/** Samples for AzureTrafficCollectorsByResourceGroup ListByResourceGroup. */
public final class AzureTrafficCollectorsByResourceGroupListByResourceGroupSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsByResourceGroupList.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorsByResourceGroupList.json
*/
/**
* Sample code: List of Traffic Collectors by ResourceGroup.
Expand All @@ -180,7 +179,7 @@ import com.azure.core.util.Context;
/** Samples for AzureTrafficCollectorsBySubscription List. */
public final class AzureTrafficCollectorsBySubscriptionListSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/AzureTrafficCollectorsBySubscriptionList.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/AzureTrafficCollectorsBySubscriptionList.json
*/
/**
* Sample code: List of Traffic Collectors by Subscription.
Expand Down Expand Up @@ -210,7 +209,7 @@ import java.util.Arrays;
/** Samples for CollectorPolicies CreateOrUpdate. */
public final class CollectorPoliciesCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyCreate.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyCreate.json
*/
/**
* Sample code: Create a collection policy.
Expand All @@ -222,6 +221,7 @@ public final class CollectorPoliciesCreateOrUpdateSamples {
manager
.collectorPolicies()
.define("cp1")
.withRegion("West US")
.withExistingAzureTrafficCollector("rg1", "atc")
.withIngestionPolicy(
new IngestionPolicyPropertiesFormat()
Expand Down Expand Up @@ -256,7 +256,7 @@ import com.azure.core.util.Context;
/** Samples for CollectorPolicies Delete. */
public final class CollectorPoliciesDeleteSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyDelete.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyDelete.json
*/
/**
* Sample code: Delete Collection Policy.
Expand All @@ -278,7 +278,7 @@ import com.azure.core.util.Context;
/** Samples for CollectorPolicies Get. */
public final class CollectorPoliciesGetSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPolicyGet.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyGet.json
*/
/**
* Sample code: Get Collection Policy.
Expand All @@ -300,7 +300,7 @@ import com.azure.core.util.Context;
/** Samples for CollectorPolicies List. */
public final class CollectorPoliciesListSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/CollectorPoliciesList.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPoliciesList.json
*/
/**
* Sample code: List of Collection Policies.
Expand All @@ -314,6 +314,44 @@ public final class CollectorPoliciesListSamples {
}
```

### CollectorPolicies_UpdateTags

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.networkfunction.models.CollectorPolicy;
import java.util.HashMap;
import java.util.Map;

/** Samples for CollectorPolicies UpdateTags. */
public final class CollectorPoliciesUpdateTagsSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/CollectorPolicyUpdateTags.json
*/
/**
* Sample code: Update Collector Policy tags.
*
* @param manager Entry point to AzureTrafficCollectorManager.
*/
public static void updateCollectorPolicyTags(
com.azure.resourcemanager.networkfunction.AzureTrafficCollectorManager manager) {
CollectorPolicy resource =
manager.collectorPolicies().getWithResponse("rg1", "atc", "cp1", Context.NONE).getValue();
resource.update().withTags(mapOf("key1", "value1", "key2", "value2")).apply();
}

@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

### NetworkFunction_ListOperations

```java
Expand All @@ -322,7 +360,7 @@ import com.azure.core.util.Context;
/** Samples for NetworkFunction ListOperations. */
public final class NetworkFunctionListOperationsSamples {
/*
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/examples/OperationsList.json
* x-ms-original-file: specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/examples/OperationsList.json
*/
/**
* Sample code: OperationsList.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for AzureTrafficCollector Management</name>
<description>This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Traffic Collector service. Package tag package-2022-05-01.</description>
<description>This package contains Microsoft Azure SDK for AzureTrafficCollector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Traffic Collector service. Package tag package-2022-11-01.</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 @@ -20,28 +20,28 @@ public interface AzureTrafficCollectorsClient {
*
* @param resourceGroupName The name of the resource group.
* @param azureTrafficCollectorName Azure Traffic Collector name.
* @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 specified Azure Traffic Collector in a specified resource group.
* @return the specified Azure Traffic Collector in a specified resource group along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AzureTrafficCollectorInner getByResourceGroup(String resourceGroupName, String azureTrafficCollectorName);
Response<AzureTrafficCollectorInner> getByResourceGroupWithResponse(
String resourceGroupName, String azureTrafficCollectorName, Context context);

/**
* Gets the specified Azure Traffic Collector in a specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param azureTrafficCollectorName Azure Traffic Collector name.
* @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 specified Azure Traffic Collector in a specified resource group along with {@link Response}.
* @return the specified Azure Traffic Collector in a specified resource group.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AzureTrafficCollectorInner> getByResourceGroupWithResponse(
String resourceGroupName, String azureTrafficCollectorName, Context context);
AzureTrafficCollectorInner getByResourceGroup(String resourceGroupName, String azureTrafficCollectorName);

/**
* Creates or updates a Azure Traffic Collector resource.
Expand Down Expand Up @@ -170,28 +170,28 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
* @param resourceGroupName The name of the resource group.
* @param azureTrafficCollectorName Azure Traffic Collector name.
* @param parameters Parameters supplied to update Azure Traffic Collector tags.
* @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 azure Traffic Collector resource.
* @return azure Traffic Collector resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AzureTrafficCollectorInner updateTags(
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters);
Response<AzureTrafficCollectorInner> updateTagsWithResponse(
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters, Context context);

/**
* Updates the specified Azure Traffic Collector tags.
*
* @param resourceGroupName The name of the resource group.
* @param azureTrafficCollectorName Azure Traffic Collector name.
* @param parameters Parameters supplied to update Azure Traffic Collector tags.
* @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 azure Traffic Collector resource along with {@link Response}.
* @return azure Traffic Collector resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<AzureTrafficCollectorInner> updateTagsWithResponse(
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters, Context context);
AzureTrafficCollectorInner updateTags(
String resourceGroupName, String azureTrafficCollectorName, TagsObject parameters);
}
Loading