com.pulumi.azurenative.databox.Job Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.databox;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.databox.JobArgs;
import com.pulumi.azurenative.databox.outputs.CloudErrorResponse;
import com.pulumi.azurenative.databox.outputs.DataBoxCustomerDiskJobDetailsResponse;
import com.pulumi.azurenative.databox.outputs.DataBoxDiskJobDetailsResponse;
import com.pulumi.azurenative.databox.outputs.DataBoxHeavyJobDetailsResponse;
import com.pulumi.azurenative.databox.outputs.DataBoxJobDetailsResponse;
import com.pulumi.azurenative.databox.outputs.JobDeliveryInfoResponse;
import com.pulumi.azurenative.databox.outputs.ResourceIdentityResponse;
import com.pulumi.azurenative.databox.outputs.SkuResponse;
import com.pulumi.azurenative.databox.outputs.SystemDataResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Job Resource.
* Azure REST API version: 2022-12-01. Prior API version in Azure Native 1.x: 2020-11-01.
*
* Other available API versions: 2019-09-01, 2023-03-01, 2023-12-01, 2024-02-01-preview, 2024-03-01-preview.
*
* ## Example Usage
* ### JobsCreate
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.databox.Job;
* import com.pulumi.azurenative.databox.JobArgs;
* import com.pulumi.azurenative.databox.inputs.SkuArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var job = new Job("job", JobArgs.builder()
* .details(DataBoxCustomerDiskJobDetailsArgs.builder()
* .contactDetails(ContactDetailsArgs.builder()
* .contactName("XXXX XXXX")
* .emailList("xxxx}{@literal @}{@code xxxx.xxx")
* .phone("0000000000")
* .phoneExtension("")
* .build())
* .dataImportDetails(DataImportDetailsArgs.builder()
* .accountDetails(StorageAccountDetailsArgs.builder()
* .dataAccountType("StorageAccount")
* .storageAccountId("/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")
* .build())
* .build())
* .jobDetailsType("DataBox")
* .shippingAddress(ShippingAddressArgs.builder()
* .addressType("Commercial")
* .city("XXXX XXXX")
* .companyName("XXXX XXXX")
* .country("XX")
* .postalCode("00000")
* .stateOrProvince("XX")
* .streetAddress1("XXXX XXXX")
* .streetAddress2("XXXX XXXX")
* .build())
* .build())
* .jobName("TestJobName1")
* .location("westus")
* .resourceGroupName("YourResourceGroupName")
* .sku(SkuArgs.builder()
* .name("DataBox")
* .build())
* .transferType("ImportToAzure")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
* ### JobsCreateDevicePassword
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.databox.Job;
* import com.pulumi.azurenative.databox.JobArgs;
* import com.pulumi.azurenative.databox.inputs.SkuArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var job = new Job("job", JobArgs.builder()
* .details(DataBoxCustomerDiskJobDetailsArgs.builder()
* .contactDetails(ContactDetailsArgs.builder()
* .contactName("XXXX XXXX")
* .emailList("xxxx}{@literal @}{@code xxxx.xxx")
* .phone("0000000000")
* .phoneExtension("")
* .build())
* .dataImportDetails(DataImportDetailsArgs.builder()
* .accountDetails(StorageAccountDetailsArgs.builder()
* .dataAccountType("StorageAccount")
* .sharePassword("")
* .storageAccountId("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")
* .build())
* .build())
* .devicePassword("")
* .jobDetailsType("DataBox")
* .shippingAddress(ShippingAddressArgs.builder()
* .addressType("Commercial")
* .city("XXXX XXXX")
* .companyName("XXXX XXXX")
* .country("XX")
* .postalCode("00000")
* .stateOrProvince("XX")
* .streetAddress1("XXXX XXXX")
* .streetAddress2("XXXX XXXX")
* .build())
* .build())
* .jobName("TestJobName1")
* .location("westus")
* .resourceGroupName("YourResourceGroupName")
* .sku(SkuArgs.builder()
* .name("DataBox")
* .build())
* .transferType("ImportToAzure")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
* ### JobsCreateDoubleEncryption
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.databox.Job;
* import com.pulumi.azurenative.databox.JobArgs;
* import com.pulumi.azurenative.databox.inputs.SkuArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var job = new Job("job", JobArgs.builder()
* .details(DataBoxCustomerDiskJobDetailsArgs.builder()
* .contactDetails(ContactDetailsArgs.builder()
* .contactName("XXXX XXXX")
* .emailList("xxxx}{@literal @}{@code xxxx.xxx")
* .phone("0000000000")
* .phoneExtension("")
* .build())
* .dataImportDetails(DataImportDetailsArgs.builder()
* .accountDetails(StorageAccountDetailsArgs.builder()
* .dataAccountType("StorageAccount")
* .storageAccountId("/subscriptions/YourSubscriptionId/resourcegroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")
* .build())
* .build())
* .jobDetailsType("DataBox")
* .preferences(PreferencesArgs.builder()
* .encryptionPreferences(EncryptionPreferencesArgs.builder()
* .doubleEncryption("Enabled")
* .build())
* .build())
* .shippingAddress(ShippingAddressArgs.builder()
* .addressType("Commercial")
* .city("XXXX XXXX")
* .companyName("XXXX XXXX")
* .country("XX")
* .postalCode("00000")
* .stateOrProvince("XX")
* .streetAddress1("XXXX XXXX")
* .streetAddress2("XXXX XXXX")
* .build())
* .build())
* .jobName("TestJobName1")
* .location("westus")
* .resourceGroupName("YourResourceGroupName")
* .sku(SkuArgs.builder()
* .name("DataBox")
* .build())
* .transferType("ImportToAzure")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
* ### JobsCreateExport
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.databox.Job;
* import com.pulumi.azurenative.databox.JobArgs;
* import com.pulumi.azurenative.databox.inputs.SkuArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var job = new Job("job", JobArgs.builder()
* .details(DataBoxCustomerDiskJobDetailsArgs.builder()
* .contactDetails(ContactDetailsArgs.builder()
* .contactName("XXXX XXXX")
* .emailList("xxxx}{@literal @}{@code xxxx.xxx")
* .phone("0000000000")
* .phoneExtension("")
* .build())
* .dataExportDetails(DataExportDetailsArgs.builder()
* .accountDetails(StorageAccountDetailsArgs.builder()
* .dataAccountType("StorageAccount")
* .storageAccountId("/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Storage/storageAccounts/YourStorageAccountName")
* .build())
* .transferConfiguration(TransferConfigurationArgs.builder()
* .transferAllDetails(TransferConfigurationTransferAllDetailsArgs.builder()
* .include(TransferAllDetailsArgs.builder()
* .dataAccountType("StorageAccount")
* .transferAllBlobs(true)
* .transferAllFiles(true)
* .build())
* .build())
* .transferConfigurationType("TransferAll")
* .build())
* .build())
* .jobDetailsType("DataBox")
* .shippingAddress(ShippingAddressArgs.builder()
* .addressType("Commercial")
* .city("XXXX XXXX")
* .companyName("XXXX XXXX")
* .country("XX")
* .postalCode("00000")
* .stateOrProvince("XX")
* .streetAddress1("XXXX XXXX")
* .streetAddress2("XXXX XXXX")
* .build())
* .build())
* .jobName("TestJobName1")
* .location("westus")
* .resourceGroupName("YourResourceGroupName")
* .sku(SkuArgs.builder()
* .name("DataBox")
* .build())
* .transferType("ExportFromAzure")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:databox:Job TestJobName1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}
* ```
*
*/
@ResourceType(type="azure-native:databox:Job")
public class Job extends com.pulumi.resources.CustomResource {
/**
* Reason for cancellation.
*
*/
@Export(name="cancellationReason", refs={String.class}, tree="[0]")
private Output cancellationReason;
/**
* @return Reason for cancellation.
*
*/
public Output cancellationReason() {
return this.cancellationReason;
}
/**
* Delivery Info of Job.
*
*/
@Export(name="deliveryInfo", refs={JobDeliveryInfoResponse.class}, tree="[0]")
private Output* @Nullable */ JobDeliveryInfoResponse> deliveryInfo;
/**
* @return Delivery Info of Job.
*
*/
public Output> deliveryInfo() {
return Codegen.optional(this.deliveryInfo);
}
/**
* Delivery type of Job.
*
*/
@Export(name="deliveryType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> deliveryType;
/**
* @return Delivery type of Job.
*
*/
public Output> deliveryType() {
return Codegen.optional(this.deliveryType);
}
/**
* Details of a job run. This field will only be sent for expand details filter.
*
*/
@Export(name="details", refs={Object.class}, tree="[0]")
private Output* @Nullable */ Object> details;
/**
* @return Details of a job run. This field will only be sent for expand details filter.
*
*/
public Output> details() {
return Codegen.optional(this.details);
}
/**
* Top level error for the job.
*
*/
@Export(name="error", refs={CloudErrorResponse.class}, tree="[0]")
private Output error;
/**
* @return Top level error for the job.
*
*/
public Output error() {
return this.error;
}
/**
* Msi identity of the resource
*
*/
@Export(name="identity", refs={ResourceIdentityResponse.class}, tree="[0]")
private Output* @Nullable */ ResourceIdentityResponse> identity;
/**
* @return Msi identity of the resource
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Describes whether the job is cancellable or not.
*
*/
@Export(name="isCancellable", refs={Boolean.class}, tree="[0]")
private Output isCancellable;
/**
* @return Describes whether the job is cancellable or not.
*
*/
public Output isCancellable() {
return this.isCancellable;
}
/**
* Flag to indicate cancellation of scheduled job.
*
*/
@Export(name="isCancellableWithoutFee", refs={Boolean.class}, tree="[0]")
private Output isCancellableWithoutFee;
/**
* @return Flag to indicate cancellation of scheduled job.
*
*/
public Output isCancellableWithoutFee() {
return this.isCancellableWithoutFee;
}
/**
* Describes whether the job is deletable or not.
*
*/
@Export(name="isDeletable", refs={Boolean.class}, tree="[0]")
private Output isDeletable;
/**
* @return Describes whether the job is deletable or not.
*
*/
public Output isDeletable() {
return this.isDeletable;
}
/**
* Is Prepare To Ship Enabled on this job
*
*/
@Export(name="isPrepareToShipEnabled", refs={Boolean.class}, tree="[0]")
private Output isPrepareToShipEnabled;
/**
* @return Is Prepare To Ship Enabled on this job
*
*/
public Output isPrepareToShipEnabled() {
return this.isPrepareToShipEnabled;
}
/**
* Describes whether the shipping address is editable or not.
*
*/
@Export(name="isShippingAddressEditable", refs={Boolean.class}, tree="[0]")
private Output isShippingAddressEditable;
/**
* @return Describes whether the shipping address is editable or not.
*
*/
public Output isShippingAddressEditable() {
return this.isShippingAddressEditable;
}
/**
* The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.
*
*/
public Output location() {
return this.location;
}
/**
* Name of the object.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Name of the object.
*
*/
public Output name() {
return this.name;
}
/**
* The Editable status for Reverse Shipping Address and Contact Info
*
*/
@Export(name="reverseShippingDetailsUpdate", refs={String.class}, tree="[0]")
private Output reverseShippingDetailsUpdate;
/**
* @return The Editable status for Reverse Shipping Address and Contact Info
*
*/
public Output reverseShippingDetailsUpdate() {
return this.reverseShippingDetailsUpdate;
}
/**
* The Editable status for Reverse Transport preferences
*
*/
@Export(name="reverseTransportPreferenceUpdate", refs={String.class}, tree="[0]")
private Output reverseTransportPreferenceUpdate;
/**
* @return The Editable status for Reverse Transport preferences
*
*/
public Output reverseTransportPreferenceUpdate() {
return this.reverseTransportPreferenceUpdate;
}
/**
* The sku type.
*
*/
@Export(name="sku", refs={SkuResponse.class}, tree="[0]")
private Output sku;
/**
* @return The sku type.
*
*/
public Output sku() {
return this.sku;
}
/**
* Time at which the job was started in UTC ISO 8601 format.
*
*/
@Export(name="startTime", refs={String.class}, tree="[0]")
private Output startTime;
/**
* @return Time at which the job was started in UTC ISO 8601 format.
*
*/
public Output startTime() {
return this.startTime;
}
/**
* Name of the stage which is in progress.
*
*/
@Export(name="status", refs={String.class}, tree="[0]")
private Output status;
/**
* @return Name of the stage which is in progress.
*
*/
public Output status() {
return this.status;
}
/**
* Metadata pertaining to creation and last modification of the resource.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return Metadata pertaining to creation and last modification of the resource.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Type of the data transfer.
*
*/
@Export(name="transferType", refs={String.class}, tree="[0]")
private Output transferType;
/**
* @return Type of the data transfer.
*
*/
public Output transferType() {
return this.transferType;
}
/**
* Type of the object.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Type of the object.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Job(java.lang.String name) {
this(name, JobArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Job(java.lang.String name, JobArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Job(java.lang.String name, JobArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:databox:Job", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Job(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:databox:Job", name, null, makeResourceOptions(options, id), false);
}
private static JobArgs makeArgs(JobArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? JobArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:databox/v20180101:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20190901:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20200401:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20201101:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20210301:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20210501:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20210801preview:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20211201:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20220201:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20220901:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20221001:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20221201:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20230301:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20231201:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20240201preview:Job").build()),
Output.of(Alias.builder().type("azure-native:databox/v20240301preview:Job").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Job get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Job(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy