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

com.ovhcloud.pulumi.ovh.CloudProject.S3Credential Maven / Gradle / Ivy

There is a newer version: 1.1.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.ovhcloud.pulumi.ovh.CloudProject;

import com.ovhcloud.pulumi.ovh.CloudProject.S3CredentialArgs;
import com.ovhcloud.pulumi.ovh.CloudProject.inputs.S3CredentialState;
import com.ovhcloud.pulumi.ovh.Utilities;
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;

/**
 * Creates an S3 Credential for a user in a public cloud project.
 * 
 * ## Import
 * 
 * OVHcloud User S3 Credentials can be imported using the `service_name`, `user_id` and `access_key_id` of the credential, separated by "/" E.g.,
 * 
 * bash
 * 
 * ```sh
 * $ pulumi import ovh:CloudProject/s3Credential:S3Credential s3_credential service_name/user_id/access_key_id
 * ```
 * 
 */
@ResourceType(type="ovh:CloudProject/s3Credential:S3Credential")
public class S3Credential extends com.pulumi.resources.CustomResource {
    /**
     * the Access Key ID
     * 
     */
    @Export(name="accessKeyId", refs={String.class}, tree="[0]")
    private Output accessKeyId;

    /**
     * @return the Access Key ID
     * 
     */
    public Output accessKeyId() {
        return this.accessKeyId;
    }
    @Export(name="internalUserId", refs={String.class}, tree="[0]")
    private Output internalUserId;

    public Output internalUserId() {
        return this.internalUserId;
    }
    /**
     * (Sensitive) the Secret Access Key
     * 
     */
    @Export(name="secretAccessKey", refs={String.class}, tree="[0]")
    private Output secretAccessKey;

    /**
     * @return (Sensitive) the Secret Access Key
     * 
     */
    public Output secretAccessKey() {
        return this.secretAccessKey;
    }
    /**
     * The ID of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    @Export(name="serviceName", refs={String.class}, tree="[0]")
    private Output serviceName;

    /**
     * @return The ID of the public cloud project. If omitted,
     * the `OVH_CLOUD_PROJECT_SERVICE` environment variable is used.
     * 
     */
    public Output serviceName() {
        return this.serviceName;
    }
    /**
     * The ID of a public cloud project's user.
     * 
     */
    @Export(name="userId", refs={String.class}, tree="[0]")
    private Output userId;

    /**
     * @return The ID of a public cloud project's user.
     * 
     */
    public Output userId() {
        return this.userId;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public S3Credential(java.lang.String name) {
        this(name, S3CredentialArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public S3Credential(java.lang.String name, S3CredentialArgs 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 S3Credential(java.lang.String name, S3CredentialArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("ovh:CloudProject/s3Credential:S3Credential", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
    }

    private S3Credential(java.lang.String name, Output id, @Nullable S3CredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("ovh:CloudProject/s3Credential:S3Credential", name, state, makeResourceOptions(options, id), false);
    }

    private static S3CredentialArgs makeArgs(S3CredentialArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        if (options != null && options.getUrn().isPresent()) {
            return null;
        }
        return args == null ? S3CredentialArgs.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())
            .additionalSecretOutputs(List.of(
                "secretAccessKey"
            ))
            .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 S3Credential get(java.lang.String name, Output id, @Nullable S3CredentialState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new S3Credential(name, id, state, options);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy