[Automation] Collect examples from azure-sdk-for-java#azure-resourcemanager-delegatednetwork_1.0.0-beta.3

This commit is contained in:
Azure SDK Bot 2024-10-18 04:03:21 -07:00 коммит произвёл GitHub
Родитель 73c6803b7b
Коммит 49411559de
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
38 изменённых файлов: 208 добавлений и 157 удалений

Просмотреть файл

@ -1,11 +1,15 @@
/** Samples for DelegatedNetwork ListByResourceGroup. */
/**
* Samples for DelegatedNetwork ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListByRG.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListByRG.json
*/
/**
* Sample code: Get DelegatedNetwork resources by resource group.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDelegatedNetworkResourcesByResourceGroup(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,15 @@
/** Samples for DelegatedNetwork List. */
/**
* Samples for DelegatedNetwork List.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListBySub.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/controllerListBySub.json
*/
/**
* Sample code: Get DelegatedController resources by subscription.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDelegatedControllerResourcesBySubscription(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,15 +1,19 @@
/** Samples for Operations List. */
/**
* Samples for Operations List.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedNetworkOperationsList.json
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/
* delegatedNetworkOperationsList.json
*/
/**
* Sample code: Get available operations.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getAvailableOperations(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
public static void
getAvailableOperations(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,16 @@
/** Samples for DelegatedSubnetService ListByResourceGroup. */
/**
* Samples for DelegatedSubnetService ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListByRG.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListByRG.
* json
*/
/**
* Sample code: Get DelegatedSubnets resources by resource group.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDelegatedSubnetsResourcesByResourceGroup(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,16 @@
/** Samples for DelegatedSubnetService List. */
/**
* Samples for DelegatedSubnetService List.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListBySub.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/delegatedSubnetListBySub
* .json
*/
/**
* Sample code: Get DelegatedSubnets resources by subscription.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDelegatedSubnetsResourcesBySubscription(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,15 @@
/** Samples for Controller Delete. */
/**
* Samples for Controller Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteController.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteController.json
*/
/**
* Sample code: Delete controller.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void deleteController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,15 +1,20 @@
/** Samples for DelegatedSubnetService Delete. */
/**
* Samples for DelegatedSubnetService Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteDelegatedSubnet.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteDelegatedSubnet.
* json
*/
/**
* Sample code: delete delegated subnet.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void deleteDelegatedSubnet(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
public static void
deleteDelegatedSubnet(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.delegatedSubnetServices().delete("TestRG", "delegated1", null, com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,15 +1,19 @@
/** Samples for OrchestratorInstanceService Delete. */
/**
* Samples for OrchestratorInstanceService Delete.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteOrchestrator.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/deleteOrchestrator.json
*/
/**
* Sample code: Delete Orchestrator Instance.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void deleteOrchestratorInstance(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
public static void
deleteOrchestratorInstance(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.orchestratorInstanceServices().delete("TestRG", "k8stest1", null, com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,17 +1,20 @@
/** Samples for Controller GetByResourceGroup. */
/**
* Samples for Controller GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getController.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getController.json
*/
/**
* Sample code: Get details of a controller.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDetailsOfAController(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.controllers()
.getByResourceGroupWithResponse("TestRG", "testcontroller", com.azure.core.util.Context.NONE);
public static void
getDetailsOfAController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.controllers().getByResourceGroupWithResponse("TestRG", "testcontroller",
com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,17 +1,20 @@
/** Samples for DelegatedSubnetService GetByResourceGroup. */
/**
* Samples for DelegatedSubnetService GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getDelegatedSubnet.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getDelegatedSubnet.json
*/
/**
* Sample code: Get details of a delegated subnet.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDetailsOfADelegatedSubnet(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.delegatedSubnetServices()
.getByResourceGroupWithResponse("TestRG", "delegated1", com.azure.core.util.Context.NONE);
public static void
getDetailsOfADelegatedSubnet(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.delegatedSubnetServices().getByResourceGroupWithResponse("TestRG", "delegated1",
com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,17 +1,20 @@
/** Samples for OrchestratorInstanceService GetByResourceGroup. */
/**
* Samples for OrchestratorInstanceService GetByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getOrchestrator.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/getOrchestrator.json
*/
/**
* Sample code: Get details of a orchestratorInstance.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getDetailsOfAOrchestratorInstance(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.orchestratorInstanceServices()
.getByResourceGroupWithResponse("TestRG", "testk8s1", com.azure.core.util.Context.NONE);
public static void
getDetailsOfAOrchestratorInstance(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.orchestratorInstanceServices().getByResourceGroupWithResponse("TestRG", "testk8s1",
com.azure.core.util.Context.NONE);
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,15 @@
/** Samples for OrchestratorInstanceService ListByResourceGroup. */
/**
* Samples for OrchestratorInstanceService ListByResourceGroup.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/orchestratorInstanceListByRG.json
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/
* orchestratorInstanceListByRG.json
*/
/**
* Sample code: Get OrchestratorInstance resources by resource group.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getOrchestratorInstanceResourcesByResourceGroup(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,11 +1,15 @@
/** Samples for OrchestratorInstanceService List. */
/**
* Samples for OrchestratorInstanceService List.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/orchestratorInstanceListBySub.json
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/
* orchestratorInstanceListBySub.json
*/
/**
* Sample code: Get orchestratorInstance resources by subscription.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void getOrchestratorInstanceResourcesBySubscription(

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,26 +1,28 @@
import com.azure.resourcemanager.delegatednetwork.models.DelegatedController;
import java.util.HashMap;
import java.util.Map;
/** Samples for Controller Patch. */
/**
* Samples for Controller Patch.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchController.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchController.json
*/
/**
* Sample code: update controller.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void updateController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
DelegatedController resource =
manager
.controllers()
.getByResourceGroupWithResponse("TestRG", "testcontroller", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key", "value")).apply();
DelegatedController resource = manager.controllers()
.getByResourceGroupWithResponse("TestRG", "testcontroller", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,27 +1,30 @@
import com.azure.resourcemanager.delegatednetwork.models.DelegatedSubnet;
import java.util.HashMap;
import java.util.Map;
/** Samples for DelegatedSubnetService PatchDetails. */
/**
* Samples for DelegatedSubnetService PatchDetails.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchDelegatedSubnet.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchDelegatedSubnet.
* json
*/
/**
* Sample code: patch delegated subnet.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void patchDelegatedSubnet(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
DelegatedSubnet resource =
manager
.delegatedSubnetServices()
.getByResourceGroupWithResponse("TestRG", "delegated1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key", "value")).apply();
public static void
patchDelegatedSubnet(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
DelegatedSubnet resource = manager.delegatedSubnetServices()
.getByResourceGroupWithResponse("TestRG", "delegated1", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,27 +1,29 @@
import com.azure.resourcemanager.delegatednetwork.models.Orchestrator;
import java.util.HashMap;
import java.util.Map;
/** Samples for OrchestratorInstanceService Patch. */
/**
* Samples for OrchestratorInstanceService Patch.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchOrchestrator.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/patchOrchestrator.json
*/
/**
* Sample code: update Orchestrator Instance.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void updateOrchestratorInstance(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
Orchestrator resource =
manager
.orchestratorInstanceServices()
.getByResourceGroupWithResponse("TestRG", "testk8s1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("key", "value")).apply();
public static void
updateOrchestratorInstance(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
Orchestrator resource = manager.orchestratorInstanceServices()
.getByResourceGroupWithResponse("TestRG", "testk8s1", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("key", "fakeTokenPlaceholder")).apply();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,19 +1,19 @@
/** Samples for Controller Create. */
/**
* Samples for Controller Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putController.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putController.json
*/
/**
* Sample code: Create controller.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void createController(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.controllers()
.define("testcontroller")
.withRegion("West US")
.withExistingResourceGroup("TestRG")
manager.controllers().define("testcontroller").withRegion("West US").withExistingResourceGroup("TestRG")
.create();
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,30 +1,26 @@
import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
import com.azure.resourcemanager.delegatednetwork.models.SubnetDetails;
/** Samples for DelegatedSubnetService PutDetails. */
/**
* Samples for DelegatedSubnetService PutDetails.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putDelegatedSubnet.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putDelegatedSubnet.json
*/
/**
* Sample code: put delegated subnet.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void putDelegatedSubnet(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.delegatedSubnetServices()
.define("delegated1")
.withRegion("West US")
.withExistingResourceGroup("TestRG")
.withSubnetDetails(
new SubnetDetails()
.withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"))
.withControllerDetails(
new ControllerDetails()
.withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller"))
manager.delegatedSubnetServices().define("delegated1").withRegion("West US").withExistingResourceGroup("TestRG")
.withSubnetDetails(new SubnetDetails().withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet"))
.withControllerDetails(new ControllerDetails().withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller"))
.create();
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}

Просмотреть файл

@ -1,40 +1,36 @@
import com.azure.resourcemanager.delegatednetwork.models.ControllerDetails;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorIdentity;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorKind;
import com.azure.resourcemanager.delegatednetwork.models.OrchestratorResourceProperties;
import com.azure.resourcemanager.delegatednetwork.models.ResourceIdentityType;
/** Samples for OrchestratorInstanceService Create. */
/**
* Samples for OrchestratorInstanceService Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putOrchestrator.json
* x-ms-original-file:
* specification/dnc/resource-manager/Microsoft.DelegatedNetwork/stable/2021-03-15/examples/putOrchestrator.json
*/
/**
* Sample code: Create orchestrator instance.
*
*
* @param manager Entry point to DelegatedNetworkManager.
*/
public static void createOrchestratorInstance(
com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager
.orchestratorInstanceServices()
.define("testk8s1")
.withRegion("West US")
.withExistingResourceGroup("TestRG")
.withKind(OrchestratorKind.KUBERNETES)
public static void
createOrchestratorInstance(com.azure.resourcemanager.delegatednetwork.DelegatedNetworkManager manager) {
manager.orchestratorInstanceServices().define("testk8s1").withRegion("West US")
.withExistingResourceGroup("TestRG").withKind(OrchestratorKind.KUBERNETES)
.withIdentity(new OrchestratorIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
.withProperties(
new OrchestratorResourceProperties()
.withOrchestratorAppId("546192d7-503f-477a-9cfe-4efc3ee2b6e1")
.withOrchestratorTenantId("da6192d7-503f-477a-9cfe-4efc3ee2b6c3")
.withClusterRootCA("ddsadsad344mfdsfdl")
.withApiServerEndpoint("https://testk8s.cloudapp.net")
.withPrivateLinkResourceId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1")
.withControllerDetails(
new ControllerDetails()
.withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller")))
.withProperties(new OrchestratorResourceProperties()
.withOrchestratorAppId("546192d7-503f-477a-9cfe-4efc3ee2b6e1")
.withOrchestratorTenantId("da6192d7-503f-477a-9cfe-4efc3ee2b6c3")
.withClusterRootCA("ddsadsad344mfdsfdl").withApiServerEndpoint("https://testk8s.cloudapp.net")
.withPrivateLinkResourceId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1")
.withControllerDetails(new ControllerDetails().withId(
"/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller")))
.create();
}
}

Просмотреть файл

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.2/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-delegatednetwork_1.0.0-beta.3/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/README.md"}