Resource Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an Azure resource to be provisioned.
public abstract class Resource : System.ClientModel.Primitives.IPersistableModel<Azure.Provisioning.Resource>
type Resource = class
interface IPersistableModel<Resource>
Public MustInherit Class Resource
Implements IPersistableModel(Of Resource)
- Inheritance
-
Resource
- Derived
- Implements
Constructors
Resource(IConstruct, Resource, String, ResourceType, String, Func<String,Object>) |
Initializes a new instance of the Resource. |
Properties
Id |
Gets the ResourceIdentifier of the resource. |
IsExisting |
Whether or not the resource already exists. |
Name |
Gets the name of the resource. |
Parent |
Gets the parent Resource. |
ResourceData |
Gets the data of the resource. |
Scope |
Gets the IConstruct scope of the resource. |
Version |
Gets the version of the resource. |
Methods
AddDependency(Resource) |
Adds a dependency to the resource. |
AssignRole(RoleDefinition, Nullable<Guid>, Nullable<RoleManagementPrincipalType>) |
Assigns a role to the resource. |
FindParentInScope(IConstruct) |
Finds the parent resource in the scope. |
GetAzureName(IConstruct, String) |
Validate and sanitize the resource name. |
GetBicepName(Resource) |
Gets the name of the resource for Bicep. |
GetGloballyUniqueName(String) |
Gets a globally unique name for the resource. |
NeedsParent() |
Determines whether the resource needs a parent declaration. |
NeedsScope() |
Determines whether the resource needs a scope declaration. |
Explicit Interface Implementations
IPersistableModel<Resource>.Create(BinaryData, ModelReaderWriterOptions) |
Converts the provided BinaryData into a model. |
IPersistableModel<Resource>.GetFormatFromOptions(ModelReaderWriterOptions) |
Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service. |
IPersistableModel<Resource>.Write(ModelReaderWriterOptions) |
Writes the model into a BinaryData. |
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기