SharedDirectory

class SharedDirectory : KotlinCustomResource

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

Properties

Link copied to clipboard
val directoryId: Output<String>

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

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

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

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

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Identifier of the directory that is stored in the directory consumer account that corresponds to the shared directory in the owner account.

Link copied to clipboard

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

Link copied to clipboard
val urn: Output<String>