1. Packages
  2. Azure Native
  3. API Docs
  4. cloudhealth
  5. Relationship
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.6.1 published on Friday, Aug 1, 2025 by Pulumi

azure-native.cloudhealth.Relationship

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.6.1 published on Friday, Aug 1, 2025 by Pulumi

    A relationship (aka edge) between two entities in a health model

    Uses Azure REST API version 2025-05-01-preview.

    Example Usage

    Relationships_CreateOrUpdate

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var relationship = new AzureNative.CloudHealth.Relationship("relationship", new()
        {
            HealthModelName = "model1",
            Properties = new AzureNative.CloudHealth.Inputs.RelationshipPropertiesArgs
            {
                ChildEntityName = "Entity2",
                DisplayName = "My relationship",
                Labels = 
                {
                    { "key9681", "ixfvzsfnpvkkbrce" },
                },
                ParentEntityName = "Entity1",
            },
            RelationshipName = "rel1",
            ResourceGroupName = "rgopenapi",
        });
    
    });
    
    package main
    
    import (
    	cloudhealth "github.com/pulumi/pulumi-azure-native-sdk/cloudhealth/v3"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudhealth.NewRelationship(ctx, "relationship", &cloudhealth.RelationshipArgs{
    			HealthModelName: pulumi.String("model1"),
    			Properties: &cloudhealth.RelationshipPropertiesArgs{
    				ChildEntityName: pulumi.String("Entity2"),
    				DisplayName:     pulumi.String("My relationship"),
    				Labels: pulumi.StringMap{
    					"key9681": pulumi.String("ixfvzsfnpvkkbrce"),
    				},
    				ParentEntityName: pulumi.String("Entity1"),
    			},
    			RelationshipName:  pulumi.String("rel1"),
    			ResourceGroupName: pulumi.String("rgopenapi"),
    		})
    		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.cloudhealth.Relationship;
    import com.pulumi.azurenative.cloudhealth.RelationshipArgs;
    import com.pulumi.azurenative.cloudhealth.inputs.RelationshipPropertiesArgs;
    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 relationship = new Relationship("relationship", RelationshipArgs.builder()
                .healthModelName("model1")
                .properties(RelationshipPropertiesArgs.builder()
                    .childEntityName("Entity2")
                    .displayName("My relationship")
                    .labels(Map.of("key9681", "ixfvzsfnpvkkbrce"))
                    .parentEntityName("Entity1")
                    .build())
                .relationshipName("rel1")
                .resourceGroupName("rgopenapi")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const relationship = new azure_native.cloudhealth.Relationship("relationship", {
        healthModelName: "model1",
        properties: {
            childEntityName: "Entity2",
            displayName: "My relationship",
            labels: {
                key9681: "ixfvzsfnpvkkbrce",
            },
            parentEntityName: "Entity1",
        },
        relationshipName: "rel1",
        resourceGroupName: "rgopenapi",
    });
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    relationship = azure_native.cloudhealth.Relationship("relationship",
        health_model_name="model1",
        properties={
            "child_entity_name": "Entity2",
            "display_name": "My relationship",
            "labels": {
                "key9681": "ixfvzsfnpvkkbrce",
            },
            "parent_entity_name": "Entity1",
        },
        relationship_name="rel1",
        resource_group_name="rgopenapi")
    
    resources:
      relationship:
        type: azure-native:cloudhealth:Relationship
        properties:
          healthModelName: model1
          properties:
            childEntityName: Entity2
            displayName: My relationship
            labels:
              key9681: ixfvzsfnpvkkbrce
            parentEntityName: Entity1
          relationshipName: rel1
          resourceGroupName: rgopenapi
    

    Create Relationship Resource

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

    Constructor syntax

    new Relationship(name: string, args: RelationshipArgs, opts?: CustomResourceOptions);
    @overload
    def Relationship(resource_name: str,
                     args: RelationshipArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def Relationship(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     health_model_name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     properties: Optional[RelationshipPropertiesArgs] = None,
                     relationship_name: Optional[str] = None)
    func NewRelationship(ctx *Context, name string, args RelationshipArgs, opts ...ResourceOption) (*Relationship, error)
    public Relationship(string name, RelationshipArgs args, CustomResourceOptions? opts = null)
    public Relationship(String name, RelationshipArgs args)
    public Relationship(String name, RelationshipArgs args, CustomResourceOptions options)
    
    type: azure-native:cloudhealth:Relationship
    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 RelationshipArgs
    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 RelationshipArgs
    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 RelationshipArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RelationshipArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RelationshipArgs
    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 relationshipResource = new AzureNative.CloudHealth.Relationship("relationshipResource", new()
    {
        HealthModelName = "string",
        ResourceGroupName = "string",
        Properties = new AzureNative.CloudHealth.Inputs.RelationshipPropertiesArgs
        {
            ChildEntityName = "string",
            ParentEntityName = "string",
            DisplayName = "string",
            Labels = 
            {
                { "string", "string" },
            },
        },
        RelationshipName = "string",
    });
    
    example, err := cloudhealth.NewRelationship(ctx, "relationshipResource", &cloudhealth.RelationshipArgs{
    	HealthModelName:   pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	Properties: &cloudhealth.RelationshipPropertiesArgs{
    		ChildEntityName:  pulumi.String("string"),
    		ParentEntityName: pulumi.String("string"),
    		DisplayName:      pulumi.String("string"),
    		Labels: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	RelationshipName: pulumi.String("string"),
    })
    
    var relationshipResource = new com.pulumi.azurenative.cloudhealth.Relationship("relationshipResource", com.pulumi.azurenative.cloudhealth.RelationshipArgs.builder()
        .healthModelName("string")
        .resourceGroupName("string")
        .properties(RelationshipPropertiesArgs.builder()
            .childEntityName("string")
            .parentEntityName("string")
            .displayName("string")
            .labels(Map.of("string", "string"))
            .build())
        .relationshipName("string")
        .build());
    
    relationship_resource = azure_native.cloudhealth.Relationship("relationshipResource",
        health_model_name="string",
        resource_group_name="string",
        properties={
            "child_entity_name": "string",
            "parent_entity_name": "string",
            "display_name": "string",
            "labels": {
                "string": "string",
            },
        },
        relationship_name="string")
    
    const relationshipResource = new azure_native.cloudhealth.Relationship("relationshipResource", {
        healthModelName: "string",
        resourceGroupName: "string",
        properties: {
            childEntityName: "string",
            parentEntityName: "string",
            displayName: "string",
            labels: {
                string: "string",
            },
        },
        relationshipName: "string",
    });
    
    type: azure-native:cloudhealth:Relationship
    properties:
        healthModelName: string
        properties:
            childEntityName: string
            displayName: string
            labels:
                string: string
            parentEntityName: string
        relationshipName: string
        resourceGroupName: string
    

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

    HealthModelName string
    Name of health model resource
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Properties Pulumi.AzureNative.CloudHealth.Inputs.RelationshipProperties
    The resource-specific properties for this resource.
    RelationshipName string
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.
    HealthModelName string
    Name of health model resource
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Properties RelationshipPropertiesArgs
    The resource-specific properties for this resource.
    RelationshipName string
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.
    healthModelName String
    Name of health model resource
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    properties RelationshipProperties
    The resource-specific properties for this resource.
    relationshipName String
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.
    healthModelName string
    Name of health model resource
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    properties RelationshipProperties
    The resource-specific properties for this resource.
    relationshipName string
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.
    health_model_name str
    Name of health model resource
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    properties RelationshipPropertiesArgs
    The resource-specific properties for this resource.
    relationship_name str
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.
    healthModelName String
    Name of health model resource
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    properties Property Map
    The resource-specific properties for this resource.
    relationshipName String
    Name of the relationship. Must be unique within a health model. For example, a concatenation of parentEntityName and childEntityName can be used as the name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Relationship 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.
    Name string
    The name of the resource
    SystemData Pulumi.AzureNative.CloudHealth.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.
    Name string
    The name of the 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.
    name String
    The name of the 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.
    name string
    The name of the 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.
    name str
    The name of the 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.
    name String
    The name of the 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

    RelationshipProperties, RelationshipPropertiesArgs

    ChildEntityName string
    Resource name of the child entity
    ParentEntityName string
    Resource name of the parent entity
    DisplayName string
    Display name
    Labels Dictionary<string, string>
    Optional set of labels (key-value pairs)
    ChildEntityName string
    Resource name of the child entity
    ParentEntityName string
    Resource name of the parent entity
    DisplayName string
    Display name
    Labels map[string]string
    Optional set of labels (key-value pairs)
    childEntityName String
    Resource name of the child entity
    parentEntityName String
    Resource name of the parent entity
    displayName String
    Display name
    labels Map<String,String>
    Optional set of labels (key-value pairs)
    childEntityName string
    Resource name of the child entity
    parentEntityName string
    Resource name of the parent entity
    displayName string
    Display name
    labels {[key: string]: string}
    Optional set of labels (key-value pairs)
    child_entity_name str
    Resource name of the child entity
    parent_entity_name str
    Resource name of the parent entity
    display_name str
    Display name
    labels Mapping[str, str]
    Optional set of labels (key-value pairs)
    childEntityName String
    Resource name of the child entity
    parentEntityName String
    Resource name of the parent entity
    displayName String
    Display name
    labels Map<String>
    Optional set of labels (key-value pairs)

    RelationshipPropertiesResponse, RelationshipPropertiesResponseArgs

    ChildEntityName string
    Resource name of the child entity
    DeletionDate string
    Date when the relationship was (soft-)deleted
    DiscoveredBy string
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    ParentEntityName string
    Resource name of the parent entity
    ProvisioningState string
    The status of the last operation.
    DisplayName string
    Display name
    Labels Dictionary<string, string>
    Optional set of labels (key-value pairs)
    ChildEntityName string
    Resource name of the child entity
    DeletionDate string
    Date when the relationship was (soft-)deleted
    DiscoveredBy string
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    ParentEntityName string
    Resource name of the parent entity
    ProvisioningState string
    The status of the last operation.
    DisplayName string
    Display name
    Labels map[string]string
    Optional set of labels (key-value pairs)
    childEntityName String
    Resource name of the child entity
    deletionDate String
    Date when the relationship was (soft-)deleted
    discoveredBy String
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    parentEntityName String
    Resource name of the parent entity
    provisioningState String
    The status of the last operation.
    displayName String
    Display name
    labels Map<String,String>
    Optional set of labels (key-value pairs)
    childEntityName string
    Resource name of the child entity
    deletionDate string
    Date when the relationship was (soft-)deleted
    discoveredBy string
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    parentEntityName string
    Resource name of the parent entity
    provisioningState string
    The status of the last operation.
    displayName string
    Display name
    labels {[key: string]: string}
    Optional set of labels (key-value pairs)
    child_entity_name str
    Resource name of the child entity
    deletion_date str
    Date when the relationship was (soft-)deleted
    discovered_by str
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    parent_entity_name str
    Resource name of the parent entity
    provisioning_state str
    The status of the last operation.
    display_name str
    Display name
    labels Mapping[str, str]
    Optional set of labels (key-value pairs)
    childEntityName String
    Resource name of the child entity
    deletionDate String
    Date when the relationship was (soft-)deleted
    discoveredBy String
    Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
    parentEntityName String
    Resource name of the parent entity
    provisioningState String
    The status of the last operation.
    displayName String
    Display name
    labels Map<String>
    Optional set of labels (key-value pairs)

    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:cloudhealth:Relationship rel1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/relationships/{relationshipName} 
    

    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.6.1 published on Friday, Aug 1, 2025 by Pulumi