[Automation] Collect examples from azure-sdk-for-java#azure-resourcemanager-databox_1.0.0-beta.4
This commit is contained in:
Родитель
c97d5d3365
Коммит
f40519b87e
|
@ -1,10 +1,14 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AvailableSkuRequest;
|
||||
import com.azure.resourcemanager.databox.models.TransferType;
|
||||
|
||||
/** Samples for Service ListAvailableSkusByResourceGroup. */
|
||||
/**
|
||||
* Samples for Service ListAvailableSkusByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/AvailableSkusPost.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/AvailableSkusPost.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: AvailableSkusPost.
|
||||
|
@ -12,15 +16,10 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void availableSkusPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
manager.services()
|
||||
.listAvailableSkusByResourceGroup(
|
||||
"YourResourceGroupName",
|
||||
"westus",
|
||||
new AvailableSkuRequest()
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withCountry("XX")
|
||||
.withLocation("westus"),
|
||||
"YourResourceGroupName", "westus", new AvailableSkuRequest()
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE).withCountry("XX").withLocation("westus"),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.ShipmentPickUpRequest;
|
||||
import java.time.OffsetDateTime;
|
||||
|
||||
/** Samples for Jobs BookShipmentPickUp. */
|
||||
/**
|
||||
* Samples for Jobs BookShipmentPickUp.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/BookShipmentPickupPost.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/BookShipmentPickupPost.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: BookShipmentPickupPost.
|
||||
|
@ -12,15 +16,9 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void bookShipmentPickupPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.bookShipmentPickUpWithResponse(
|
||||
"YourResourceGroupName",
|
||||
"TestJobName1",
|
||||
new ShipmentPickUpRequest()
|
||||
.withStartTime(OffsetDateTime.parse("2019-09-20T18:30:00Z"))
|
||||
.withEndTime(OffsetDateTime.parse("2019-09-22T18:30:00Z"))
|
||||
.withShipmentLocation("Front desk"),
|
||||
manager.jobs().bookShipmentPickUpWithResponse("YourResourceGroupName", "TestJobName1",
|
||||
new ShipmentPickUpRequest().withStartTime(OffsetDateTime.parse("2019-09-20T18:30:00Z"))
|
||||
.withEndTime(OffsetDateTime.parse("2019-09-22T18:30:00Z")).withShipmentLocation("Front desk"),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,12 +1,16 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.CustomerResolutionCode;
|
||||
import com.azure.resourcemanager.databox.models.MitigateJobRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for ResourceProvider Mitigate. */
|
||||
/**
|
||||
* Samples for ResourceProvider Mitigate.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobMitigate.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobMitigate.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: Mitigate.
|
||||
|
@ -14,21 +18,13 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void mitigate(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.resourceProviders()
|
||||
.mitigateWithResponse(
|
||||
"TestJobName1",
|
||||
"YourResourceGroupName",
|
||||
new MitigateJobRequest()
|
||||
.withSerialNumberCustomerResolutionMap(
|
||||
mapOf(
|
||||
"testDISK-1",
|
||||
CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE,
|
||||
"testDISK-2",
|
||||
CustomerResolutionCode.RESUME)),
|
||||
manager.resourceProviders().mitigateWithResponse("TestJobName1", "YourResourceGroupName",
|
||||
new MitigateJobRequest().withSerialNumberCustomerResolutionMap(mapOf("testDISK-1",
|
||||
CustomerResolutionCode.MOVE_TO_CLEAN_UP_DEVICE, "testDISK-2", CustomerResolutionCode.RESUME)),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,9 +1,13 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.CancellationReason;
|
||||
|
||||
/** Samples for Jobs Cancel. */
|
||||
/**
|
||||
* Samples for Jobs Cancel.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCancelPost.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCancelPost.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCancelPost.
|
||||
|
@ -11,12 +15,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCancelPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.cancelWithResponse(
|
||||
"YourResourceGroupName",
|
||||
"TestJobName1",
|
||||
new CancellationReason().withReason("CancelTest"),
|
||||
com.azure.core.util.Context.NONE);
|
||||
manager.jobs().cancelWithResponse("YourResourceGroupName", "TestJobName1",
|
||||
new CancellationReason().withReason("CancelTest"), com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.DataBoxJobDetails;
|
||||
|
@ -11,10 +12,13 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Create. */
|
||||
/**
|
||||
* Samples for Jobs Create.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreate.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreate.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCreate.
|
||||
|
@ -22,42 +26,22 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCreate(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.define("TestJobName1")
|
||||
.withRegion("westus")
|
||||
.withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX))
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(
|
||||
new DataBoxJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
manager.jobs().define("TestJobName1").withRegion("westus").withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX)).withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(new DataBoxJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
.withDataImportDetails(Arrays
|
||||
.asList(new DataImportDetails().withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
.create();
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.DataBoxJobDetails;
|
||||
|
@ -11,10 +12,13 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Create. */
|
||||
/**
|
||||
* Samples for Jobs Create.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDevicePassword.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDevicePassword.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCreateDevicePassword.
|
||||
|
@ -22,44 +26,23 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCreateDevicePassword(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.define("TestJobName1")
|
||||
.withRegion("westus")
|
||||
.withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX))
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(
|
||||
new DataBoxJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
manager.jobs().define("TestJobName1").withRegion("westus").withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX)).withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(new DataBoxJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withSharePassword("fakeTokenPlaceholder")
|
||||
.withStorageAccountId(
|
||||
.withDataImportDetails(Arrays.asList(new DataImportDetails().withAccountDetails(
|
||||
new StorageAccountDetails().withSharePassword("fakeTokenPlaceholder").withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withDevicePassword("fakeTokenPlaceholder"))
|
||||
.create();
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.DataBoxJobDetails;
|
||||
|
@ -14,10 +15,14 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Create. */
|
||||
/**
|
||||
* Samples for Jobs Create.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDoubleEncryption.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateDoubleEncryption.
|
||||
* json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCreateDoubleEncryption.
|
||||
|
@ -25,46 +30,24 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCreateDoubleEncryption(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.define("TestJobName1")
|
||||
.withRegion("westus")
|
||||
.withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX))
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(
|
||||
new DataBoxJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
manager.jobs().define("TestJobName1").withRegion("westus").withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX)).withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withDetails(new DataBoxJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
.withDataImportDetails(Arrays
|
||||
.asList(new DataImportDetails().withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withPreferences(
|
||||
new Preferences()
|
||||
.withEncryptionPreferences(
|
||||
.withPreferences(new Preferences().withEncryptionPreferences(
|
||||
new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED))))
|
||||
.create();
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.DataAccountType;
|
||||
|
@ -16,10 +17,13 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Create. */
|
||||
/**
|
||||
* Samples for Jobs Create.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateExport.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateExport.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCreateExport.
|
||||
|
@ -27,52 +31,27 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCreateExport(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.define("TestJobName1")
|
||||
.withRegion("westus")
|
||||
.withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX))
|
||||
.withTransferType(TransferType.EXPORT_FROM_AZURE)
|
||||
.withDetails(
|
||||
new DataBoxJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
manager.jobs().define("TestJobName1").withRegion("westus").withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX)).withTransferType(TransferType.EXPORT_FROM_AZURE)
|
||||
.withDetails(new DataBoxJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataExportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataExportDetails()
|
||||
.withTransferConfiguration(
|
||||
new TransferConfiguration()
|
||||
.withDataExportDetails(Arrays.asList(new DataExportDetails()
|
||||
.withTransferConfiguration(new TransferConfiguration()
|
||||
.withTransferConfigurationType(TransferConfigurationType.TRANSFER_ALL)
|
||||
.withTransferAllDetails(
|
||||
new TransferConfigurationTransferAllDetails()
|
||||
.withInclude(
|
||||
new TransferAllDetails()
|
||||
.withDataAccountType(DataAccountType.STORAGE_ACCOUNT)
|
||||
.withTransferAllBlobs(true)
|
||||
.withTransferAllFiles(true))))
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
.withTransferAllDetails(new TransferConfigurationTransferAllDetails()
|
||||
.withInclude(new TransferAllDetails().withDataAccountType(DataAccountType.STORAGE_ACCOUNT)
|
||||
.withTransferAllBlobs(true).withTransferAllFiles(true))))
|
||||
.withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
.create();
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.DataBoxJobDetails;
|
||||
|
@ -13,10 +14,13 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Create. */
|
||||
/**
|
||||
* Samples for Jobs Create.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsCreateWithUserAssignedIdentity.json
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/
|
||||
* JobsCreateWithUserAssignedIdentity.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsCreateWithUserAssignedIdentity.
|
||||
|
@ -24,49 +28,25 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsCreateWithUserAssignedIdentity(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.define("TestJobName1")
|
||||
.withRegion("westus")
|
||||
.withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX))
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withIdentity(
|
||||
new ResourceIdentity()
|
||||
.withType("UserAssigned")
|
||||
.withUserAssignedIdentities(
|
||||
mapOf(
|
||||
manager.jobs().define("TestJobName1").withRegion("westus").withExistingResourceGroup("YourResourceGroupName")
|
||||
.withSku(new Sku().withName(SkuName.DATA_BOX)).withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withIdentity(new ResourceIdentity().withType("UserAssigned").withUserAssignedIdentities(mapOf(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity",
|
||||
new UserAssignedIdentity())))
|
||||
.withDetails(
|
||||
new DataBoxJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
.withDetails(new DataBoxJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
.withDataImportDetails(Arrays
|
||||
.asList(new DataImportDetails().withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
.create();
|
||||
}
|
||||
|
||||
// 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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs Delete. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs Delete.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsDelete.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsDelete.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsDelete.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs GetByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs GetByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGet.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsGet.
|
||||
|
@ -9,9 +13,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsGet(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE);
|
||||
manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1", "details",
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs GetByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs GetByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCmk.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsGetCmk.
|
||||
|
@ -9,9 +13,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsGetCmk(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE);
|
||||
manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1", "details",
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs GetByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs GetByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetCopyStuck.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsGetCopyStuck.
|
||||
|
@ -9,9 +13,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsGetCopyStuck(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE);
|
||||
manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1", "details",
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs GetByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs GetByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetExport.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsGetExport.
|
||||
|
@ -9,9 +13,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsGetExport(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE);
|
||||
manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1", "details",
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs GetByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs GetByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsGetWaitingForAction.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsGetWaitingForAction.
|
||||
|
@ -9,9 +13,7 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsGetWaitingForAction(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE);
|
||||
manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1", "details",
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs List. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs List.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsList.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsList.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsList.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs ListByResourceGroup. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs ListByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListByResourceGroup.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListByResourceGroup.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsListByResourceGroup.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Jobs ListCredentials. */
|
||||
|
||||
/**
|
||||
* Samples for Jobs ListCredentials.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListCredentials.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsListCredentials.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsListCredentials.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ContactDetails;
|
||||
import com.azure.resourcemanager.databox.models.JobResource;
|
||||
|
@ -7,10 +8,13 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Update. */
|
||||
/**
|
||||
* Samples for Jobs Update.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatch.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatch.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsPatch.
|
||||
|
@ -18,35 +22,20 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsPatch(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
JobResource resource =
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", "details", com.azure.core.util.Context.NONE)
|
||||
.getValue();
|
||||
resource
|
||||
.update()
|
||||
.withDetails(
|
||||
new UpdateJobDetails()
|
||||
.withContactDetails(
|
||||
new ContactDetails()
|
||||
.withContactName("XXXX XXXX")
|
||||
.withPhone("0000000000")
|
||||
.withPhoneExtension("")
|
||||
.withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
JobResource resource = manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1",
|
||||
"details", com.azure.core.util.Context.NONE).getValue();
|
||||
resource.update()
|
||||
.withDetails(new UpdateJobDetails()
|
||||
.withContactDetails(new ContactDetails().withContactName("XXXX XXXX").withPhone("0000000000")
|
||||
.withPhoneExtension("").withEmailList(Arrays.asList("xxxx@xxxx.xxx")))
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL)))
|
||||
.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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.JobResource;
|
||||
import com.azure.resourcemanager.databox.models.KekType;
|
||||
import com.azure.resourcemanager.databox.models.KeyEncryptionKey;
|
||||
|
@ -5,10 +6,13 @@ import com.azure.resourcemanager.databox.models.UpdateJobDetails;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Update. */
|
||||
/**
|
||||
* Samples for Jobs Update.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchCmk.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchCmk.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsPatchCmk.
|
||||
|
@ -16,25 +20,15 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsPatchCmk(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
JobResource resource =
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", null, com.azure.core.util.Context.NONE)
|
||||
.getValue();
|
||||
resource
|
||||
.update()
|
||||
.withDetails(
|
||||
new UpdateJobDetails()
|
||||
.withKeyEncryptionKey(
|
||||
new KeyEncryptionKey()
|
||||
.withKekType(KekType.CUSTOMER_MANAGED)
|
||||
.withKekUrl("https://xxx.xxx.xx")
|
||||
.withKekVaultResourceId(
|
||||
JobResource resource = manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1",
|
||||
null, com.azure.core.util.Context.NONE).getValue();
|
||||
resource.update().withDetails(new UpdateJobDetails().withKeyEncryptionKey(new KeyEncryptionKey()
|
||||
.withKekType(KekType.CUSTOMER_MANAGED).withKekUrl("https://xxx.xxx.xx").withKekVaultResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.KeyVault/vaults/YourKeyVaultName")))
|
||||
.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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.IdentityProperties;
|
||||
import com.azure.resourcemanager.databox.models.JobResource;
|
||||
import com.azure.resourcemanager.databox.models.KekType;
|
||||
|
@ -9,10 +10,13 @@ import com.azure.resourcemanager.databox.models.UserAssignedProperties;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/** Samples for Jobs Update. */
|
||||
/**
|
||||
* Samples for Jobs Update.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/JobsPatchSystemAssignedToUserAssigned.json
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/
|
||||
* JobsPatchSystemAssignedToUserAssigned.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: JobsPatchSystemAssignedToUserAssigned.
|
||||
|
@ -20,39 +24,23 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsPatchSystemAssignedToUserAssigned(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
JobResource resource =
|
||||
manager
|
||||
.jobs()
|
||||
.getByResourceGroupWithResponse(
|
||||
"YourResourceGroupName", "TestJobName1", null, com.azure.core.util.Context.NONE)
|
||||
.getValue();
|
||||
resource
|
||||
.update()
|
||||
.withIdentity(
|
||||
new ResourceIdentity()
|
||||
.withType("SystemAssigned,UserAssigned")
|
||||
.withUserAssignedIdentities(
|
||||
mapOf(
|
||||
JobResource resource = manager.jobs().getByResourceGroupWithResponse("YourResourceGroupName", "TestJobName1",
|
||||
null, com.azure.core.util.Context.NONE).getValue();
|
||||
resource.update().withIdentity(new ResourceIdentity().withType("SystemAssigned,UserAssigned")
|
||||
.withUserAssignedIdentities(mapOf(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity",
|
||||
new UserAssignedIdentity())))
|
||||
.withDetails(
|
||||
new UpdateJobDetails()
|
||||
.withKeyEncryptionKey(
|
||||
new KeyEncryptionKey()
|
||||
.withDetails(new UpdateJobDetails().withKeyEncryptionKey(new KeyEncryptionKey()
|
||||
.withKekType(KekType.CUSTOMER_MANAGED)
|
||||
.withIdentityProperties(
|
||||
new IdentityProperties()
|
||||
.withType("UserAssigned")
|
||||
.withUserAssigned(
|
||||
new UserAssignedProperties()
|
||||
.withResourceId(
|
||||
.withIdentityProperties(new IdentityProperties().withType("UserAssigned")
|
||||
.withUserAssigned(new UserAssignedProperties().withResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity")))
|
||||
.withKekUrl("https://xxx.xxx.xx")
|
||||
.withKekVaultResourceId(
|
||||
.withKekUrl("https://xxx.xxx.xx").withKekVaultResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.KeyVault/vaults/YourKeyVaultName")))
|
||||
.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-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.MarkDevicesShippedRequest;
|
||||
import com.azure.resourcemanager.databox.models.PackageCarrierInfo;
|
||||
|
||||
/** Samples for Jobs MarkDevicesShipped. */
|
||||
/**
|
||||
* Samples for Jobs MarkDevicesShipped.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/MarkDevicesShipped.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/MarkDevicesShipped.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: MarkDevicesShipped.
|
||||
|
@ -12,13 +16,8 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void markDevicesShipped(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.markDevicesShippedWithResponse(
|
||||
"TestJobName1",
|
||||
"YourResourceGroupName",
|
||||
new MarkDevicesShippedRequest()
|
||||
.withDeliverToDcPackageDetails(
|
||||
manager.jobs().markDevicesShippedWithResponse("TestJobName1", "YourResourceGroupName",
|
||||
new MarkDevicesShippedRequest().withDeliverToDcPackageDetails(
|
||||
new PackageCarrierInfo().withCarrierName("testCarrier").withTrackingId("000000")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,7 +1,11 @@
|
|||
/** Samples for Operations List. */
|
||||
|
||||
/**
|
||||
* Samples for Operations List.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/OperationsGet.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/OperationsGet.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: OperationsGet.
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest;
|
||||
import com.azure.resourcemanager.databox.models.RegionConfigurationRequest;
|
||||
|
||||
/** Samples for Service RegionConfiguration. */
|
||||
/**
|
||||
* Samples for Service RegionConfiguration.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfiguration.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfiguration.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: RegionConfiguration.
|
||||
|
@ -12,12 +16,8 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void regionConfiguration(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.regionConfigurationWithResponse(
|
||||
"westus",
|
||||
new RegionConfigurationRequest()
|
||||
.withScheduleAvailabilityRequest(
|
||||
manager.services().regionConfigurationWithResponse("westus",
|
||||
new RegionConfigurationRequest().withScheduleAvailabilityRequest(
|
||||
new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.DataBoxScheduleAvailabilityRequest;
|
||||
import com.azure.resourcemanager.databox.models.RegionConfigurationRequest;
|
||||
|
||||
/** Samples for Service RegionConfigurationByResourceGroup. */
|
||||
/**
|
||||
* Samples for Service RegionConfigurationByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/RegionConfigurationByResourceGroup.json
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/
|
||||
* RegionConfigurationByResourceGroup.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: RegionConfigurationByResourceGroup.
|
||||
|
@ -12,13 +16,8 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void regionConfigurationByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.regionConfigurationByResourceGroupWithResponse(
|
||||
"YourResourceGroupName",
|
||||
"westus",
|
||||
new RegionConfigurationRequest()
|
||||
.withScheduleAvailabilityRequest(
|
||||
manager.services().regionConfigurationByResourceGroupWithResponse("YourResourceGroupName", "westus",
|
||||
new RegionConfigurationRequest().withScheduleAvailabilityRequest(
|
||||
new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,12 +1,16 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.ShippingAddress;
|
||||
import com.azure.resourcemanager.databox.models.SkuName;
|
||||
import com.azure.resourcemanager.databox.models.ValidateAddress;
|
||||
|
||||
/** Samples for Service ValidateAddress. */
|
||||
/**
|
||||
* Samples for Service ValidateAddress.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateAddressPost.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateAddressPost.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: ValidateAddressPost.
|
||||
|
@ -14,22 +18,11 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void validateAddressPost(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.validateAddressWithResponse(
|
||||
"westus",
|
||||
new ValidateAddress()
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDeviceType(SkuName.DATA_BOX),
|
||||
manager.services().validateAddressWithResponse("westus",
|
||||
new ValidateAddress().withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX").withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL)).withDeviceType(SkuName.DATA_BOX),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.CreateJobValidations;
|
||||
import com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest;
|
||||
|
@ -16,10 +17,13 @@ import com.azure.resourcemanager.databox.models.TransportShipmentTypes;
|
|||
import com.azure.resourcemanager.databox.models.ValidateAddress;
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Samples for Service ValidateInputs. */
|
||||
/**
|
||||
* Samples for Service ValidateInputs.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputs.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputs.json
|
||||
*/
|
||||
/**
|
||||
* Sample code: ValidateInputs.
|
||||
|
@ -27,54 +31,25 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void validateInputs(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.validateInputsWithResponse(
|
||||
"westus",
|
||||
new CreateJobValidations()
|
||||
.withIndividualRequestDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataTransferDetailsValidationRequest()
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
manager.services().validateInputsWithResponse("westus", new CreateJobValidations().withIndividualRequestDetails(
|
||||
Arrays.asList(new DataTransferDetailsValidationRequest().withDataImportDetails(Arrays
|
||||
.asList(new DataImportDetails().withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE),
|
||||
.withDeviceType(SkuName.DATA_BOX).withTransferType(TransferType.IMPORT_TO_AZURE),
|
||||
new ValidateAddress()
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX")
|
||||
.withCountry("XX").withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
|
||||
.withDeviceType(SkuName.DATA_BOX).withTransportPreferences(
|
||||
new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
|
||||
new SubscriptionIsAllowedToCreateJobValidationRequest(),
|
||||
new SkuAvailabilityValidationRequest()
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withCountry("XX")
|
||||
.withLocation("westus"),
|
||||
new SkuAvailabilityValidationRequest().withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE).withCountry("XX").withLocation("westus"),
|
||||
new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.withPreference(
|
||||
new Preferences()
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(
|
||||
TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withPreference(new Preferences().withTransportPreferences(
|
||||
new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withDeviceType(SkuName.DATA_BOX))),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
import com.azure.resourcemanager.databox.models.AddressType;
|
||||
import com.azure.resourcemanager.databox.models.CreateJobValidations;
|
||||
import com.azure.resourcemanager.databox.models.CreateOrderLimitForSubscriptionValidationRequest;
|
||||
|
@ -16,10 +17,14 @@ import com.azure.resourcemanager.databox.models.TransportShipmentTypes;
|
|||
import com.azure.resourcemanager.databox.models.ValidateAddress;
|
||||
import java.util.Arrays;
|
||||
|
||||
/** Samples for Service ValidateInputsByResourceGroup. */
|
||||
/**
|
||||
* Samples for Service ValidateInputsByResourceGroup.
|
||||
*/
|
||||
public final class Main {
|
||||
/*
|
||||
* x-ms-original-file: specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputsByResourceGroup.json
|
||||
* x-ms-original-file:
|
||||
* specification/databox/resource-manager/Microsoft.DataBox/stable/2022-12-01/examples/ValidateInputsByResourceGroup
|
||||
* .json
|
||||
*/
|
||||
/**
|
||||
* Sample code: ValidateInputsByResourceGroup.
|
||||
|
@ -27,55 +32,26 @@ public final class Main {
|
|||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void validateInputsByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.validateInputsByResourceGroupWithResponse(
|
||||
"YourResourceGroupName",
|
||||
"westus",
|
||||
new CreateJobValidations()
|
||||
.withIndividualRequestDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataTransferDetailsValidationRequest()
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
manager.services().validateInputsByResourceGroupWithResponse("YourResourceGroupName", "westus",
|
||||
new CreateJobValidations().withIndividualRequestDetails(Arrays.asList(
|
||||
new DataTransferDetailsValidationRequest().withDataImportDetails(Arrays
|
||||
.asList(new DataImportDetails().withAccountDetails(new StorageAccountDetails().withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE),
|
||||
.withDeviceType(SkuName.DATA_BOX).withTransferType(TransferType.IMPORT_TO_AZURE),
|
||||
new ValidateAddress()
|
||||
.withShippingAddress(
|
||||
new ShippingAddress()
|
||||
.withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX")
|
||||
.withCity("XXXX XXXX")
|
||||
.withStateOrProvince("XX")
|
||||
.withCountry("XX")
|
||||
.withPostalCode("fakeTokenPlaceholder")
|
||||
.withCompanyName("XXXX XXXX")
|
||||
.withShippingAddress(new ShippingAddress().withStreetAddress1("XXXX XXXX")
|
||||
.withStreetAddress2("XXXX XXXX").withCity("XXXX XXXX").withStateOrProvince("XX")
|
||||
.withCountry("XX").withPostalCode("fakeTokenPlaceholder").withCompanyName("XXXX XXXX")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
|
||||
.withDeviceType(SkuName.DATA_BOX).withTransportPreferences(
|
||||
new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)),
|
||||
new SubscriptionIsAllowedToCreateJobValidationRequest(),
|
||||
new SkuAvailabilityValidationRequest()
|
||||
.withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE)
|
||||
.withCountry("XX")
|
||||
.withLocation("westus"),
|
||||
new SkuAvailabilityValidationRequest().withDeviceType(SkuName.DATA_BOX)
|
||||
.withTransferType(TransferType.IMPORT_TO_AZURE).withCountry("XX").withLocation("westus"),
|
||||
new CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.withPreference(
|
||||
new Preferences()
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(
|
||||
TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withPreference(new Preferences().withTransportPreferences(
|
||||
new TransportPreferences().withPreferredShipmentType(TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withDeviceType(SkuName.DATA_BOX))),
|
||||
com.azure.core.util.Context.NONE);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.3/sdk/databox/azure-resourcemanager-databox/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-databox_1.0.0-beta.4/sdk/databox/azure-resourcemanager-databox/README.md"}
|
Загрузка…
Ссылка в новой задаче