SharedDirectoryArgs

data class SharedDirectoryArgs(val directoryId: Output<String>? = null, val method: Output<String>? = null, val notes: Output<String>? = null, val target: Output<SharedDirectoryTargetArgs>? = null) : ConvertibleToJava<SharedDirectoryArgs>

Manages a directory in your account (directory owner) shared with another account (directory consumer).

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.directoryservice.Directory;
import com.pulumi.aws.directoryservice.DirectoryArgs;
import com.pulumi.aws.directoryservice.inputs.DirectoryVpcSettingsArgs;
import com.pulumi.aws.directoryservice.SharedDirectory;
import com.pulumi.aws.directoryservice.SharedDirectoryArgs;
import com.pulumi.aws.directoryservice.inputs.SharedDirectoryTargetArgs;
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 exampleDirectory = new Directory("exampleDirectory", DirectoryArgs.builder()
.name("tf-example")
.password("SuperSecretPassw0rd")
.type("MicrosoftAD")
.edition("Standard")
.vpcSettings(DirectoryVpcSettingsArgs.builder()
.vpcId(aws_vpc.example().id())
.subnetIds(aws_subnet.example().stream().map(element -> element.id()).collect(toList()))
.build())
.build());
var exampleSharedDirectory = new SharedDirectory("exampleSharedDirectory", SharedDirectoryArgs.builder()
.directoryId(exampleDirectory.id())
.notes("You wanna have a catch?")
.target(SharedDirectoryTargetArgs.builder()
.id(data.aws_caller_identity().receiver().account_id())
.build())
.build());
}
}

Import

Directory Service Shared Directories can be imported using the owner directory ID/shared directory ID, e.g.,

$ pulumi import aws:directoryservice/sharedDirectory:SharedDirectory example d-1234567890/d-9267633ece

Constructors

Link copied to clipboard
constructor(directoryId: Output<String>? = null, method: Output<String>? = null, notes: Output<String>? = null, target: Output<SharedDirectoryTargetArgs>? = null)

Properties

Link copied to clipboard
val directoryId: Output<String>? = null

Identifier of the Managed Microsoft AD directory that you want to share with other accounts.

Link copied to clipboard
val method: Output<String>? = null

Method used when sharing a directory. Valid values are ORGANIZATIONS and HANDSHAKE. Default is HANDSHAKE.

Link copied to clipboard
val notes: Output<String>? = null

Message sent by the directory owner to the directory consumer to help the directory consumer administrator determine whether to approve or reject the share invitation.

Link copied to clipboard
val target: Output<SharedDirectoryTargetArgs>? = null

Identifier for the directory consumer account with whom the directory is to be shared. See below. The following arguments are optional:

Functions

Link copied to clipboard
open override fun toJava(): SharedDirectoryArgs