1. Packages
  2. Azure Native
  3. API Docs
  4. relationships
  5. ServiceGroupMemberRelationship
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.4.0 published on Wednesday, May 7, 2025 by Pulumi

azure-native.relationships.ServiceGroupMemberRelationship

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.4.0 published on Wednesday, May 7, 2025 by Pulumi

    Defines a ServiceGroupMember relationship resource.

    Uses Azure REST API version 2023-09-01-preview.

    Example Usage

    ServiceGroupMemberRelationships_CreateOrUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var serviceGroupMemberRelationship = new AzureNative.Relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationship", new()
        {
            Name = "sg1",
            Properties = new AzureNative.Relationships.Inputs.ServiceGroupMemberRelationshipPropertiesArgs
            {
                TargetId = "/providers/Microsoft.Management/serviceGroups/sg1",
                TargetTenant = "72f988bf-86f1-41af-91ab-2d7cd011db47",
            },
            ResourceUri = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account",
        });
    
    });
    
    package main
    
    import (
    	relationships "github.com/pulumi/pulumi-azure-native-sdk/relationships/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := relationships.NewServiceGroupMemberRelationship(ctx, "serviceGroupMemberRelationship", &relationships.ServiceGroupMemberRelationshipArgs{
    			Name: pulumi.String("sg1"),
    			Properties: &relationships.ServiceGroupMemberRelationshipPropertiesArgs{
    				TargetId:     pulumi.String("/providers/Microsoft.Management/serviceGroups/sg1"),
    				TargetTenant: pulumi.String("72f988bf-86f1-41af-91ab-2d7cd011db47"),
    			},
    			ResourceUri: pulumi.String("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azurenative.relationships.ServiceGroupMemberRelationship;
    import com.pulumi.azurenative.relationships.ServiceGroupMemberRelationshipArgs;
    import com.pulumi.azurenative.relationships.inputs.ServiceGroupMemberRelationshipPropertiesArgs;
    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 serviceGroupMemberRelationship = new ServiceGroupMemberRelationship("serviceGroupMemberRelationship", ServiceGroupMemberRelationshipArgs.builder()
                .name("sg1")
                .properties(ServiceGroupMemberRelationshipPropertiesArgs.builder()
                    .targetId("/providers/Microsoft.Management/serviceGroups/sg1")
                    .targetTenant("72f988bf-86f1-41af-91ab-2d7cd011db47")
                    .build())
                .resourceUri("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const serviceGroupMemberRelationship = new azure_native.relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationship", {
        name: "sg1",
        properties: {
            targetId: "/providers/Microsoft.Management/serviceGroups/sg1",
            targetTenant: "72f988bf-86f1-41af-91ab-2d7cd011db47",
        },
        resourceUri: "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    service_group_member_relationship = azure_native.relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationship",
        name="sg1",
        properties={
            "target_id": "/providers/Microsoft.Management/serviceGroups/sg1",
            "target_tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47",
        },
        resource_uri="subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account")
    
    resources:
      serviceGroupMemberRelationship:
        type: azure-native:relationships:ServiceGroupMemberRelationship
        properties:
          name: sg1
          properties:
            targetId: /providers/Microsoft.Management/serviceGroups/sg1
            targetTenant: 72f988bf-86f1-41af-91ab-2d7cd011db47
          resourceUri: subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account
    

    Create ServiceGroupMemberRelationship Resource

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

    Constructor syntax

    new ServiceGroupMemberRelationship(name: string, args: ServiceGroupMemberRelationshipArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceGroupMemberRelationship(resource_name: str,
                                       args: ServiceGroupMemberRelationshipArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceGroupMemberRelationship(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       resource_uri: Optional[str] = None,
                                       name: Optional[str] = None,
                                       properties: Optional[ServiceGroupMemberRelationshipPropertiesArgs] = None)
    func NewServiceGroupMemberRelationship(ctx *Context, name string, args ServiceGroupMemberRelationshipArgs, opts ...ResourceOption) (*ServiceGroupMemberRelationship, error)
    public ServiceGroupMemberRelationship(string name, ServiceGroupMemberRelationshipArgs args, CustomResourceOptions? opts = null)
    public ServiceGroupMemberRelationship(String name, ServiceGroupMemberRelationshipArgs args)
    public ServiceGroupMemberRelationship(String name, ServiceGroupMemberRelationshipArgs args, CustomResourceOptions options)
    
    type: azure-native:relationships:ServiceGroupMemberRelationship
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceGroupMemberRelationshipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceGroupMemberRelationshipArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceGroupMemberRelationshipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceGroupMemberRelationshipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceGroupMemberRelationshipArgs
    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 serviceGroupMemberRelationshipResource = new AzureNative.Relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationshipResource", new()
    {
        ResourceUri = "string",
        Name = "string",
        Properties = new AzureNative.Relationships.Inputs.ServiceGroupMemberRelationshipPropertiesArgs
        {
            TargetId = "string",
            TargetTenant = "string",
        },
    });
    
    example, err := relationships.NewServiceGroupMemberRelationship(ctx, "serviceGroupMemberRelationshipResource", &relationships.ServiceGroupMemberRelationshipArgs{
    	ResourceUri: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Properties: &relationships.ServiceGroupMemberRelationshipPropertiesArgs{
    		TargetId:     pulumi.String("string"),
    		TargetTenant: pulumi.String("string"),
    	},
    })
    
    var serviceGroupMemberRelationshipResource = new ServiceGroupMemberRelationship("serviceGroupMemberRelationshipResource", ServiceGroupMemberRelationshipArgs.builder()
        .resourceUri("string")
        .name("string")
        .properties(ServiceGroupMemberRelationshipPropertiesArgs.builder()
            .targetId("string")
            .targetTenant("string")
            .build())
        .build());
    
    service_group_member_relationship_resource = azure_native.relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationshipResource",
        resource_uri="string",
        name="string",
        properties={
            "target_id": "string",
            "target_tenant": "string",
        })
    
    const serviceGroupMemberRelationshipResource = new azure_native.relationships.ServiceGroupMemberRelationship("serviceGroupMemberRelationshipResource", {
        resourceUri: "string",
        name: "string",
        properties: {
            targetId: "string",
            targetTenant: "string",
        },
    });
    
    type: azure-native:relationships:ServiceGroupMemberRelationship
    properties:
        name: string
        properties:
            targetId: string
            targetTenant: string
        resourceUri: string
    

    ServiceGroupMemberRelationship 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 ServiceGroupMemberRelationship resource accepts the following input properties:

    ResourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    Name string
    Name of ServiceGroupMember relationship.
    Properties Pulumi.AzureNative.Relationships.Inputs.ServiceGroupMemberRelationshipProperties
    The resource-specific properties for this resource.
    ResourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    Name string
    Name of ServiceGroupMember relationship.
    Properties ServiceGroupMemberRelationshipPropertiesArgs
    The resource-specific properties for this resource.
    resourceUri String
    The fully qualified Azure Resource manager identifier of the resource.
    name String
    Name of ServiceGroupMember relationship.
    properties ServiceGroupMemberRelationshipProperties
    The resource-specific properties for this resource.
    resourceUri string
    The fully qualified Azure Resource manager identifier of the resource.
    name string
    Name of ServiceGroupMember relationship.
    properties ServiceGroupMemberRelationshipProperties
    The resource-specific properties for this resource.
    resource_uri str
    The fully qualified Azure Resource manager identifier of the resource.
    name str
    Name of ServiceGroupMember relationship.
    properties ServiceGroupMemberRelationshipPropertiesArgs
    The resource-specific properties for this resource.
    resourceUri String
    The fully qualified Azure Resource manager identifier of the resource.
    name String
    Name of ServiceGroupMember relationship.
    properties Property Map
    The resource-specific properties for this resource.

    Outputs

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

    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SystemData Pulumi.AzureNative.Relationships.Outputs.SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    AzureApiVersion string
    The Azure API version of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    SystemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion string
    The Azure API version of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    systemData SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azure_api_version str
    The Azure API version of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    system_data SystemDataResponse
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    azureApiVersion String
    The Azure API version of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    systemData Property Map
    Azure Resource Manager metadata containing createdBy and modifiedBy information.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Supporting Types

    RelationshipMetadataResponse, RelationshipMetadataResponseArgs

    SourceType string
    The type of the relationship source resource.
    TargetType string
    The type of the relationship target resource.
    SourceType string
    The type of the relationship source resource.
    TargetType string
    The type of the relationship target resource.
    sourceType String
    The type of the relationship source resource.
    targetType String
    The type of the relationship target resource.
    sourceType string
    The type of the relationship source resource.
    targetType string
    The type of the relationship target resource.
    source_type str
    The type of the relationship source resource.
    target_type str
    The type of the relationship target resource.
    sourceType String
    The type of the relationship source resource.
    targetType String
    The type of the relationship target resource.

    RelationshipOriginInformationResponse, RelationshipOriginInformationResponseArgs

    DiscoveryEngine string
    The name of the discovery engine that created the relationship.
    RelationshipOriginType string
    Identifies the origin type of the relationship.
    DiscoveryEngine string
    The name of the discovery engine that created the relationship.
    RelationshipOriginType string
    Identifies the origin type of the relationship.
    discoveryEngine String
    The name of the discovery engine that created the relationship.
    relationshipOriginType String
    Identifies the origin type of the relationship.
    discoveryEngine string
    The name of the discovery engine that created the relationship.
    relationshipOriginType string
    Identifies the origin type of the relationship.
    discovery_engine str
    The name of the discovery engine that created the relationship.
    relationship_origin_type str
    Identifies the origin type of the relationship.
    discoveryEngine String
    The name of the discovery engine that created the relationship.
    relationshipOriginType String
    Identifies the origin type of the relationship.

    ServiceGroupMemberRelationshipProperties, ServiceGroupMemberRelationshipPropertiesArgs

    TargetId string
    The relationship target resource id.
    TargetTenant string
    The relationship target tenant id.
    TargetId string
    The relationship target resource id.
    TargetTenant string
    The relationship target tenant id.
    targetId String
    The relationship target resource id.
    targetTenant String
    The relationship target tenant id.
    targetId string
    The relationship target resource id.
    targetTenant string
    The relationship target tenant id.
    target_id str
    The relationship target resource id.
    target_tenant str
    The relationship target tenant id.
    targetId String
    The relationship target resource id.
    targetTenant String
    The relationship target tenant id.

    ServiceGroupMemberRelationshipPropertiesResponse, ServiceGroupMemberRelationshipPropertiesResponseArgs

    Metadata Pulumi.AzureNative.Relationships.Inputs.RelationshipMetadataResponse
    Metadata about the relationship.
    OriginInformation Pulumi.AzureNative.Relationships.Inputs.RelationshipOriginInformationResponse
    Information about the origin of the relationship.
    ProvisioningState string
    The provisioning state of the relationship.
    SourceId string
    The relationship source resource id.
    TargetId string
    The relationship target resource id.
    TargetTenant string
    The relationship target tenant id.
    Metadata RelationshipMetadataResponse
    Metadata about the relationship.
    OriginInformation RelationshipOriginInformationResponse
    Information about the origin of the relationship.
    ProvisioningState string
    The provisioning state of the relationship.
    SourceId string
    The relationship source resource id.
    TargetId string
    The relationship target resource id.
    TargetTenant string
    The relationship target tenant id.
    metadata RelationshipMetadataResponse
    Metadata about the relationship.
    originInformation RelationshipOriginInformationResponse
    Information about the origin of the relationship.
    provisioningState String
    The provisioning state of the relationship.
    sourceId String
    The relationship source resource id.
    targetId String
    The relationship target resource id.
    targetTenant String
    The relationship target tenant id.
    metadata RelationshipMetadataResponse
    Metadata about the relationship.
    originInformation RelationshipOriginInformationResponse
    Information about the origin of the relationship.
    provisioningState string
    The provisioning state of the relationship.
    sourceId string
    The relationship source resource id.
    targetId string
    The relationship target resource id.
    targetTenant string
    The relationship target tenant id.
    metadata RelationshipMetadataResponse
    Metadata about the relationship.
    origin_information RelationshipOriginInformationResponse
    Information about the origin of the relationship.
    provisioning_state str
    The provisioning state of the relationship.
    source_id str
    The relationship source resource id.
    target_id str
    The relationship target resource id.
    target_tenant str
    The relationship target tenant id.
    metadata Property Map
    Metadata about the relationship.
    originInformation Property Map
    Information about the origin of the relationship.
    provisioningState String
    The provisioning state of the relationship.
    sourceId String
    The relationship source resource id.
    targetId String
    The relationship target resource id.
    targetTenant String
    The relationship target tenant id.

    SystemDataResponse, SystemDataResponseArgs

    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    CreatedAt string
    The timestamp of resource creation (UTC).
    CreatedBy string
    The identity that created the resource.
    CreatedByType string
    The type of identity that created the resource.
    LastModifiedAt string
    The timestamp of resource last modification (UTC)
    LastModifiedBy string
    The identity that last modified the resource.
    LastModifiedByType string
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.
    createdAt string
    The timestamp of resource creation (UTC).
    createdBy string
    The identity that created the resource.
    createdByType string
    The type of identity that created the resource.
    lastModifiedAt string
    The timestamp of resource last modification (UTC)
    lastModifiedBy string
    The identity that last modified the resource.
    lastModifiedByType string
    The type of identity that last modified the resource.
    created_at str
    The timestamp of resource creation (UTC).
    created_by str
    The identity that created the resource.
    created_by_type str
    The type of identity that created the resource.
    last_modified_at str
    The timestamp of resource last modification (UTC)
    last_modified_by str
    The identity that last modified the resource.
    last_modified_by_type str
    The type of identity that last modified the resource.
    createdAt String
    The timestamp of resource creation (UTC).
    createdBy String
    The identity that created the resource.
    createdByType String
    The type of identity that created the resource.
    lastModifiedAt String
    The timestamp of resource last modification (UTC)
    lastModifiedBy String
    The identity that last modified the resource.
    lastModifiedByType String
    The type of identity that last modified the resource.

    Import

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

    $ pulumi import azure-native:relationships:ServiceGroupMemberRelationship sg1 /{resourceUri}/providers/Microsoft.Relationships/serviceGroupMember/{name} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
    Azure Native v3.4.0 published on Wednesday, May 7, 2025 by Pulumi