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

com.pulumi.alicloud.cloudsso.UserAttachment 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.cloudsso;

import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.cloudsso.UserAttachmentArgs;
import com.pulumi.alicloud.cloudsso.inputs.UserAttachmentState;
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 javax.annotation.Nullable;

/**
 * Provides a Cloud SSO User Attachment resource.
 * 
 * For information about Cloud SSO User Attachment and how to use it, see [What is User Attachment](https://www.alibabacloud.com/help/en/cloudsso/latest/api-cloudsso-2021-05-15-addusertogroup).
 * 
 * > **NOTE:** Available since v1.141.0.
 * 
 * > **NOTE:** Cloud SSO Only Support `cn-shanghai` And `us-west-1` Region
 * 
 * ## Import
 * 
 * Cloud SSO User Attachment can be imported using the id, e.g.
 * 
 * ```sh
 * $ pulumi import alicloud:cloudsso/userAttachment:UserAttachment example <directory_id>:<group_id>:<user_id>
 * ```
 * 
 */
@ResourceType(type="alicloud:cloudsso/userAttachment:UserAttachment")
public class UserAttachment extends com.pulumi.resources.CustomResource {
    /**
     * The ID of the Directory.
     * 
     */
    @Export(name="directoryId", refs={String.class}, tree="[0]")
    private Output directoryId;

    /**
     * @return The ID of the Directory.
     * 
     */
    public Output directoryId() {
        return this.directoryId;
    }
    /**
     * The Group ID.
     * 
     */
    @Export(name="groupId", refs={String.class}, tree="[0]")
    private Output groupId;

    /**
     * @return The Group ID.
     * 
     */
    public Output groupId() {
        return this.groupId;
    }
    /**
     * The User ID.
     * 
     */
    @Export(name="userId", refs={String.class}, tree="[0]")
    private Output userId;

    /**
     * @return The User ID.
     * 
     */
    public Output userId() {
        return this.userId;
    }

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

    private UserAttachment(java.lang.String name, Output id, @Nullable UserAttachmentState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("alicloud:cloudsso/userAttachment:UserAttachment", name, state, makeResourceOptions(options, id), false);
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy