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

com.pulumi.azurenative.sql.SyncMember Maven / Gradle / Ivy

There is a newer version: 2.78.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.pulumi.azurenative.sql;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.sql.SyncMemberArgs;
import com.pulumi.core.Alias;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An Azure SQL Database sync member.
 * Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
 * 
 * Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
 * 
 * ## Example Usage
 * ### Create a new sync member
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.SyncMember;
 * import com.pulumi.azurenative.sql.SyncMemberArgs;
 * 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 syncMember = new SyncMember("syncMember", SyncMemberArgs.builder()
 *             .databaseName("syncgroupcrud-7421")
 *             .databaseType("AzureSqlDatabase")
 *             .resourceGroupName("syncgroupcrud-65440")
 *             .serverName("syncgroupcrud-8475")
 *             .syncDirection("Bidirectional")
 *             .syncGroupName("syncgroupcrud-3187")
 *             .syncMemberAzureDatabaseResourceId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
 *             .syncMemberName("syncmembercrud-4879")
 *             .usePrivateLinkConnection(true)
 *             .userName("myUser")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Update a sync member * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.sql.SyncMember;
 * import com.pulumi.azurenative.sql.SyncMemberArgs;
 * 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 syncMember = new SyncMember("syncMember", SyncMemberArgs.builder()
 *             .databaseName("syncgroupcrud-7421")
 *             .databaseType("AzureSqlDatabase")
 *             .resourceGroupName("syncgroupcrud-65440")
 *             .serverName("syncgroupcrud-8475")
 *             .syncDirection("Bidirectional")
 *             .syncGroupName("syncgroupcrud-3187")
 *             .syncMemberAzureDatabaseResourceId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
 *             .syncMemberName("syncmembercrud-4879")
 *             .usePrivateLinkConnection(true)
 *             .userName("myUser")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:sql:SyncMember syncmembercrud-4879 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName} * ``` * */ @ResourceType(type="azure-native:sql:SyncMember") public class SyncMember extends com.pulumi.resources.CustomResource { /** * Database name of the member database in the sync member. * */ @Export(name="databaseName", refs={String.class}, tree="[0]") private Output databaseName; /** * @return Database name of the member database in the sync member. * */ public Output> databaseName() { return Codegen.optional(this.databaseName); } /** * Database type of the sync member. * */ @Export(name="databaseType", refs={String.class}, tree="[0]") private Output databaseType; /** * @return Database type of the sync member. * */ public Output> databaseType() { return Codegen.optional(this.databaseType); } /** * Resource name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name. * */ public Output name() { return this.name; } /** * Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. * */ @Export(name="privateEndpointName", refs={String.class}, tree="[0]") private Output privateEndpointName; /** * @return Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. * */ public Output privateEndpointName() { return this.privateEndpointName; } /** * Server name of the member database in the sync member * */ @Export(name="serverName", refs={String.class}, tree="[0]") private Output serverName; /** * @return Server name of the member database in the sync member * */ public Output> serverName() { return Codegen.optional(this.serverName); } /** * SQL Server database id of the sync member. * */ @Export(name="sqlServerDatabaseId", refs={String.class}, tree="[0]") private Output sqlServerDatabaseId; /** * @return SQL Server database id of the sync member. * */ public Output> sqlServerDatabaseId() { return Codegen.optional(this.sqlServerDatabaseId); } /** * ARM resource id of the sync agent in the sync member. * */ @Export(name="syncAgentId", refs={String.class}, tree="[0]") private Output syncAgentId; /** * @return ARM resource id of the sync agent in the sync member. * */ public Output> syncAgentId() { return Codegen.optional(this.syncAgentId); } /** * Sync direction of the sync member. * */ @Export(name="syncDirection", refs={String.class}, tree="[0]") private Output syncDirection; /** * @return Sync direction of the sync member. * */ public Output> syncDirection() { return Codegen.optional(this.syncDirection); } /** * ARM resource id of the sync member logical database, for sync members in Azure. * */ @Export(name="syncMemberAzureDatabaseResourceId", refs={String.class}, tree="[0]") private Output syncMemberAzureDatabaseResourceId; /** * @return ARM resource id of the sync member logical database, for sync members in Azure. * */ public Output> syncMemberAzureDatabaseResourceId() { return Codegen.optional(this.syncMemberAzureDatabaseResourceId); } /** * Sync state of the sync member. * */ @Export(name="syncState", refs={String.class}, tree="[0]") private Output syncState; /** * @return Sync state of the sync member. * */ public Output syncState() { return this.syncState; } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * Whether to use private link connection. * */ @Export(name="usePrivateLinkConnection", refs={Boolean.class}, tree="[0]") private Output usePrivateLinkConnection; /** * @return Whether to use private link connection. * */ public Output> usePrivateLinkConnection() { return Codegen.optional(this.usePrivateLinkConnection); } /** * User name of the member database in the sync member. * */ @Export(name="userName", refs={String.class}, tree="[0]") private Output userName; /** * @return User name of the member database in the sync member. * */ public Output> userName() { return Codegen.optional(this.userName); } /** * * @param name The _unique_ name of the resulting resource. */ public SyncMember(java.lang.String name) { this(name, SyncMemberArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public SyncMember(java.lang.String name, SyncMemberArgs 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 SyncMember(java.lang.String name, SyncMemberArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:SyncMember", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private SyncMember(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:sql:SyncMember", name, null, makeResourceOptions(options, id), false); } private static SyncMemberArgs makeArgs(SyncMemberArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? SyncMemberArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:sql/v20150501preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20190601preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20200202preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20200801preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20201101preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20210201preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20210501preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20210801preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20211101preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20220201preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20220501preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20220801preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20221101preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20230201preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20230501preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20230801preview:SyncMember").build()), Output.of(Alias.builder().type("azure-native:sql/v20240501preview:SyncMember").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static SyncMember get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new SyncMember(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy