Udostępnij przez


Resource Class

Definition

An azure resource object

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.ResourceTypeConverter))]
public class Resource : Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResource
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.ResourceTypeConverter))>]
type Resource = class
    interface IResource
    interface IJsonSerializable
Public Class Resource
Implements IResource
Inheritance
Resource
Attributes
Implements

Constructors

Name Description
Resource()

Creates an new Resource instance.

Properties

Name Description
Etag

This will be used to handle Optimistic Concurrency. If not present, it will always overwrite the existing resource without checking conflict.

Id

Azure resource Id

Location

The location of the resource

Name

Azure resource name. This is GUID value. The display name should be assigned within properties field.

Tag

Resource tags

Type

Azure resource type

Methods

Name Description
DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of Resource.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of Resource.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.ResourceGraph.Models.IResource.

FromJsonString(String)

Creates a new instance of Resource, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of Resource into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

ToString()

Applies to