azure-native.cloudhealth.Relationship
Explore with Pulumi AI
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:
- Health
Model stringName - Name of health model resource
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Properties
Pulumi.
Azure Native. Cloud Health. Inputs. Relationship Properties - The resource-specific properties for this resource.
- Relationship
Name 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 stringName - Name of health model resource
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Properties
Relationship
Properties Args - The resource-specific properties for this resource.
- Relationship
Name 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 StringName - Name of health model resource
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- properties
Relationship
Properties - The resource-specific properties for this resource.
- relationship
Name 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 stringName - Name of health model resource
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- properties
Relationship
Properties - The resource-specific properties for this resource.
- relationship
Name 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_ strname - Name of health model resource
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- properties
Relationship
Properties Args - 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.
- health
Model StringName - Name of health model resource
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- properties Property Map
- The resource-specific properties for this resource.
- relationship
Name 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:
- Azure
Api stringVersion - 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
- System
Data Pulumi.Azure Native. Cloud Health. Outputs. System Data Response - 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 stringVersion - 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
- System
Data SystemData Response - 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 StringVersion - 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
- system
Data SystemData Response - 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 stringVersion - 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
- system
Data SystemData Response - 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_ strversion - 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 SystemData Response - 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"
- azure
Api StringVersion - 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
- system
Data 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
- Child
Entity stringName - Resource name of the child entity
- Parent
Entity stringName - Resource name of the parent entity
- Display
Name string - Display name
- Labels Dictionary<string, string>
- Optional set of labels (key-value pairs)
- Child
Entity stringName - Resource name of the child entity
- Parent
Entity stringName - Resource name of the parent entity
- Display
Name string - Display name
- Labels map[string]string
- Optional set of labels (key-value pairs)
- child
Entity StringName - Resource name of the child entity
- parent
Entity StringName - Resource name of the parent entity
- display
Name String - Display name
- labels Map<String,String>
- Optional set of labels (key-value pairs)
- child
Entity stringName - Resource name of the child entity
- parent
Entity stringName - Resource name of the parent entity
- display
Name string - Display name
- labels {[key: string]: string}
- Optional set of labels (key-value pairs)
- child_
entity_ strname - Resource name of the child entity
- parent_
entity_ strname - Resource name of the parent entity
- display_
name str - Display name
- labels Mapping[str, str]
- Optional set of labels (key-value pairs)
- child
Entity StringName - Resource name of the child entity
- parent
Entity StringName - Resource name of the parent entity
- display
Name String - Display name
- labels Map<String>
- Optional set of labels (key-value pairs)
RelationshipPropertiesResponse, RelationshipPropertiesResponseArgs
- Child
Entity stringName - Resource name of the child entity
- Deletion
Date string - Date when the relationship was (soft-)deleted
- Discovered
By string - Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
- Parent
Entity stringName - Resource name of the parent entity
- Provisioning
State string - The status of the last operation.
- Display
Name string - Display name
- Labels Dictionary<string, string>
- Optional set of labels (key-value pairs)
- Child
Entity stringName - Resource name of the child entity
- Deletion
Date string - Date when the relationship was (soft-)deleted
- Discovered
By string - Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
- Parent
Entity stringName - Resource name of the parent entity
- Provisioning
State string - The status of the last operation.
- Display
Name string - Display name
- Labels map[string]string
- Optional set of labels (key-value pairs)
- child
Entity StringName - Resource name of the child entity
- deletion
Date String - Date when the relationship was (soft-)deleted
- discovered
By String - Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
- parent
Entity StringName - Resource name of the parent entity
- provisioning
State String - The status of the last operation.
- display
Name String - Display name
- labels Map<String,String>
- Optional set of labels (key-value pairs)
- child
Entity stringName - Resource name of the child entity
- deletion
Date string - Date when the relationship was (soft-)deleted
- discovered
By string - Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
- parent
Entity stringName - Resource name of the parent entity
- provisioning
State string - The status of the last operation.
- display
Name string - Display name
- labels {[key: string]: string}
- Optional set of labels (key-value pairs)
- child_
entity_ strname - 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_ strname - 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)
- child
Entity StringName - Resource name of the child entity
- deletion
Date String - Date when the relationship was (soft-)deleted
- discovered
By String - Discovered by which discovery rule. If set, the relationship cannot be deleted manually.
- parent
Entity StringName - Resource name of the parent entity
- provisioning
State String - The status of the last operation.
- display
Name String - Display name
- labels Map<String>
- Optional set of labels (key-value pairs)
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - 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_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - 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