com.pulumi.azurenative.importexport.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.importexport;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.importexport.JobArgs;
import com.pulumi.azurenative.importexport.outputs.IdentityDetailsResponse;
import com.pulumi.azurenative.importexport.outputs.JobDetailsResponse;
import com.pulumi.azurenative.importexport.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.Object;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Contains the job information.
* Azure REST API version: 2021-01-01. Prior API version in Azure Native 1.x: 2020-08-01.
*
* ## Example Usage
* ### Create export job
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.importexport.Job;
* import com.pulumi.azurenative.importexport.JobArgs;
* import com.pulumi.azurenative.importexport.inputs.JobDetailsArgs;
* import com.pulumi.azurenative.importexport.inputs.ExportArgs;
* import com.pulumi.azurenative.importexport.inputs.ReturnAddressArgs;
* import com.pulumi.azurenative.importexport.inputs.ReturnShippingArgs;
* 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()
* .jobName("myExportJob")
* .location("West US")
* .properties(JobDetailsArgs.builder()
* .backupDriveManifest(true)
* .diagnosticsPath("waimportexport")
* .export(ExportArgs.builder()
* .blobPathPrefix("/")
* .build())
* .jobType("Export")
* .logLevel("Verbose")
* .returnAddress(ReturnAddressArgs.builder()
* .city("Redmond")
* .countryOrRegion("USA")
* .email("Test}{@literal @}{@code contoso.com")
* .phone("4250000000")
* .postalCode("98007")
* .recipientName("Test")
* .stateOrProvince("wa")
* .streetAddress1("Street1")
* .streetAddress2("street2")
* .build())
* .returnShipping(ReturnShippingArgs.builder()
* .carrierAccountNumber("989ffff")
* .carrierName("FedEx")
* .build())
* .storageAccountId("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test")
* .build())
* .resourceGroupName("myResourceGroup")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
* ### Create import job
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.importexport.Job;
* import com.pulumi.azurenative.importexport.JobArgs;
* import com.pulumi.azurenative.importexport.inputs.JobDetailsArgs;
* import com.pulumi.azurenative.importexport.inputs.ReturnAddressArgs;
* import com.pulumi.azurenative.importexport.inputs.ReturnShippingArgs;
* 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()
* .jobName("myJob")
* .location("West US")
* .properties(JobDetailsArgs.builder()
* .backupDriveManifest(true)
* .diagnosticsPath("waimportexport")
* .driveList(DriveStatusArgs.builder()
* .bitLockerKey("238810-662376-448998-450120-652806-203390-606320-483076")
* .driveHeaderHash("0:1048576:FB6B6ED500D49DA6E0D723C98D42C657F2881CC13357C28DCECA6A524F1292501571A321238540E621AB5BD9C9A32637615919A75593E6CB5C1515DAE341CABF;135266304:143360:C957A189AFC38C4E80731252301EB91427CE55E61448FA3C73C6FDDE70ABBC197947EC8D0249A2C639BB10B95957D5820A4BE8DFBBF76FFFA688AE5CE0D42EC3")
* .driveId("9CA995BB")
* .manifestFile("\\8a0c23f7-14b7-470a-9633-fcd46590a1bc.manifest")
* .manifestHash("4228EC5D8E048CB9B515338C789314BE8D0B2FDBC7C7A0308E1C826242CDE74E")
* .build())
* .jobType("Import")
* .logLevel("Verbose")
* .returnAddress(ReturnAddressArgs.builder()
* .city("Redmond")
* .countryOrRegion("USA")
* .email("Test}{@literal @}{@code contoso.com")
* .phone("4250000000")
* .postalCode("98007")
* .recipientName("Test")
* .stateOrProvince("wa")
* .streetAddress1("Street1")
* .streetAddress2("street2")
* .build())
* .returnShipping(ReturnShippingArgs.builder()
* .carrierAccountNumber("989ffff")
* .carrierName("FedEx")
* .build())
* .storageAccountId("/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test")
* .build())
* .resourceGroupName("myResourceGroup")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:importexport:Job myJob /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ImportExport/jobs/{jobName}
* ```
*
*/
@ResourceType(type="azure-native:importexport:Job")
public class Job extends com.pulumi.resources.CustomResource {
/**
* Specifies the job identity details
*
*/
@Export(name="identity", refs={IdentityDetailsResponse.class}, tree="[0]")
private Output* @Nullable */ IdentityDetailsResponse> identity;
/**
* @return Specifies the job identity details
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Specifies the Azure location where the job is created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return Specifies the Azure location where the job is created.
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* Specifies the name of the job.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Specifies the name of the job.
*
*/
public Output name() {
return this.name;
}
/**
* Specifies the job properties
*
*/
@Export(name="properties", refs={JobDetailsResponse.class}, tree="[0]")
private Output properties;
/**
* @return Specifies the job properties
*
*/
public Output properties() {
return this.properties;
}
/**
* SystemData of ImportExport Jobs.
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return SystemData of ImportExport Jobs.
*
*/
public Output systemData() {
return this.systemData;
}
/**
* Specifies the tags that are assigned to the job.
*
*/
@Export(name="tags", refs={Object.class}, tree="[0]")
private Output* @Nullable */ Object> tags;
/**
* @return Specifies the tags that are assigned to the job.
*
*/
public Output> tags() {
return Codegen.optional(this.tags);
}
/**
* Specifies the type of the job resource.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Specifies the type of the job resource.
*
*/
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:importexport: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:importexport: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:importexport/v20161101:Job").build()),
Output.of(Alias.builder().type("azure-native:importexport/v20200801:Job").build()),
Output.of(Alias.builder().type("azure-native:importexport/v20210101: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