[Automation] Collect examples from azure-sdk-for-java#azure-resourcemanager-databox_1.0.0-beta.4
This commit is contained in:
Родитель
c97d5d3365
Коммит
f40519b87e
|
@ -1,26 +1,25 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @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,26 +1,24 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @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"),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,34 +1,30 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @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)),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,22 +1,21 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @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,53 +12,36 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
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(
|
||||
"/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,55 +12,37 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withSharePassword("fakeTokenPlaceholder")
|
||||
.withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withDevicePassword("fakeTokenPlaceholder"))
|
||||
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(
|
||||
"/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,57 +15,39 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.withPreferences(
|
||||
new Preferences()
|
||||
.withEncryptionPreferences(
|
||||
new EncryptionPreferences().withDoubleEncryption(DoubleEncryption.ENABLED))))
|
||||
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(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.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,63 +17,41 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.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(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
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()
|
||||
.withTransferConfigurationType(TransferConfigurationType.TRANSFER_ALL)
|
||||
.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,60 +14,39 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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(
|
||||
"/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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.withDataImportDetails(
|
||||
Arrays
|
||||
.asList(
|
||||
new DataImportDetails()
|
||||
.withAccountDetails(
|
||||
new StorageAccountDetails()
|
||||
.withStorageAccountId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")))))
|
||||
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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.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,11 +1,15 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsDelete(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
|
|
|
@ -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,17 +1,19 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @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,17 +1,19 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @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,17 +1,19 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @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,17 +1,19 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @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,17 +1,19 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @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,11 +1,15 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsList(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
|
|
|
@ -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,11 +1,15 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsListByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
|
|
|
@ -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,11 +1,15 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void jobsListCredentials(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
|
|
|
@ -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,46 +8,34 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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")
|
||||
.withAddressType(AddressType.COMMERCIAL)))
|
||||
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,36 +6,29 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.KeyVault/vaults/YourKeyVaultName")))
|
||||
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,50 +10,37 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity",
|
||||
new UserAssignedIdentity())))
|
||||
.withDetails(
|
||||
new UpdateJobDetails()
|
||||
.withKeyEncryptionKey(
|
||||
new KeyEncryptionKey()
|
||||
.withKekType(KekType.CUSTOMER_MANAGED)
|
||||
.withIdentityProperties(
|
||||
new IdentityProperties()
|
||||
.withType("UserAssigned")
|
||||
.withUserAssigned(
|
||||
new UserAssignedProperties()
|
||||
.withResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity")))
|
||||
.withKekUrl("https://xxx.xxx.xx")
|
||||
.withKekVaultResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.KeyVault/vaults/YourKeyVaultName")))
|
||||
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()
|
||||
.withKekType(KekType.CUSTOMER_MANAGED)
|
||||
.withIdentityProperties(new IdentityProperties().withType("UserAssigned")
|
||||
.withUserAssigned(new UserAssignedProperties().withResourceId(
|
||||
"/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testIdentity")))
|
||||
.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,25 +1,24 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void markDevicesShipped(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.jobs()
|
||||
.markDevicesShippedWithResponse(
|
||||
"TestJobName1",
|
||||
"YourResourceGroupName",
|
||||
new MarkDevicesShippedRequest()
|
||||
.withDeliverToDcPackageDetails(
|
||||
new PackageCarrierInfo().withCarrierName("testCarrier").withTrackingId("000000")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,11 +1,15 @@
|
|||
/** 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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void operationsGet(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
|
|
|
@ -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,24 +1,24 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void regionConfiguration(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.regionConfigurationWithResponse(
|
||||
"westus",
|
||||
new RegionConfigurationRequest()
|
||||
.withScheduleAvailabilityRequest(
|
||||
new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,25 +1,24 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @param manager Entry point to DataBoxManager.
|
||||
*/
|
||||
public static void regionConfigurationByResourceGroup(com.azure.resourcemanager.databox.DataBoxManager manager) {
|
||||
manager
|
||||
.services()
|
||||
.regionConfigurationByResourceGroupWithResponse(
|
||||
"YourResourceGroupName",
|
||||
"westus",
|
||||
new RegionConfigurationRequest()
|
||||
.withScheduleAvailabilityRequest(
|
||||
new DataBoxScheduleAvailabilityRequest().withStorageLocation("westus")),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,35 +1,28 @@
|
|||
|
||||
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.
|
||||
*
|
||||
*
|
||||
* @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),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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,66 +17,40 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.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 CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.withPreference(
|
||||
new Preferences()
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(
|
||||
TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withDeviceType(SkuName.DATA_BOX))),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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),
|
||||
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).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 CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.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,67 +17,42 @@ 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.
|
||||
*
|
||||
*
|
||||
* @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(
|
||||
"/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName"))))
|
||||
.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")
|
||||
.withAddressType(AddressType.COMMERCIAL))
|
||||
.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 CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.withPreference(
|
||||
new Preferences()
|
||||
.withTransportPreferences(
|
||||
new TransportPreferences()
|
||||
.withPreferredShipmentType(
|
||||
TransportShipmentTypes.MICROSOFT_MANAGED)))
|
||||
.withDeviceType(SkuName.DATA_BOX))),
|
||||
com.azure.core.util.Context.NONE);
|
||||
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),
|
||||
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).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 CreateOrderLimitForSubscriptionValidationRequest().withDeviceType(SkuName.DATA_BOX),
|
||||
new PreferencesValidationRequest()
|
||||
.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"}
|
Загрузка…
Ссылка в новой задаче