
com.pulumi.azurenative.sql.SyncGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.SyncGroupArgs;
import com.pulumi.azurenative.sql.outputs.SkuResponse;
import com.pulumi.azurenative.sql.outputs.SyncGroupSchemaResponse;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* An Azure SQL Database sync group.
* 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 sync group
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.sql.SyncGroup;
* import com.pulumi.azurenative.sql.SyncGroupArgs;
* 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 syncGroup = new SyncGroup("syncGroup", SyncGroupArgs.builder()
* .conflictResolutionPolicy("HubWin")
* .databaseName("syncgroupcrud-4328")
* .hubDatabaseUserName("hubUser")
* .interval(-1)
* .resourceGroupName("syncgroupcrud-65440")
* .serverName("syncgroupcrud-8475")
* .syncDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
* .syncGroupName("syncgroupcrud-3187")
* .usePrivateLinkConnection(true)
* .build());
*
* }
* }
*
* }
*
* ### Update a sync group
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.sql.SyncGroup;
* import com.pulumi.azurenative.sql.SyncGroupArgs;
* 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 syncGroup = new SyncGroup("syncGroup", SyncGroupArgs.builder()
* .conflictResolutionPolicy("HubWin")
* .databaseName("syncgroupcrud-4328")
* .hubDatabaseUserName("hubUser")
* .interval(-1)
* .resourceGroupName("syncgroupcrud-65440")
* .serverName("syncgroupcrud-8475")
* .syncDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-3521/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328")
* .syncGroupName("syncgroupcrud-3187")
* .usePrivateLinkConnection(true)
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:sql:SyncGroup syncgroupcrud-3187 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}
* ```
*
*/
@ResourceType(type="azure-native:sql:SyncGroup")
public class SyncGroup extends com.pulumi.resources.CustomResource {
/**
* Conflict logging retention period.
*
*/
@Export(name="conflictLoggingRetentionInDays", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> conflictLoggingRetentionInDays;
/**
* @return Conflict logging retention period.
*
*/
public Output> conflictLoggingRetentionInDays() {
return Codegen.optional(this.conflictLoggingRetentionInDays);
}
/**
* Conflict resolution policy of the sync group.
*
*/
@Export(name="conflictResolutionPolicy", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> conflictResolutionPolicy;
/**
* @return Conflict resolution policy of the sync group.
*
*/
public Output> conflictResolutionPolicy() {
return Codegen.optional(this.conflictResolutionPolicy);
}
/**
* If conflict logging is enabled.
*
*/
@Export(name="enableConflictLogging", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableConflictLogging;
/**
* @return If conflict logging is enabled.
*
*/
public Output> enableConflictLogging() {
return Codegen.optional(this.enableConflictLogging);
}
/**
* User name for the sync group hub database credential.
*
*/
@Export(name="hubDatabaseUserName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> hubDatabaseUserName;
/**
* @return User name for the sync group hub database credential.
*
*/
public Output> hubDatabaseUserName() {
return Codegen.optional(this.hubDatabaseUserName);
}
/**
* Sync interval of the sync group.
*
*/
@Export(name="interval", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> interval;
/**
* @return Sync interval of the sync group.
*
*/
public Output> interval() {
return Codegen.optional(this.interval);
}
/**
* Last sync time of the sync group.
*
*/
@Export(name="lastSyncTime", refs={String.class}, tree="[0]")
private Output lastSyncTime;
/**
* @return Last sync time of the sync group.
*
*/
public Output lastSyncTime() {
return this.lastSyncTime;
}
/**
* 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 group if use private link connection is enabled.
*
*/
@Export(name="privateEndpointName", refs={String.class}, tree="[0]")
private Output privateEndpointName;
/**
* @return Private endpoint name of the sync group if use private link connection is enabled.
*
*/
public Output privateEndpointName() {
return this.privateEndpointName;
}
/**
* Sync schema of the sync group.
*
*/
@Export(name="schema", refs={SyncGroupSchemaResponse.class}, tree="[0]")
private Output* @Nullable */ SyncGroupSchemaResponse> schema;
/**
* @return Sync schema of the sync group.
*
*/
public Output> schema() {
return Codegen.optional(this.schema);
}
/**
* The name and capacity of the SKU.
*
*/
@Export(name="sku", refs={SkuResponse.class}, tree="[0]")
private Output* @Nullable */ SkuResponse> sku;
/**
* @return The name and capacity of the SKU.
*
*/
public Output> sku() {
return Codegen.optional(this.sku);
}
/**
* ARM resource id of the sync database in the sync group.
*
*/
@Export(name="syncDatabaseId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> syncDatabaseId;
/**
* @return ARM resource id of the sync database in the sync group.
*
*/
public Output> syncDatabaseId() {
return Codegen.optional(this.syncDatabaseId);
}
/**
* Sync state of the sync group.
*
*/
@Export(name="syncState", refs={String.class}, tree="[0]")
private Output syncState;
/**
* @return Sync state of the sync group.
*
*/
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;
}
/**
* If use private link connection is enabled.
*
*/
@Export(name="usePrivateLinkConnection", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> usePrivateLinkConnection;
/**
* @return If use private link connection is enabled.
*
*/
public Output> usePrivateLinkConnection() {
return Codegen.optional(this.usePrivateLinkConnection);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SyncGroup(java.lang.String name) {
this(name, SyncGroupArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SyncGroup(java.lang.String name, SyncGroupArgs 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 SyncGroup(java.lang.String name, SyncGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:sql:SyncGroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SyncGroup(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:sql:SyncGroup", name, null, makeResourceOptions(options, id), false);
}
private static SyncGroupArgs makeArgs(SyncGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SyncGroupArgs.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:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20190601preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20200202preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20200801preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20201101preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20210201preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20210501preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20210801preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20211101:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20211101preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20220201preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20220501preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20220801preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20221101preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20230201preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20230501preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20230801preview:SyncGroup").build()),
Output.of(Alias.builder().type("azure-native:sql/v20240501preview:SyncGroup").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 SyncGroup get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SyncGroup(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy