pulumi/sdk/dotnet/Pulumi/Serialization/Constants.cs
Pat Gavlin 3d2e31289a
Add support for serialized resource references. (#5041)
Resources are serialized as their URN, ID, and package version. Each
Pulumi package is expected to register itself with the SDK. The package
will be invoked to construct appropriate instances of rehydrated
resources. Packages are distinguished by their name and their version.

This is the foundation of cross-process resources.

Related to #2430.

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Co-authored-by: Luke Hoban <luke@pulumi.com>
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2020-10-27 10:12:12 -07:00

52 lines
2.1 KiB
C#

// Copyright 2016-2019, Pulumi Corporation
namespace Pulumi.Serialization
{
internal static class Constants
{
/// <summary>
/// Unknown values are encoded as a distinguished string value.
/// </summary>
public const string UnknownValue = "04da6b54-80e4-46f7-96ec-b56ff0331ba9";
/// <summary>
/// SpecialSigKey is sometimes used to encode type identity inside of a map. See sdk/go/common/resource/properties.go.
/// </summary>
public const string SpecialSigKey = "4dabf18193072939515e22adb298388d";
/// <summary>
/// SpecialAssetSig is a randomly assigned hash used to identify assets in maps. See sdk/go/common/resource/asset.go.
/// </summary>
public const string SpecialAssetSig = "c44067f5952c0a294b673a41bacd8c17";
/// <summary>
/// SpecialArchiveSig is a randomly assigned hash used to identify archives in maps. See sdk/go/common/resource/asset.go.
/// </summary>
public const string SpecialArchiveSig = "0def7320c3a5731c473e5ecbe6d01bc7";
/// <summary>
/// SpecialSecretSig is a randomly assigned hash used to identify secrets in maps. See sdk/go/common/resource/properties.go.
/// </summary>
public const string SpecialSecretSig = "1b47061264138c4ac30d75fd1eb44270";
/// <summary>
/// SpecialResourceSig is a randomly assigned hash used to identify resources in maps. See sdk/go/common/resource/properties.go.
/// </summary>
public const string SpecialResourceSig = "5cf8f73096256a8f31e491e813e4eb8e";
public const string SecretValueName = "value";
public const string AssetTextName = "text";
public const string ArchiveAssetsName = "assets";
public const string AssetOrArchivePathName = "path";
public const string AssetOrArchiveUriName = "uri";
public const string ResourceUrnName = "urn";
public const string ResourceVersionName = "version";
public const string IdPropertyName = "id";
public const string UrnPropertyName = "urn";
}
}