1. Packages
  2. Azure Native v2
  3. API Docs
  4. sql
  5. SyncAgent
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.sql.SyncAgent

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

An Azure SQL Database sync agent. 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 agent

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var syncAgent = new AzureNative.Sql.SyncAgent("syncAgent", new()
    {
        ResourceGroupName = "syncagentcrud-65440",
        ServerName = "syncagentcrud-8475",
        SyncAgentName = "syncagentcrud-3187",
        SyncDatabaseId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync",
    });

});
Copy
package main

import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewSyncAgent(ctx, "syncAgent", &sql.SyncAgentArgs{
			ResourceGroupName: pulumi.String("syncagentcrud-65440"),
			ServerName:        pulumi.String("syncagentcrud-8475"),
			SyncAgentName:     pulumi.String("syncagentcrud-3187"),
			SyncDatabaseId:    pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.SyncAgent;
import com.pulumi.azurenative.sql.SyncAgentArgs;
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 syncAgent = new SyncAgent("syncAgent", SyncAgentArgs.builder()
            .resourceGroupName("syncagentcrud-65440")
            .serverName("syncagentcrud-8475")
            .syncAgentName("syncagentcrud-3187")
            .syncDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const syncAgent = new azure_native.sql.SyncAgent("syncAgent", {
    resourceGroupName: "syncagentcrud-65440",
    serverName: "syncagentcrud-8475",
    syncAgentName: "syncagentcrud-3187",
    syncDatabaseId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

sync_agent = azure_native.sql.SyncAgent("syncAgent",
    resource_group_name="syncagentcrud-65440",
    server_name="syncagentcrud-8475",
    sync_agent_name="syncagentcrud-3187",
    sync_database_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
Copy
resources:
  syncAgent:
    type: azure-native:sql:SyncAgent
    properties:
      resourceGroupName: syncagentcrud-65440
      serverName: syncagentcrud-8475
      syncAgentName: syncagentcrud-3187
      syncDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync
Copy

Update a sync agent

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var syncAgent = new AzureNative.Sql.SyncAgent("syncAgent", new()
    {
        ResourceGroupName = "syncagentcrud-65440",
        ServerName = "syncagentcrud-8475",
        SyncAgentName = "syncagentcrud-3187",
        SyncDatabaseId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync",
    });

});
Copy
package main

import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewSyncAgent(ctx, "syncAgent", &sql.SyncAgentArgs{
			ResourceGroupName: pulumi.String("syncagentcrud-65440"),
			ServerName:        pulumi.String("syncagentcrud-8475"),
			SyncAgentName:     pulumi.String("syncagentcrud-3187"),
			SyncDatabaseId:    pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.SyncAgent;
import com.pulumi.azurenative.sql.SyncAgentArgs;
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 syncAgent = new SyncAgent("syncAgent", SyncAgentArgs.builder()
            .resourceGroupName("syncagentcrud-65440")
            .serverName("syncagentcrud-8475")
            .syncAgentName("syncagentcrud-3187")
            .syncDatabaseId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const syncAgent = new azure_native.sql.SyncAgent("syncAgent", {
    resourceGroupName: "syncagentcrud-65440",
    serverName: "syncagentcrud-8475",
    syncAgentName: "syncagentcrud-3187",
    syncDatabaseId: "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

sync_agent = azure_native.sql.SyncAgent("syncAgent",
    resource_group_name="syncagentcrud-65440",
    server_name="syncagentcrud-8475",
    sync_agent_name="syncagentcrud-3187",
    sync_database_id="/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync")
Copy
resources:
  syncAgent:
    type: azure-native:sql:SyncAgent
    properties:
      resourceGroupName: syncagentcrud-65440
      serverName: syncagentcrud-8475
      syncAgentName: syncagentcrud-3187
      syncDatabaseId: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/databases/sync
Copy

Create SyncAgent Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SyncAgent(name: string, args: SyncAgentArgs, opts?: CustomResourceOptions);
@overload
def SyncAgent(resource_name: str,
              args: SyncAgentArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def SyncAgent(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              resource_group_name: Optional[str] = None,
              server_name: Optional[str] = None,
              sync_agent_name: Optional[str] = None,
              sync_database_id: Optional[str] = None)
func NewSyncAgent(ctx *Context, name string, args SyncAgentArgs, opts ...ResourceOption) (*SyncAgent, error)
public SyncAgent(string name, SyncAgentArgs args, CustomResourceOptions? opts = null)
public SyncAgent(String name, SyncAgentArgs args)
public SyncAgent(String name, SyncAgentArgs args, CustomResourceOptions options)
type: azure-native:sql:SyncAgent
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SyncAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SyncAgentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SyncAgentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SyncAgentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SyncAgentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var syncAgentResource = new AzureNative.Sql.SyncAgent("syncAgentResource", new()
{
    ResourceGroupName = "string",
    ServerName = "string",
    SyncAgentName = "string",
    SyncDatabaseId = "string",
});
Copy
example, err := sql.NewSyncAgent(ctx, "syncAgentResource", &sql.SyncAgentArgs{
	ResourceGroupName: "string",
	ServerName:        "string",
	SyncAgentName:     "string",
	SyncDatabaseId:    "string",
})
Copy
var syncAgentResource = new SyncAgent("syncAgentResource", SyncAgentArgs.builder()
    .resourceGroupName("string")
    .serverName("string")
    .syncAgentName("string")
    .syncDatabaseId("string")
    .build());
Copy
sync_agent_resource = azure_native.sql.SyncAgent("syncAgentResource",
    resource_group_name=string,
    server_name=string,
    sync_agent_name=string,
    sync_database_id=string)
Copy
const syncAgentResource = new azure_native.sql.SyncAgent("syncAgentResource", {
    resourceGroupName: "string",
    serverName: "string",
    syncAgentName: "string",
    syncDatabaseId: "string",
});
Copy
type: azure-native:sql:SyncAgent
properties:
    resourceGroupName: string
    serverName: string
    syncAgentName: string
    syncDatabaseId: string
Copy

SyncAgent Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SyncAgent resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server on which the sync agent is hosted.
SyncAgentName Changes to this property will trigger replacement. string
The name of the sync agent.
SyncDatabaseId string
ARM resource id of the sync database in the sync agent.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server on which the sync agent is hosted.
SyncAgentName Changes to this property will trigger replacement. string
The name of the sync agent.
SyncDatabaseId string
ARM resource id of the sync database in the sync agent.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server on which the sync agent is hosted.
syncAgentName Changes to this property will trigger replacement. String
The name of the sync agent.
syncDatabaseId String
ARM resource id of the sync database in the sync agent.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server on which the sync agent is hosted.
syncAgentName Changes to this property will trigger replacement. string
The name of the sync agent.
syncDatabaseId string
ARM resource id of the sync database in the sync agent.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the server on which the sync agent is hosted.
sync_agent_name Changes to this property will trigger replacement. str
The name of the sync agent.
sync_database_id str
ARM resource id of the sync database in the sync agent.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server on which the sync agent is hosted.
syncAgentName Changes to this property will trigger replacement. String
The name of the sync agent.
syncDatabaseId String
ARM resource id of the sync database in the sync agent.

Outputs

All input properties are implicitly available as output properties. Additionally, the SyncAgent resource produces the following output properties:

ExpiryTime string
Expiration time of the sync agent version.
Id string
The provider-assigned unique ID for this managed resource.
IsUpToDate bool
If the sync agent version is up to date.
LastAliveTime string
Last alive time of the sync agent.
Name string
Resource name.
State string
State of the sync agent.
Type string
Resource type.
Version string
Version of the sync agent.
ExpiryTime string
Expiration time of the sync agent version.
Id string
The provider-assigned unique ID for this managed resource.
IsUpToDate bool
If the sync agent version is up to date.
LastAliveTime string
Last alive time of the sync agent.
Name string
Resource name.
State string
State of the sync agent.
Type string
Resource type.
Version string
Version of the sync agent.
expiryTime String
Expiration time of the sync agent version.
id String
The provider-assigned unique ID for this managed resource.
isUpToDate Boolean
If the sync agent version is up to date.
lastAliveTime String
Last alive time of the sync agent.
name String
Resource name.
state String
State of the sync agent.
type String
Resource type.
version String
Version of the sync agent.
expiryTime string
Expiration time of the sync agent version.
id string
The provider-assigned unique ID for this managed resource.
isUpToDate boolean
If the sync agent version is up to date.
lastAliveTime string
Last alive time of the sync agent.
name string
Resource name.
state string
State of the sync agent.
type string
Resource type.
version string
Version of the sync agent.
expiry_time str
Expiration time of the sync agent version.
id str
The provider-assigned unique ID for this managed resource.
is_up_to_date bool
If the sync agent version is up to date.
last_alive_time str
Last alive time of the sync agent.
name str
Resource name.
state str
State of the sync agent.
type str
Resource type.
version str
Version of the sync agent.
expiryTime String
Expiration time of the sync agent version.
id String
The provider-assigned unique ID for this managed resource.
isUpToDate Boolean
If the sync agent version is up to date.
lastAliveTime String
Last alive time of the sync agent.
name String
Resource name.
state String
State of the sync agent.
type String
Resource type.
version String
Version of the sync agent.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:SyncAgent syncagent /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi