Get-EmcEntityRelationship (ESI Service)

Gets one or more Entity relationship objects from the Entity Graph of an ESI Service instance.

 

Syntax

 

Description

An Entity relationship represents a directional link between two Entity objects in an Entity Graph, where one Entity is the source and the other a target. This command returns entity relationship objects that satisfy the specified parameters.

 

Parameters

-NamesOnly <SwitchParameter>

Attributes: Optional, Position: named

If specified, only returns the unique names of the entity relationships.

 

-Relationship <String>

Attributes: Optional, Position: named

If specified, only returns entity relationship objects with a specific name. For example, get entity relationships for LogicalContainment.

 

-SourceId <String>

Attributes: Optional, Position: named

Specifies the ID of an entity object in the Entity Graph. If specified, the parameter returns only entity relationship objects for the source entity end of the relationship.

 

-TargetId <String>

Attributes: Optional, Position: named

Specifies the ID of an entity object in the Entity Graph. If specified, the parameter returns only entity relationship objects for the target class entity.

 

-SourceClass <String>

Attributes: Optional, Position: named

Specifies the name of an entity class. If specified, the parameter returns only entity relationship objects for the source class entity.

 

-TargetClass <String>

Attributes: Optional, Position: named

Specifies the name of an entity class. If specified, the parameter returns only entity relationship objects for the target entity.

 

-ServiceUrl <String>

Attributes: Optional, Position: named

Specifies the base URL for the ESI Service. This must contain only the scheme, host, and port. If no value is specified, ESI uses the default of localhost or the value set by using the Set-EmcServiceUrl cmdlet.

 

-Silent <SwitchParameter>

Attributes: Optional, Position: named

Turns off all the informational and verbose messages. However, it still displays errors.

 

-EntityId <String>

Attributes: Required, Position: named, Accepts pipeline input (by value or parameter name)

Specifies the ID of an entity in the Entity Graph. If specified, ESI returns entity relationship objects that are associated with the entity, which can be a source or target.

 

-Outgoing <SwitchParameter>

Attributes: Optional, Position: named

If specified, returns entity relationship objects where the entity specified in -EntityID is the source of the relationship.

 

-Incoming <SwitchParameter>

Attributes: Optional, Position: named

If specified, returns entity relationship objects where the entity specified in -EntityID is the target of the relationship.

 

<CommonParameters>

This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, and OutVariable. Type get-help about_commonparameters for more details.

 

Examples

-------------- Example 1 --------------

C:\PS>Get-EmcEntityRelationship

 

Name        : LogicalPhysicalAssociation

SourceClass : StorageSystem

SourceId    : 7f633007b0695172facbe3e85a0902793bfd531d

TargetClass : Enclosure

TargetId    : eb96700535f14687abf6cf37da3d9907af7cd908

 

Name        : PhysicalContainment

SourceClass : Enclosure

SourceId    : eb96700535f14687abf6cf37da3d9907af7cd908

TargetClass : StandbyPowerSupply

TargetId    : d02341fd431d182a3a4ebd2be09f83d4ff9e1655

 

...etc...

This example gets all entity relationships.

 

-------------- Example 2 --------------

C:\PS>Get-EmcEntityRelationship -Outgoing -EntityId 7f633007b0695172facbe3e85a0902793bfd531d

 

Name        : LogicalPhysicalAssociation

SourceClass : StorageSystem

SourceId    : 7f633007b0695172facbe3e85a0902793bfd531d

TargetClass : Enclosure

TargetId    : eb96700535f14687abf6cf37da3d9907af7cd908

 

Name        : LogicalPhysicalAssociation

SourceClass : StorageSystem

SourceId    : 7f633007b0695172facbe3e85a0902793bfd531d

TargetClass : Enclosure

TargetId    : 90a9f51508578c2373a66c781ff0fa3e76bd187f

This example gets all outgoing entity relationships, such as those where the specified entity is the source.

 

-------------- Example 3 --------------

C:\PS>Get-EmcEntityRelationship -Incoming -EntityId 3ce84415b5d38ec5076f718b33a9895325

554c3d

 

Name        : LogicalContainment

SourceClass : StorageSystem

SourceId    : 97851c102dd4728062b55ef6bf1502b59ee9244d

TargetClass : CifsStoragePool

TargetId    : 3ce84415b5d38ec5076f718b33a9895325554c3d

This example gets all incoming entity relationships, such as those where the specified entity is the target.

 

-------------- Example 4 --------------

C:\PS>Get-EmcEntityRelationship -Outgoing -EntityId f66a10a9c404f98432310499e212188917

41dd69 -Relationship LogicalPhysicalAssociation

 

Name        : LogicalPhysicalAssociation

SourceClass : StorageSystem

SourceId    : f66a10a9c404f98432310499e21218891741dd69

TargetClass : Enclosure

TargetId    : e14db631de7e701282acec39d1cb0bea8ecbc30e

 

Name        : LogicalPhysicalAssociation

SourceClass : StorageSystem

SourceId    : f66a10a9c404f98432310499e21218891741dd69

TargetClass : Enclosure

TargetId    : 2c4ede2d32dcdc93f2611f07627a1ecc9924e7d9

This example gets all outgoing entity relationships where the relationship name is LogicalPhysicalAssociation.