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

com.pulumi.alicloud.cas.ServiceCertificate Maven / Gradle / Ivy

There is a newer version: 3.63.0-alpha.1727424957
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.alicloud.cas;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cas.ServiceCertificateArgs;
import com.pulumi.alicloud.cas.inputs.ServiceCertificateState;
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.Optional;
import javax.annotation.Nullable;

/**
 * Provides a SSL Certificates Certificate resource.
 * 
 * For information about SSL Certificates Certificate and how to use it, see [What is Certificate](https://www.alibabacloud.com/help/product/28533.html).
 * 
 * > **NOTE:** Available since v1.129.0.
 * 
 * ## Example Usage
 * 
 * Basic Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.random.integer;
 * import com.pulumi.random.IntegerArgs;
 * import com.pulumi.alicloud.cas.ServiceCertificate;
 * import com.pulumi.alicloud.cas.ServiceCertificateArgs;
 * 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 default_ = new Integer("default", IntegerArgs.builder()
 *             .min(10000)
 *             .max(99999)
 *             .build());
 * 
 *         var defaultServiceCertificate = new ServiceCertificate("defaultServiceCertificate", ServiceCertificateArgs.builder()
 *             .certificateName(String.format("terraform-example-%s", default_.result()))
 *             .cert("""
 * -----BEGIN CERTIFICATE-----
 * MIIDeDCCAmCgAwIBAgIEN3ZT6zANBgkqhkiG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imp05PaPH09deXLZu8LRrKRZFy9qLW5R6Swv7nzxckOAqDk
 * TTc40xwvQROekWUyxeJL7xaHuylUHE0bxsiIfx5bZsBizRjprIwGlj85CSPuTZyP
 * DPfaiZAN/61h5HNAnxLltOZfqabKYYw7l9LBDg==
 * -----END CERTIFICATE-----
 *             """)
 *             .key("""
 * -----BEGIN PRIVATE KEY-----
 * MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDOST00lQfs8tJA
 * rhFGsZBjl1Wx+2SGcqH0eEjrKueWjBYgM9LU9kc5T/mBDvE9Q8Z0pBXlLvHzBE6c
 * BpcSKbE3gZ1DDbmkaFEm+XCZ71/MkmJJ7qUbj00LGa4GIR0kDM8ppM+krVwbV/VO
 * p2AJ8dEcAvonFvfKUcbYuVM0UteKS5tSLlFPr/0LymyvvXdmbge94Ij9zHRZ2Bn5
 * +axz1+2uQgHUN3JXWRDnWbyvasuLcntoLmCAY6J7H9WUZJ3h7pI5Aul1AR0Nuh20
 * 4nguBWT5qsU0IyKdRYg48YXNeF2bqWyw9uHgw4GvPxz8z1NwXiGgyfn+j/2OiFkh
 * n8M69e1lAgMBAAECggEAevPgTTT+0lYwx2h416ACJboP09O5KQGuUl5XaAPcoTjB
 * /1OkOFbKQPjQCAJ1+0QoR2F9w2plv6kziX/MD4FWJXVV3J+TpNCgfhBy8u1gNjiR
 * 6Osa8gBJtXIK7ZBTJCeWWoXnVYoWuh2FEupkLck6D+4eV6oy6x4u3QIo+6jc24n9
 * dIXQG6/v/Iao34kB0LUdp/4WNaUDvfI6NDhEwchpKE95dtWIDlIN/YhfiYAdjrnl
 * YmH2VDbAGgsdEiHP4wLZfjgsGPPDGS0+qBHoSiJGH0E6wWEZdAE4TsYGRFsO86n3
 * LfjEPFGfPlcnZe2cTTe3kmyKq/DTjxtu2rh3I8o2CQKBgQD/5Xe7cenaOBefzPlx
 * GOEsB+qv49UmzEPOXDNZe9hmAawuuuxPUM+xlE++P+mEgQm1LPT4WWgtFLPVuwmx
 * ncxt4CJNZh+ZGFyAZ4dm4M4ZhIBXNonyIP+yGyAJUUVF9Iy3TYcJNiGzv2Rx9JRQ
 * XWJMQnTDILmZbmU+ltTea7/zqwKBgQDOXqCqb17MuLt7OcKWSgthm79OlaOdzZvl
 * i9qU6VzZKG7Axc5gA9yq6tHp3vWPI4bNdvwqIIa/nzVILjGA5fcYFbRN+7gHwo8s
 * rNAgi5PAoKWqQRovyJRY9Eq/sn6l1jbJZAOUAMZMWDm8z89OqK7PNQSIAtfFSneo
 * 2QxJkGeTLwKBgGJkafBB8af9b1/7YWISLepPNPbihH/BhMThAMGEdAVs2TaymtA4
 * g1OFck/1pSVUtFXcbmjbf8ntruQcYbLQuNz6lFXsUXP9QPwCUrbE85ouL2bZSps2
 * AvsJoPzUKe2nBUAp6CUrkjPaAJYsc6ae8X/fAaRRfeu33ef9+OV4yrq3AoGAYFZo
 * ZmfrN2Kdkt7Z6dLTEVPlsMfGQ6pyNmxdM9rkzzNC0JcGymfDIb7RE35T3+hTy6La
 * AMiCXv3xn6qAzY2NFh87tpPlyymWMOLTnf3Kkcfszlfp45idOBGCu46V9NDVbppT
 * 2UmrSIR/H5dbTXsNcAlt/hhlpeInjhkU1VqmH10CgYEA7Kk+QhWq705SczpWjm5J
 * 9kHqfFzJLwAWNBduiia0WypgPhLe/4wT1rYQkBtKMVKrgFo7Cvi4YKlrtlDnXyeU
 * CIFqfEL5NriQelqrFsvgHsmD+MpvDoSWm5C8IrTubtlNyWUzXSVT4OIwzPobzPqG
 * LILJ+e7bLw8RrM0HfgFnl8c=
 * -----END PRIVATE KEY-----
 *             """)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * SSL Certificates Certificate can be imported using the id, e.g. * * ```sh * $ pulumi import alicloud:cas/serviceCertificate:ServiceCertificate example <id> * ``` * */ @ResourceType(type="alicloud:cas/serviceCertificate:ServiceCertificate") public class ServiceCertificate extends com.pulumi.resources.CustomResource { /** * Cert of the Certificate in which the Certificate will add. * */ @Export(name="cert", refs={String.class}, tree="[0]") private Output cert; /** * @return Cert of the Certificate in which the Certificate will add. * */ public Output cert() { return this.cert; } /** * Name of the Certificate. `certificate_name` must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported. * **NOTE:** One of `certificate_name` and `name` must be specified. * */ @Export(name="certificateName", refs={String.class}, tree="[0]") private Output certificateName; /** * @return Name of the Certificate. `certificate_name` must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported. * **NOTE:** One of `certificate_name` and `name` must be specified. * */ public Output certificateName() { return this.certificateName; } /** * Key of the Certificate in which the Certificate will add. * */ @Export(name="key", refs={String.class}, tree="[0]") private Output key; /** * @return Key of the Certificate in which the Certificate will add. * */ public Output key() { return this.key; } /** * The lang. * */ @Export(name="lang", refs={String.class}, tree="[0]") private Output lang; /** * @return The lang. * */ public Output> lang() { return Codegen.optional(this.lang); } /** * It has been deprecated from version 1.129.0 and using `certificate_name` instead. * * @deprecated * attribute 'name' has been deprecated from provider version 1.129.0 and it will be remove in the future version. Please use the new attribute 'certificate_name' instead. * */ @Deprecated /* attribute 'name' has been deprecated from provider version 1.129.0 and it will be remove in the future version. Please use the new attribute 'certificate_name' instead. */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return It has been deprecated from version 1.129.0 and using `certificate_name` instead. * */ public Output name() { return this.name; } /** * * @param name The _unique_ name of the resulting resource. */ public ServiceCertificate(java.lang.String name) { this(name, ServiceCertificateArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ServiceCertificate(java.lang.String name, ServiceCertificateArgs 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 ServiceCertificate(java.lang.String name, ServiceCertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cas/serviceCertificate:ServiceCertificate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ServiceCertificate(java.lang.String name, Output id, @Nullable ServiceCertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("alicloud:cas/serviceCertificate:ServiceCertificate", name, state, makeResourceOptions(options, id), false); } private static ServiceCertificateArgs makeArgs(ServiceCertificateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ServiceCertificateArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static ServiceCertificate get(java.lang.String name, Output id, @Nullable ServiceCertificateState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ServiceCertificate(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy