Construct.UseExistingResource<T>(T, Func<T>) Method
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.
Registers an existing resource with this construct that will be used by other resources in the construct.
protected T UseExistingResource<T> (T? resource, Func<T> create) where T : Azure.Provisioning.Resource;
member this.UseExistingResource : 'T * Func<'T (requires 'T :> Azure.Provisioning.Resource)> -> 'T (requires 'T :> Azure.Provisioning.Resource)
Protected Function UseExistingResource(Of T As Resource) (resource As T, create As Func(Of T)) As T
Type Parameters
- T
The type of Resource to use.
Parameters
- resource
- T
Resource instance to use.
- create
- Func<T>
Lambda to create the resource if it was not found.
Returns
T
The Resource instance that will be used.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for .NET