All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.devices.DpsCertificate Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.devices;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.devices.DpsCertificateArgs;
import com.pulumi.azurenative.devices.outputs.CertificatePropertiesResponse;
import com.pulumi.azurenative.devices.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.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * The X509 Certificate.
 * Azure REST API version: 2022-12-12. Prior API version in Azure Native 1.x: 2020-03-01.
 * 
 * Other available API versions: 2021-10-15, 2023-03-01-preview.
 * 
 * ## Example Usage
 * ### DPSCreateOrUpdateCertificate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.devices.DpsCertificate;
 * import com.pulumi.azurenative.devices.DpsCertificateArgs;
 * import com.pulumi.azurenative.devices.inputs.CertificatePropertiesArgs;
 * 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 {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var dpsCertificate = new DpsCertificate("dpsCertificate", DpsCertificateArgs.builder()
 *             .certificateName("cert")
 *             .properties(CertificatePropertiesArgs.builder()
 *                 .certificate("MA==")
 *                 .build())
 *             .provisioningServiceName("myFirstProvisioningService")
 *             .resourceGroupName("myResourceGroup")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:devices:DpsCertificate cert /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName} * ``` * */ @ResourceType(type="azure-native:devices:DpsCertificate") public class DpsCertificate extends com.pulumi.resources.CustomResource { /** * The entity tag. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return The entity tag. * */ public Output etag() { return this.etag; } /** * The name of the certificate. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the certificate. * */ public Output name() { return this.name; } /** * properties of a certificate * */ @Export(name="properties", refs={CertificatePropertiesResponse.class}, tree="[0]") private Output properties; /** * @return properties of a certificate * */ public Output properties() { return this.properties; } /** * 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 resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public DpsCertificate(java.lang.String name) { this(name, DpsCertificateArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DpsCertificate(java.lang.String name, DpsCertificateArgs 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 DpsCertificate(java.lang.String name, DpsCertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devices:DpsCertificate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DpsCertificate(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:devices:DpsCertificate", name, null, makeResourceOptions(options, id), false); } private static DpsCertificateArgs makeArgs(DpsCertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DpsCertificateArgs.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:devices/v20170821preview:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20171115:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20180122:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20200101:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20200301:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20200901preview:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20211015:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20220205:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20221212:DpsCertificate").build()), Output.of(Alias.builder().type("azure-native:devices/v20230301preview:DpsCertificate").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 DpsCertificate get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DpsCertificate(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy