diff --git a/CHANGELOG.md b/CHANGELOG.md index 17aafe15f3..abbbf56a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ - Fix aliases for several resource kinds. (https://github.com/pulumi/pulumi-kubernetes/pull/990). - Fix .NET resources with empty arguments. (https://github.com/pulumi/pulumi-kubernetes/pull/983). +### Improvements + +- .NET SDK supports resources to work with YAML Kubernetes files and Helm charts. +(https://github.com/pulumi/pulumi-kubernetes/pull/980). + ## 1.5.3 (February 11, 2020) ### Bug fixes diff --git a/cmd/pulumi-gen-kubernetes/main.go b/cmd/pulumi-gen-kubernetes/main.go index 6960b388a3..9911c243b4 100644 --- a/cmd/pulumi-gen-kubernetes/main.go +++ b/cmd/pulumi-gen-kubernetes/main.go @@ -221,7 +221,7 @@ func writePythonClient(data map[string]interface{}, outdir, templateDir string) func writeDotnetClient(data map[string]interface{}, outdir, templateDir string) { - inputAPIcs, ouputAPIcs, kindsCs, err := gen.DotnetClient(data, templateDir) + inputAPIcs, ouputAPIcs, yamlcs, kindsCs, err := gen.DotnetClient(data, templateDir) if err != nil { panic(err) } @@ -247,6 +247,11 @@ func writeDotnetClient(data map[string]interface{}, outdir, templateDir string) panic(err) } + err = ioutil.WriteFile(fmt.Sprintf("%s/Yaml/Yaml.cs", outdir), []byte(yamlcs), 0777) + if err != nil { + panic(err) + } + for path, contents := range kindsCs { filename := filepath.Join(outdir, path) err := os.MkdirAll(filepath.Dir(filename), 0700) diff --git a/pkg/gen/dotnet-templates/Pulumi.Kubernetes.csproj b/pkg/gen/dotnet-templates/Pulumi.Kubernetes.csproj index 43ab885547..bbcff731ec 100644 --- a/pkg/gen/dotnet-templates/Pulumi.Kubernetes.csproj +++ b/pkg/gen/dotnet-templates/Pulumi.Kubernetes.csproj @@ -25,8 +25,9 @@ - + + diff --git a/pkg/gen/dotnet-templates/Utilities.cs b/pkg/gen/dotnet-templates/Utilities.cs index f3a380639b..8f52df1720 100644 --- a/pkg/gen/dotnet-templates/Utilities.cs +++ b/pkg/gen/dotnet-templates/Utilities.cs @@ -1,26 +1,145 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// Copyright 2016-2020, Pulumi Corporation +// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; -using Pulumi; +using System.Text; namespace Pulumi.Kubernetes { - static class Utilities + internal static class Utilities { - private readonly static string version; - public static string Version => version; + public static string Version { get; } static Utilities() { var assembly = typeof(Utilities).GetTypeInfo().Assembly; - using (var stream = assembly.GetManifestResourceStream("Pulumi.Kubernetes.version.txt")) - using (var reader = new StreamReader(stream)) + using var stream = assembly.GetManifestResourceStream("Pulumi.Kubernetes.version.txt"); + if (stream == null) + throw new Exception("Manifest file 'version.txt' not found"); + using var reader = new StreamReader(stream); + Version = reader.ReadToEnd().Trim(); + } + + public static InvokeOptions WithVersion(this InvokeOptions? options) + { + if (options?.Version != null) + { + return options; + } + return new InvokeOptions + { + Parent = options?.Parent, + Provider = options?.Provider, + Version = Version, + }; + } + + public static string ExecuteCommand(string command, string[] flags) + { + using var process = new Process + { + StartInfo = + { + FileName = command, + Arguments = EscapeArguments(flags), + RedirectStandardOutput = true, + RedirectStandardError = true + } + }; + process.Start(); + string output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + if (process.ExitCode > 0) + { + string error = process.StandardError.ReadToEnd(); + throw new Exception(error); + } + return output; + } + + /// + /// Convert an argument array to an argument string for using with Process.StartInfo.Arguments. + /// + private static string EscapeArguments(params string[] args) + => string.Join(" ", args.Select(EscapeArguments)); + + /// + /// Convert an argument array to an argument string for using with Process.StartInfo.Arguments. + /// + private static string EscapeArguments(string argument) + { + var escapedArgument = new StringBuilder(); + var backslashCount = 0; + var needsQuotes = false; + + foreach (var character in argument) + { + switch (character) + { + case '\\': + // Backslashes are simply passed through, except when they need + // to be escaped when followed by a \", e.g. the argument string + // \", which would be encoded to \\\" + backslashCount++; + escapedArgument.Append('\\'); + break; + + case '\"': + // Escape any preceding backslashes + escapedArgument.Append(new string('\\', backslashCount)); + + // Append an escaped double quote. + escapedArgument.Append("\\\""); + + // Reset the backslash counter. + backslashCount = 0; + break; + + case ' ': + case '\t': + // White spaces are escaped by surrounding the entire string with + // double quotes, which should be done at the end to prevent + // multiple wrappings. + needsQuotes = true; + + // Append the whitespace + escapedArgument.Append(character); + + // Reset the backslash counter. + backslashCount = 0; + break; + + default: + // Reset the backslash counter. + backslashCount = 0; + + // Append the current character + escapedArgument.Append(character); + break; + } + } + + // No need to wrap in quotes + if (!needsQuotes) { - version = reader.ReadToEnd().Trim(); + return escapedArgument.ToString(); } + + // Prepend the " + escapedArgument.Insert(0, '"'); + + // Escape any preceding backslashes before appending the " + escapedArgument.Append(new string('\\', backslashCount)); + + // Append the final " + escapedArgument.Append('\"'); + + return escapedArgument.ToString(); } } } diff --git a/pkg/gen/dotnet-templates/Yaml.cs.mustache b/pkg/gen/dotnet-templates/Yaml.cs.mustache new file mode 100644 index 0000000000..4ffe2ff4c4 --- /dev/null +++ b/pkg/gen/dotnet-templates/Yaml.cs.mustache @@ -0,0 +1,297 @@ +// Copyright 2016-2020, Pulumi Corporation +// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Text.Json; +using GlobExpressions; + +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Yaml +{ + /// + /// Base component for containers of Kubernetes resources. + /// + public abstract class CollectionComponentResource : ComponentResource + { + internal Output> Resources { get; private set; } = null!; + + protected CollectionComponentResource(string type, string name, ResourceOptions? options = null) + : base(type, name, options) + { + } + + protected void RegisterResources(Output> resources) + { + Resources = resources; + RegisterOutputs(new Dictionary { { "resources", resources } }); + } + + /// + /// Returns a resource defined by the given name. + /// + /// Resource name. + /// Optional namespace, e.g. "kube-prometheus-exporter-kubernetes". + /// The type of the resource. + public Output GetResource(string name, string? namespaceName = null) + where T : KubernetesResource + { + var type = typeof(T); + var groupVersionKind = + {{#Groups}} + {{#Versions}} + {{#TopLevelKindsAndAliases}} + type == typeof({{Group}}.{{Version}}.{{Kind}}) ? "{{RawAPIVersion}}/{{Kind}}" : + {{/TopLevelKindsAndAliases}} + {{/Versions}} + {{/Groups}} + throw new ArgumentException($"Unknown resource type {typeof(T).FullName}"); + var id = namespaceName != null ? $"{namespaceName}/{name}" : name; + return Resources.Apply(r => + { + if (!r.TryGetValue($"{groupVersionKind}::{id}", out var value)) + { + var existingKeys = string.Join(", ", r.Keys); + throw new ArgumentException($"Resource {groupVersionKind}::{id} of type {type.FullName} and id {id} is not found, existing resources are {existingKeys}"); + } + + return (T) value; + }); + } + + /// + /// Returns a custom resource defined by the given group/version/kind and name. + /// + /// Group/version/kind, e.g. "monitoring.coreos.com/v1/ServiceMonitor". + /// + /// Resource name. + /// Optional namespace, e.g. "kube-prometheus-exporter-kubernetes". + public Output GetCustomResource(string groupVersionKind, string name, string? namespaceName = null) + { + var id = namespaceName != null ? $"{namespaceName}/{name}" : name; + return Resources.Apply(r => (CustomResource)r[$"{groupVersionKind}::{id}"]); + } + } + + internal static class Parser + { + public static Output> Parse(ConfigGroupArgs config, ComponentResourceOptions? options) + { + var resources = Output.Create(ImmutableDictionary.Create()); + + if (config.Files != null) + { + var files = new List(); + foreach (var file in config.Files) + { + if (IsUrl(file)) + files.Add(file); + else + files.AddRange(Glob.Files(Directory.GetCurrentDirectory(), file)); + } + + foreach (var file in files) + { + var cf = new ConfigFile( + file, + new ConfigFileArgs + { + File = file, + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, + options); + resources = Output.Tuple(resources, cf.Resources).Apply(vs => vs.Item1.AddRange(vs.Item2)); + } + } + + if (config.Yaml != null) + { + var yamlResources = config.Yaml.ToOutput().Apply(texts => + { + var yamls = texts + .Select(text => + ParseYamlDocument(new ParseArgs + { + Objs = Invokes.YamlDecode(new YamlDecodeArgs { Text = text }), + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, options)) + .Select(output => (Input>)output) + .ToImmutableArray(); + return Output.All(yamls); + }); + + resources = Output.Tuple(resources, yamlResources).Apply(vs => + { + var builder = ImmutableDictionary.CreateBuilder(); + builder.AddRange(vs.Item1); + foreach (var bs in vs.Item2) + builder.AddRange(bs); + return builder.ToImmutable(); + }); + } + + if (config.Objs != null) + { + var docResources = ParseYamlDocument(new ParseArgs + { + Objs = config.Objs, + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, options); + resources = Output.Tuple(resources, docResources).Apply(vs => vs.Item1.AddRange(vs.Item2)); + } + + return resources; + + } + + internal static bool IsUrl(string s) => s.StartsWith("http://") || s.StartsWith("https://"); + + internal static Output> ParseYamlDocument(ParseArgs config, + ComponentResourceOptions? options = null) + { + return config.Objs.ToOutput().Apply(objs => + { + + var inputs = objs + .SelectMany(obj => ParseYamlObject(obj, config.Transformations, config.ResourcePrefix, options)) + .Select(output => (Input<(string, KubernetesResource)>) output) + .ToImmutableArray(); + + return Output.All(inputs) + .Apply(items => + items.Select(obj => new KeyValuePair(obj.Item1, obj.Item2)) + .ToImmutableDictionary()); + }); + } + + private static Output<(string, KubernetesResource)>[] ParseYamlObject(ImmutableDictionary obj, + TransformationAction[]? transformations, string? resourcePrefix, ComponentResourceOptions? options = null) + { + if (obj == null || obj.Count == 0) + return new Output<(string, KubernetesResource)>[0]; + + // Create custom resource options based on component resource options. + var opts = new CustomResourceOptions + { + Parent = options?.Parent, + DependsOn = options?.DependsOn ?? new InputList(), + IgnoreChanges = options?.IgnoreChanges ?? new List(), + Version = options?.Version, + Provider = options?.Provider, + CustomTimeouts = options?.CustomTimeouts + }; + + // Allow users to change API objects before any validation. + if (transformations != null) + { + foreach (var transform in transformations) + obj = transform(obj, opts); + } + + if (!(obj.ContainsKey("kind") && obj.ContainsKey("apiVersion"))) + { + var serialized = JsonSerializer.Serialize(obj); + throw new FormatException($"Kubernetes resources require a kind and apiVersion: {serialized}"); + } + + var kind = (string)obj["kind"]; + var apiVersion = (string)obj["apiVersion"]; + + // Recursively traverse built-in Kubernetes list types into a single set of "naked" resource + // definitions that we can register with the Pulumi engine. + // + // Kubernetes does not instantiate list types like `v1.List`. When the API server receives + // a list, it will recursively traverse it and perform the necessary operations on the + // each "instantiable" resource it finds. For example, `kubectl apply` on a + // `v1.ConfigMapList` will cause the API server to traverse the list, and `apply` each + // `v1.ConfigMap` it finds. + // + // Since Kubernetes does not instantiate list types directly, Pulumi also traverses lists + // for resource definitions that can be managed by Kubernetes, and registers those with the + // engine instead. + if ( + apiVersion == "v1" && kind == "List" + {{#Groups}} + {{#Versions}} + {{#ListTopLevelKindsAndAliases}} + || apiVersion == "{{RawAPIVersion}}" && kind == "{{Kind}}" + {{/ListTopLevelKindsAndAliases}} + {{/Versions}} + {{/Groups}} + ) + { + var objs = new List>(); + if (obj["items"] is IEnumerable> items) + { + foreach (var item in items) + objs.AddRange(Parser.ParseYamlObject(item, transformations, resourcePrefix)); + } + return objs.ToArray(); + } + + if (!obj.ContainsKey("metadata") || !(obj["metadata"] is ImmutableDictionary metadata) + || !metadata.ContainsKey("name")) + { + var serialized = obj.TryGetValue("metadata", out var m) ? JsonSerializer.Serialize(m) : ""; + throw new FormatException($"YAML object does not have a .metadata.name: {apiVersion}/{kind} {serialized}"); + } + + var meta = (ImmutableDictionary)obj["metadata"]; + var id = Output.Create((string)meta["name"]); + if (meta.TryGetValue("namespace", out object ns)) + id = Output.Format($"{ns}/{id}"); + if (resourcePrefix != null) + id = Output.Format($"{resourcePrefix}-{id}"); + + switch ($"{apiVersion}/{kind}") + { + {{#Groups}} + {{#Versions}} + {{#TopLevelKindsAndAliases}} + case "{{RawAPIVersion}}/{{Kind}}": + return new[] + { + id.Apply(id => ($"{{RawAPIVersion}}/{{Kind}}::{id}", + new {{Group}}.{{Version}}.{{Kind}}(id, obj!, opts) as KubernetesResource)) + }; + {{/TopLevelKindsAndAliases}} + {{/Versions}} + {{/Groups}} + default: + return new[] + { + id.Apply(id => ($"{apiVersion}/{kind}::{id}", + new ApiExtensions.V1.CustomResourceDefinition(id, obj!, opts) as KubernetesResource)) + }; + } + } + } + + internal class ParseArgs + { + /// + /// Objects representing Kubernetes resources. + /// + public InputList> Objs { get; set; } = null!; + + /// + /// A set of transformations to apply to Kubernetes resource definitions before registering + /// with engine. + /// + public TransformationAction[]? Transformations { get; set; } + + /// + /// An optional prefix for the auto-generated resource names. + /// Example: A resource created with resourcePrefix="foo" would produce a resource named "foo-resourceName". + /// + public string? ResourcePrefix { get; set; } + } +} diff --git a/pkg/gen/dotnet-templates/kind.cs.mustache b/pkg/gen/dotnet-templates/kind.cs.mustache index 6679f6ef85..fc4c3e433e 100644 --- a/pkg/gen/dotnet-templates/kind.cs.mustache +++ b/pkg/gen/dotnet-templates/kind.cs.mustache @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.{{Group}}.{{Version}} /// /// {{{DeprecationComment}}}{{{Comment}}}{{{PulumiComment}}} /// - public partial class {{Kind}} : Pulumi.CustomResource + public partial class {{Kind}} : KubernetesResource { {{#Properties}} {{{Comment}}} @@ -26,7 +26,12 @@ namespace Pulumi.Kubernetes.{{Group}}.{{Version}} /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public {{Kind}}(string name, Types.Inputs.{{Group}}.{{Version}}.{{Kind}}Args? args = null, CustomResourceOptions? options = null) - : base("kubernetes:{{URNAPIVersion}}:{{Kind}}", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:{{URNAPIVersion}}:{{Kind}}", name, SetAPIKindAndVersion(args), options) + { + } + + internal {{Kind}}(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:{{URNAPIVersion}}:{{Kind}}", name, dictionary, options) { } @@ -38,15 +43,6 @@ namespace Pulumi.Kubernetes.{{Group}}.{{Version}} return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing {{Kind}} resource's state with the given name and ID. /// @@ -55,10 +51,8 @@ namespace Pulumi.Kubernetes.{{Group}}.{{Version}} /// A bag of options that control this resource's behavior public static {{Kind}} Get(string name, Input id, CustomResourceOptions? options = null) { - return new {{Kind}}(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new {{Kind}}(name, default(Types.Inputs.{{Group}}.{{Version}}.{{Kind}}Args), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/pkg/gen/dotnet.go b/pkg/gen/dotnet.go index cf6d777ebb..237c667fb0 100644 --- a/pkg/gen/dotnet.go +++ b/pkg/gen/dotnet.go @@ -78,7 +78,7 @@ func pascalCase(name string) string { func DotnetClient( swagger map[string]interface{}, templateDir string, -) (inputsts, outputsts string, groups map[string]string, err error) { +) (inputsts, outputsts, yaml string, groups map[string]string, err error) { definitions := swagger["definitions"].(map[string]interface{}) groupsSlice := createGroups(definitions, dotnetOpts()) @@ -99,6 +99,14 @@ func DotnetClient( return } + yaml, err = mustache.RenderFile(fmt.Sprintf("%s/Yaml.cs.mustache", templateDir), + map[string]interface{}{ + "Groups": groupsSlice, + }) + if err != nil { + return + } + groups = make(map[string]string) for _, group := range groupsSlice { for _, version := range group.Versions() { @@ -129,7 +137,7 @@ func DotnetClient( kindCs, err := mustache.RenderFile( fmt.Sprintf("%s/kind.cs.mustache", templateDir), inputMap) if err != nil { - return "", "", nil, err + return "", "", "", nil, err } groups[filepath.Join(group.Group(), version.Version(), kind.Kind()+".cs")] = kindCs diff --git a/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfiguration.cs b/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfiguration.cs index 41941156ca..a1debca0c7 100755 --- a/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfiguration.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfiguration.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1 /// MutatingWebhookConfiguration describes the configuration of and admission webhook that /// accept or reject and may change the object. /// - public partial class MutatingWebhookConfiguration : Pulumi.CustomResource + public partial class MutatingWebhookConfiguration : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class MutatingWebhookConfiguration : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public MutatingWebhookConfiguration(string name, Types.Inputs.AdmissionRegistration.V1.MutatingWebhookConfigurationArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, SetAPIKindAndVersion(args), options) + { + } + + internal MutatingWebhookConfiguration(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing MutatingWebhookConfiguration resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static MutatingWebhookConfiguration Get(string name, Input id, CustomResourceOptions? options = null) { - return new MutatingWebhookConfiguration(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new MutatingWebhookConfiguration(name, default(Types.Inputs.AdmissionRegistration.V1.MutatingWebhookConfigurationArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfigurationList.cs b/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfigurationList.cs index c03049d032..ac932b2391 100755 --- a/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfigurationList.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/MutatingWebhookConfigurationList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1 /// /// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. /// - public partial class MutatingWebhookConfigurationList : Pulumi.CustomResource + public partial class MutatingWebhookConfigurationList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class MutatingWebhookConfigurationList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public MutatingWebhookConfigurationList(string name, Types.Inputs.AdmissionRegistration.V1.MutatingWebhookConfigurationListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), options) + { + } + + internal MutatingWebhookConfigurationList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing MutatingWebhookConfigurationList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static MutatingWebhookConfigurationList Get(string name, Input id, CustomResourceOptions? options = null) { - return new MutatingWebhookConfigurationList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new MutatingWebhookConfigurationList(name, default(Types.Inputs.AdmissionRegistration.V1.MutatingWebhookConfigurationListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfiguration.cs b/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfiguration.cs index c36626a247..f98c23c48f 100755 --- a/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfiguration.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfiguration.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1 /// ValidatingWebhookConfiguration describes the configuration of and admission webhook that /// accept or reject and object without changing it. /// - public partial class ValidatingWebhookConfiguration : Pulumi.CustomResource + public partial class ValidatingWebhookConfiguration : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ValidatingWebhookConfiguration : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ValidatingWebhookConfiguration(string name, Types.Inputs.AdmissionRegistration.V1.ValidatingWebhookConfigurationArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, SetAPIKindAndVersion(args), options) + { + } + + internal ValidatingWebhookConfiguration(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfiguration", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ValidatingWebhookConfiguration resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ValidatingWebhookConfiguration Get(string name, Input id, CustomResourceOptions? options = null) { - return new ValidatingWebhookConfiguration(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ValidatingWebhookConfiguration(name, default(Types.Inputs.AdmissionRegistration.V1.ValidatingWebhookConfigurationArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfigurationList.cs b/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfigurationList.cs index 607980e5f4..71785f210f 100755 --- a/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfigurationList.cs +++ b/sdk/dotnet/AdmissionRegistration/V1/ValidatingWebhookConfigurationList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1 /// /// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. /// - public partial class ValidatingWebhookConfigurationList : Pulumi.CustomResource + public partial class ValidatingWebhookConfigurationList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ValidatingWebhookConfigurationList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ValidatingWebhookConfigurationList(string name, Types.Inputs.AdmissionRegistration.V1.ValidatingWebhookConfigurationListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ValidatingWebhookConfigurationList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1:ValidatingWebhookConfigurationList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ValidatingWebhookConfigurationList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ValidatingWebhookConfigurationList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ValidatingWebhookConfigurationList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ValidatingWebhookConfigurationList(name, default(Types.Inputs.AdmissionRegistration.V1.ValidatingWebhookConfigurationListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfiguration.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfiguration.cs index f3eb178799..267da5ddad 100755 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfiguration.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfiguration.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1Beta1 /// accept or reject and may change the object. Deprecated in v1.16, planned for removal in /// v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. /// - public partial class MutatingWebhookConfiguration : Pulumi.CustomResource + public partial class MutatingWebhookConfiguration : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -53,7 +53,12 @@ public partial class MutatingWebhookConfiguration : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public MutatingWebhookConfiguration(string name, Types.Inputs.AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration", name, SetAPIKindAndVersion(args), options) + { + } + + internal MutatingWebhookConfiguration(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration", name, dictionary, options) { } @@ -65,15 +70,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing MutatingWebhookConfiguration resource's state with the given name and ID. /// @@ -82,10 +78,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static MutatingWebhookConfiguration Get(string name, Input id, CustomResourceOptions? options = null) { - return new MutatingWebhookConfiguration(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new MutatingWebhookConfiguration(name, default(Types.Inputs.AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfigurationList.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfigurationList.cs index b79bf775f5..5751f4c43d 100755 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfigurationList.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/MutatingWebhookConfigurationList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1Beta1 /// /// MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration. /// - public partial class MutatingWebhookConfigurationList : Pulumi.CustomResource + public partial class MutatingWebhookConfigurationList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class MutatingWebhookConfigurationList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public MutatingWebhookConfigurationList(string name, Types.Inputs.AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), options) + { + } + + internal MutatingWebhookConfigurationList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing MutatingWebhookConfigurationList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static MutatingWebhookConfigurationList Get(string name, Input id, CustomResourceOptions? options = null) { - return new MutatingWebhookConfigurationList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new MutatingWebhookConfigurationList(name, default(Types.Inputs.AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfiguration.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfiguration.cs index 62451aab72..08a2040f90 100755 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfiguration.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfiguration.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1Beta1 /// accept or reject and object without changing it. Deprecated in v1.16, planned for removal in /// v1.19. Use admissionregistration.k8s.io/v1 ValidatingWebhookConfiguration instead. /// - public partial class ValidatingWebhookConfiguration : Pulumi.CustomResource + public partial class ValidatingWebhookConfiguration : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -53,7 +53,12 @@ public partial class ValidatingWebhookConfiguration : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ValidatingWebhookConfiguration(string name, Types.Inputs.AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfiguration", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfiguration", name, SetAPIKindAndVersion(args), options) + { + } + + internal ValidatingWebhookConfiguration(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfiguration", name, dictionary, options) { } @@ -65,15 +70,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ValidatingWebhookConfiguration resource's state with the given name and ID. /// @@ -82,10 +78,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ValidatingWebhookConfiguration Get(string name, Input id, CustomResourceOptions? options = null) { - return new ValidatingWebhookConfiguration(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ValidatingWebhookConfiguration(name, default(Types.Inputs.AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfigurationList.cs b/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfigurationList.cs index 04e6291591..fcba84e31f 100755 --- a/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfigurationList.cs +++ b/sdk/dotnet/AdmissionRegistration/V1Beta1/ValidatingWebhookConfigurationList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AdmissionRegistration.V1Beta1 /// /// ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration. /// - public partial class ValidatingWebhookConfigurationList : Pulumi.CustomResource + public partial class ValidatingWebhookConfigurationList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ValidatingWebhookConfigurationList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ValidatingWebhookConfigurationList(string name, Types.Inputs.AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfigurationList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ValidatingWebhookConfigurationList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:admissionregistration.k8s.io/v1beta1:ValidatingWebhookConfigurationList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AdmissionRegistrat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ValidatingWebhookConfigurationList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ValidatingWebhookConfigurationList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ValidatingWebhookConfigurationList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ValidatingWebhookConfigurationList(name, default(Types.Inputs.AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinition.cs b/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinition.cs index b2efeeb091..e4b201a356 100755 --- a/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinition.cs +++ b/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinition.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.ApiExtensions.V1 /// CustomResourceDefinition represents a resource that should be exposed on the API server. /// Its name MUST be in the format &lt;.spec.name&gt;.&lt;.spec.group&gt;. /// - public partial class CustomResourceDefinition : Pulumi.CustomResource + public partial class CustomResourceDefinition : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -55,7 +55,12 @@ public partial class CustomResourceDefinition : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CustomResourceDefinition(string name, Types.Inputs.ApiExtensions.V1.CustomResourceDefinitionArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition", name, SetAPIKindAndVersion(args), options) + { + } + + internal CustomResourceDefinition(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinition", name, dictionary, options) { } @@ -67,15 +72,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiExtensions.V1.C return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CustomResourceDefinition resource's state with the given name and ID. /// @@ -84,10 +80,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CustomResourceDefinition Get(string name, Input id, CustomResourceOptions? options = null) { - return new CustomResourceDefinition(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CustomResourceDefinition(name, default(Types.Inputs.ApiExtensions.V1.CustomResourceDefinitionArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinitionList.cs b/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinitionList.cs index bc141cae09..290e52d351 100755 --- a/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinitionList.cs +++ b/sdk/dotnet/ApiExtensions/V1/CustomResourceDefinitionList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiExtensions.V1 /// /// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. /// - public partial class CustomResourceDefinitionList : Pulumi.CustomResource + public partial class CustomResourceDefinitionList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -48,7 +48,12 @@ public partial class CustomResourceDefinitionList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CustomResourceDefinitionList(string name, Types.Inputs.ApiExtensions.V1.CustomResourceDefinitionListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinitionList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinitionList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CustomResourceDefinitionList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiextensions.k8s.io/v1:CustomResourceDefinitionList", name, dictionary, options) { } @@ -60,15 +65,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiExtensions.V1.C return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CustomResourceDefinitionList resource's state with the given name and ID. /// @@ -77,10 +73,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CustomResourceDefinitionList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CustomResourceDefinitionList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CustomResourceDefinitionList(name, default(Types.Inputs.ApiExtensions.V1.CustomResourceDefinitionListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinition.cs b/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinition.cs index 2cdb9054c6..265111e422 100755 --- a/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinition.cs +++ b/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinition.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.ApiExtensions.V1Beta1 /// Deprecated in v1.16, planned for removal in v1.19. Use apiextensions.k8s.io/v1 /// CustomResourceDefinition instead. /// - public partial class CustomResourceDefinition : Pulumi.CustomResource + public partial class CustomResourceDefinition : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -57,7 +57,12 @@ public partial class CustomResourceDefinition : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CustomResourceDefinition(string name, Types.Inputs.ApiExtensions.V1Beta1.CustomResourceDefinitionArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition", name, SetAPIKindAndVersion(args), options) + { + } + + internal CustomResourceDefinition(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinition", name, dictionary, options) { } @@ -69,15 +74,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiExtensions.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CustomResourceDefinition resource's state with the given name and ID. /// @@ -86,10 +82,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CustomResourceDefinition Get(string name, Input id, CustomResourceOptions? options = null) { - return new CustomResourceDefinition(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CustomResourceDefinition(name, default(Types.Inputs.ApiExtensions.V1Beta1.CustomResourceDefinitionArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinitionList.cs b/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinitionList.cs index e7d2390498..19ec1e8bc7 100755 --- a/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinitionList.cs +++ b/sdk/dotnet/ApiExtensions/V1Beta1/CustomResourceDefinitionList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiExtensions.V1Beta1 /// /// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. /// - public partial class CustomResourceDefinitionList : Pulumi.CustomResource + public partial class CustomResourceDefinitionList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -48,7 +48,12 @@ public partial class CustomResourceDefinitionList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CustomResourceDefinitionList(string name, Types.Inputs.ApiExtensions.V1Beta1.CustomResourceDefinitionListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinitionList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinitionList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CustomResourceDefinitionList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiextensions.k8s.io/v1beta1:CustomResourceDefinitionList", name, dictionary, options) { } @@ -60,15 +65,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiExtensions.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CustomResourceDefinitionList resource's state with the given name and ID. /// @@ -77,10 +73,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CustomResourceDefinitionList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CustomResourceDefinitionList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CustomResourceDefinitionList(name, default(Types.Inputs.ApiExtensions.V1Beta1.CustomResourceDefinitionListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiRegistration/V1/APIService.cs b/sdk/dotnet/ApiRegistration/V1/APIService.cs index 8bb461b87c..cb7f22b443 100755 --- a/sdk/dotnet/ApiRegistration/V1/APIService.cs +++ b/sdk/dotnet/ApiRegistration/V1/APIService.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiRegistration.V1 /// /// APIService represents a server for a particular GroupVersion. Name must be "version.group". /// - public partial class APIService : Pulumi.CustomResource + public partial class APIService : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -54,7 +54,12 @@ public partial class APIService : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public APIService(string name, Types.Inputs.ApiRegistration.V1.APIServiceArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiregistration/v1:APIService", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiregistration/v1:APIService", name, SetAPIKindAndVersion(args), options) + { + } + + internal APIService(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiregistration/v1:APIService", name, dictionary, options) { } @@ -66,15 +71,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiRegistration.V1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing APIService resource's state with the given name and ID. /// @@ -83,10 +79,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static APIService Get(string name, Input id, CustomResourceOptions? options = null) { - return new APIService(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new APIService(name, default(Types.Inputs.ApiRegistration.V1.APIServiceArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiRegistration/V1/APIServiceList.cs b/sdk/dotnet/ApiRegistration/V1/APIServiceList.cs index 6027dea9a4..d424060a5b 100755 --- a/sdk/dotnet/ApiRegistration/V1/APIServiceList.cs +++ b/sdk/dotnet/ApiRegistration/V1/APIServiceList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiRegistration.V1 /// /// APIServiceList is a list of APIService objects. /// - public partial class APIServiceList : Pulumi.CustomResource + public partial class APIServiceList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class APIServiceList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public APIServiceList(string name, Types.Inputs.ApiRegistration.V1.APIServiceListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiregistration/v1:APIServiceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiregistration/v1:APIServiceList", name, SetAPIKindAndVersion(args), options) + { + } + + internal APIServiceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiregistration/v1:APIServiceList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiRegistration.V1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing APIServiceList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static APIServiceList Get(string name, Input id, CustomResourceOptions? options = null) { - return new APIServiceList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new APIServiceList(name, default(Types.Inputs.ApiRegistration.V1.APIServiceListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiRegistration/V1Beta1/APIService.cs b/sdk/dotnet/ApiRegistration/V1Beta1/APIService.cs index 0081bbbcad..2083574c4c 100755 --- a/sdk/dotnet/ApiRegistration/V1Beta1/APIService.cs +++ b/sdk/dotnet/ApiRegistration/V1Beta1/APIService.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiRegistration.V1Beta1 /// /// APIService represents a server for a particular GroupVersion. Name must be "version.group". /// - public partial class APIService : Pulumi.CustomResource + public partial class APIService : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -54,7 +54,12 @@ public partial class APIService : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public APIService(string name, Types.Inputs.ApiRegistration.V1Beta1.APIServiceArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiregistration/v1beta1:APIService", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiregistration/v1beta1:APIService", name, SetAPIKindAndVersion(args), options) + { + } + + internal APIService(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiregistration/v1beta1:APIService", name, dictionary, options) { } @@ -66,15 +71,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiRegistration.V1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing APIService resource's state with the given name and ID. /// @@ -83,10 +79,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static APIService Get(string name, Input id, CustomResourceOptions? options = null) { - return new APIService(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new APIService(name, default(Types.Inputs.ApiRegistration.V1Beta1.APIServiceArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/ApiRegistration/V1Beta1/APIServiceList.cs b/sdk/dotnet/ApiRegistration/V1Beta1/APIServiceList.cs index e54ddfbc0f..afe1645442 100755 --- a/sdk/dotnet/ApiRegistration/V1Beta1/APIServiceList.cs +++ b/sdk/dotnet/ApiRegistration/V1Beta1/APIServiceList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.ApiRegistration.V1Beta1 /// /// APIServiceList is a list of APIService objects. /// - public partial class APIServiceList : Pulumi.CustomResource + public partial class APIServiceList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class APIServiceList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public APIServiceList(string name, Types.Inputs.ApiRegistration.V1Beta1.APIServiceListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apiregistration/v1beta1:APIServiceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apiregistration/v1beta1:APIServiceList", name, SetAPIKindAndVersion(args), options) + { + } + + internal APIServiceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apiregistration/v1beta1:APIServiceList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.ApiRegistration.V1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing APIServiceList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static APIServiceList Get(string name, Input id, CustomResourceOptions? options = null) { - return new APIServiceList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new APIServiceList(name, default(Types.Inputs.ApiRegistration.V1Beta1.APIServiceListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/ControllerRevision.cs b/sdk/dotnet/Apps/V1/ControllerRevision.cs index 4957ae20ab..17754390a0 100755 --- a/sdk/dotnet/Apps/V1/ControllerRevision.cs +++ b/sdk/dotnet/Apps/V1/ControllerRevision.cs @@ -17,7 +17,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// and representation changes in future releases, and clients should not depend on its /// stability. It is primarily for internal use by controllers. /// - public partial class ControllerRevision : Pulumi.CustomResource + public partial class ControllerRevision : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -64,7 +64,12 @@ public partial class ControllerRevision : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevision(string name, Types.Inputs.Apps.V1.ControllerRevisionArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:ControllerRevision", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:ControllerRevision", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevision(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:ControllerRevision", name, dictionary, options) { } @@ -76,15 +81,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.Controller return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevision resource's state with the given name and ID. /// @@ -93,10 +89,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevision Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevision(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevision(name, default(Types.Inputs.Apps.V1.ControllerRevisionArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/ControllerRevisionList.cs b/sdk/dotnet/Apps/V1/ControllerRevisionList.cs index 98f1f9dc09..f3e41cdede 100755 --- a/sdk/dotnet/Apps/V1/ControllerRevisionList.cs +++ b/sdk/dotnet/Apps/V1/ControllerRevisionList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// ControllerRevisionList is a resource containing a list of ControllerRevision objects. /// - public partial class ControllerRevisionList : Pulumi.CustomResource + public partial class ControllerRevisionList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ControllerRevisionList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevisionList(string name, Types.Inputs.Apps.V1.ControllerRevisionListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:ControllerRevisionList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:ControllerRevisionList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevisionList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:ControllerRevisionList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.Controller return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevisionList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevisionList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevisionList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevisionList(name, default(Types.Inputs.Apps.V1.ControllerRevisionListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/DaemonSet.cs b/sdk/dotnet/Apps/V1/DaemonSet.cs index 137eb210ba..f5c1cee6e0 100755 --- a/sdk/dotnet/Apps/V1/DaemonSet.cs +++ b/sdk/dotnet/Apps/V1/DaemonSet.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// DaemonSet represents the configuration of a daemon set. /// - public partial class DaemonSet : Pulumi.CustomResource + public partial class DaemonSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class DaemonSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSet(string name, Types.Inputs.Apps.V1.DaemonSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:DaemonSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:DaemonSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:DaemonSet", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.DaemonSetA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSet resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSet(name, default(Types.Inputs.Apps.V1.DaemonSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/DaemonSetList.cs b/sdk/dotnet/Apps/V1/DaemonSetList.cs index f38f29179f..8f662c049c 100755 --- a/sdk/dotnet/Apps/V1/DaemonSetList.cs +++ b/sdk/dotnet/Apps/V1/DaemonSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// DaemonSetList is a collection of daemon sets. /// - public partial class DaemonSetList : Pulumi.CustomResource + public partial class DaemonSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class DaemonSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSetList(string name, Types.Inputs.Apps.V1.DaemonSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:DaemonSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:DaemonSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:DaemonSetList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.DaemonSetL return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSetList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSetList(name, default(Types.Inputs.Apps.V1.DaemonSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/Deployment.cs b/sdk/dotnet/Apps/V1/Deployment.cs index a3138a8bb4..3545b7c01b 100755 --- a/sdk/dotnet/Apps/V1/Deployment.cs +++ b/sdk/dotnet/Apps/V1/Deployment.cs @@ -34,7 +34,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Deployment : Pulumi.CustomResource + public partial class Deployment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -80,7 +80,12 @@ public partial class Deployment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Deployment(string name, Types.Inputs.Apps.V1.DeploymentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:Deployment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:Deployment", name, SetAPIKindAndVersion(args), options) + { + } + + internal Deployment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:Deployment", name, dictionary, options) { } @@ -92,15 +97,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.Deployment return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Deployment resource's state with the given name and ID. /// @@ -109,10 +105,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Deployment Get(string name, Input id, CustomResourceOptions? options = null) { - return new Deployment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Deployment(name, default(Types.Inputs.Apps.V1.DeploymentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/DeploymentList.cs b/sdk/dotnet/Apps/V1/DeploymentList.cs index 12ee96e9b1..544f5eb1ad 100755 --- a/sdk/dotnet/Apps/V1/DeploymentList.cs +++ b/sdk/dotnet/Apps/V1/DeploymentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// DeploymentList is a list of Deployments. /// - public partial class DeploymentList : Pulumi.CustomResource + public partial class DeploymentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class DeploymentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DeploymentList(string name, Types.Inputs.Apps.V1.DeploymentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:DeploymentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:DeploymentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DeploymentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:DeploymentList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.Deployment return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DeploymentList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DeploymentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DeploymentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DeploymentList(name, default(Types.Inputs.Apps.V1.DeploymentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/ReplicaSet.cs b/sdk/dotnet/Apps/V1/ReplicaSet.cs index a81a99d87c..eec32ba570 100755 --- a/sdk/dotnet/Apps/V1/ReplicaSet.cs +++ b/sdk/dotnet/Apps/V1/ReplicaSet.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// ReplicaSet ensures that a specified number of pod replicas are running at any given time. /// - public partial class ReplicaSet : Pulumi.CustomResource + public partial class ReplicaSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class ReplicaSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSet(string name, Types.Inputs.Apps.V1.ReplicaSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:ReplicaSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:ReplicaSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:ReplicaSet", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.ReplicaSet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSet resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSet(name, default(Types.Inputs.Apps.V1.ReplicaSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/ReplicaSetList.cs b/sdk/dotnet/Apps/V1/ReplicaSetList.cs index a7e3e8fd29..be2d6c8c94 100755 --- a/sdk/dotnet/Apps/V1/ReplicaSetList.cs +++ b/sdk/dotnet/Apps/V1/ReplicaSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// ReplicaSetList is a collection of ReplicaSets. /// - public partial class ReplicaSetList : Pulumi.CustomResource + public partial class ReplicaSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ReplicaSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSetList(string name, Types.Inputs.Apps.V1.ReplicaSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:ReplicaSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:ReplicaSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:ReplicaSetList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.ReplicaSet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSetList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSetList(name, default(Types.Inputs.Apps.V1.ReplicaSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/StatefulSet.cs b/sdk/dotnet/Apps/V1/StatefulSet.cs index 277531bad9..e5ba1a1cc7 100755 --- a/sdk/dotnet/Apps/V1/StatefulSet.cs +++ b/sdk/dotnet/Apps/V1/StatefulSet.cs @@ -27,7 +27,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class StatefulSet : Pulumi.CustomResource + public partial class StatefulSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -72,7 +72,12 @@ public partial class StatefulSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSet(string name, Types.Inputs.Apps.V1.StatefulSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:StatefulSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:StatefulSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:StatefulSet", name, dictionary, options) { } @@ -84,15 +89,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.StatefulSe return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSet resource's state with the given name and ID. /// @@ -101,10 +97,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSet(name, default(Types.Inputs.Apps.V1.StatefulSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1/StatefulSetList.cs b/sdk/dotnet/Apps/V1/StatefulSetList.cs index d8543c1cc3..74f23986fd 100755 --- a/sdk/dotnet/Apps/V1/StatefulSetList.cs +++ b/sdk/dotnet/Apps/V1/StatefulSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1 /// /// StatefulSetList is a collection of StatefulSets. /// - public partial class StatefulSetList : Pulumi.CustomResource + public partial class StatefulSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class StatefulSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSetList(string name, Types.Inputs.Apps.V1.StatefulSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1:StatefulSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1:StatefulSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1:StatefulSetList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1.StatefulSe return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSetList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSetList(name, default(Types.Inputs.Apps.V1.StatefulSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/ControllerRevision.cs b/sdk/dotnet/Apps/V1Beta1/ControllerRevision.cs index 11278b757b..f7df8cc638 100755 --- a/sdk/dotnet/Apps/V1Beta1/ControllerRevision.cs +++ b/sdk/dotnet/Apps/V1Beta1/ControllerRevision.cs @@ -20,7 +20,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// and representation changes in future releases, and clients should not depend on its /// stability. It is primarily for internal use by controllers. /// - public partial class ControllerRevision : Pulumi.CustomResource + public partial class ControllerRevision : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -67,7 +67,12 @@ public partial class ControllerRevision : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevision(string name, Types.Inputs.Apps.V1Beta1.ControllerRevisionArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:ControllerRevision", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:ControllerRevision", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevision(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:ControllerRevision", name, dictionary, options) { } @@ -79,15 +84,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.Contr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevision resource's state with the given name and ID. /// @@ -96,10 +92,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevision Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevision(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevision(name, default(Types.Inputs.Apps.V1Beta1.ControllerRevisionArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/ControllerRevisionList.cs b/sdk/dotnet/Apps/V1Beta1/ControllerRevisionList.cs index 7b97f55dee..46242decf7 100755 --- a/sdk/dotnet/Apps/V1Beta1/ControllerRevisionList.cs +++ b/sdk/dotnet/Apps/V1Beta1/ControllerRevisionList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// /// ControllerRevisionList is a resource containing a list of ControllerRevision objects. /// - public partial class ControllerRevisionList : Pulumi.CustomResource + public partial class ControllerRevisionList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ControllerRevisionList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevisionList(string name, Types.Inputs.Apps.V1Beta1.ControllerRevisionListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:ControllerRevisionList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:ControllerRevisionList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevisionList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:ControllerRevisionList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.Contr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevisionList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevisionList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevisionList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevisionList(name, default(Types.Inputs.Apps.V1Beta1.ControllerRevisionListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/Deployment.cs b/sdk/dotnet/Apps/V1Beta1/Deployment.cs index 6376aba1e7..5d426d0c21 100755 --- a/sdk/dotnet/Apps/V1Beta1/Deployment.cs +++ b/sdk/dotnet/Apps/V1Beta1/Deployment.cs @@ -37,7 +37,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Deployment : Pulumi.CustomResource + public partial class Deployment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -83,7 +83,12 @@ public partial class Deployment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Deployment(string name, Types.Inputs.Apps.V1Beta1.DeploymentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:Deployment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:Deployment", name, SetAPIKindAndVersion(args), options) + { + } + + internal Deployment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:Deployment", name, dictionary, options) { } @@ -95,15 +100,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.Deplo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Deployment resource's state with the given name and ID. /// @@ -112,10 +108,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Deployment Get(string name, Input id, CustomResourceOptions? options = null) { - return new Deployment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Deployment(name, default(Types.Inputs.Apps.V1Beta1.DeploymentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/DeploymentList.cs b/sdk/dotnet/Apps/V1Beta1/DeploymentList.cs index b75cf30973..15aa25935d 100755 --- a/sdk/dotnet/Apps/V1Beta1/DeploymentList.cs +++ b/sdk/dotnet/Apps/V1Beta1/DeploymentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// /// DeploymentList is a list of Deployments. /// - public partial class DeploymentList : Pulumi.CustomResource + public partial class DeploymentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class DeploymentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DeploymentList(string name, Types.Inputs.Apps.V1Beta1.DeploymentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:DeploymentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:DeploymentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DeploymentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:DeploymentList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.Deplo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DeploymentList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DeploymentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DeploymentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DeploymentList(name, default(Types.Inputs.Apps.V1Beta1.DeploymentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/StatefulSet.cs b/sdk/dotnet/Apps/V1Beta1/StatefulSet.cs index 2f22fcc95f..e4356d4f40 100755 --- a/sdk/dotnet/Apps/V1Beta1/StatefulSet.cs +++ b/sdk/dotnet/Apps/V1Beta1/StatefulSet.cs @@ -30,7 +30,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class StatefulSet : Pulumi.CustomResource + public partial class StatefulSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -75,7 +75,12 @@ public partial class StatefulSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSet(string name, Types.Inputs.Apps.V1Beta1.StatefulSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:StatefulSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:StatefulSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:StatefulSet", name, dictionary, options) { } @@ -87,15 +92,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.State return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSet resource's state with the given name and ID. /// @@ -104,10 +100,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSet(name, default(Types.Inputs.Apps.V1Beta1.StatefulSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta1/StatefulSetList.cs b/sdk/dotnet/Apps/V1Beta1/StatefulSetList.cs index 42fca05b43..d5948f54c6 100755 --- a/sdk/dotnet/Apps/V1Beta1/StatefulSetList.cs +++ b/sdk/dotnet/Apps/V1Beta1/StatefulSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta1 /// /// StatefulSetList is a collection of StatefulSets. /// - public partial class StatefulSetList : Pulumi.CustomResource + public partial class StatefulSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class StatefulSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSetList(string name, Types.Inputs.Apps.V1Beta1.StatefulSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta1:StatefulSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta1:StatefulSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta1:StatefulSetList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta1.State return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSetList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSetList(name, default(Types.Inputs.Apps.V1Beta1.StatefulSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/ControllerRevision.cs b/sdk/dotnet/Apps/V1Beta2/ControllerRevision.cs index 180323faca..7087426910 100755 --- a/sdk/dotnet/Apps/V1Beta2/ControllerRevision.cs +++ b/sdk/dotnet/Apps/V1Beta2/ControllerRevision.cs @@ -20,7 +20,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// and representation changes in future releases, and clients should not depend on its /// stability. It is primarily for internal use by controllers. /// - public partial class ControllerRevision : Pulumi.CustomResource + public partial class ControllerRevision : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -67,7 +67,12 @@ public partial class ControllerRevision : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevision(string name, Types.Inputs.Apps.V1Beta2.ControllerRevisionArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:ControllerRevision", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:ControllerRevision", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevision(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:ControllerRevision", name, dictionary, options) { } @@ -79,15 +84,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Contr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevision resource's state with the given name and ID. /// @@ -96,10 +92,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevision Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevision(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevision(name, default(Types.Inputs.Apps.V1Beta2.ControllerRevisionArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/ControllerRevisionList.cs b/sdk/dotnet/Apps/V1Beta2/ControllerRevisionList.cs index bb7308da64..423d2c12cf 100755 --- a/sdk/dotnet/Apps/V1Beta2/ControllerRevisionList.cs +++ b/sdk/dotnet/Apps/V1Beta2/ControllerRevisionList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// ControllerRevisionList is a resource containing a list of ControllerRevision objects. /// - public partial class ControllerRevisionList : Pulumi.CustomResource + public partial class ControllerRevisionList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ControllerRevisionList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ControllerRevisionList(string name, Types.Inputs.Apps.V1Beta2.ControllerRevisionListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:ControllerRevisionList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:ControllerRevisionList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ControllerRevisionList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:ControllerRevisionList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Contr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ControllerRevisionList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ControllerRevisionList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ControllerRevisionList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ControllerRevisionList(name, default(Types.Inputs.Apps.V1Beta2.ControllerRevisionListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/DaemonSet.cs b/sdk/dotnet/Apps/V1Beta2/DaemonSet.cs index 9ff5f9be47..4c30048b80 100755 --- a/sdk/dotnet/Apps/V1Beta2/DaemonSet.cs +++ b/sdk/dotnet/Apps/V1Beta2/DaemonSet.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// DaemonSet represents the configuration of a daemon set. /// - public partial class DaemonSet : Pulumi.CustomResource + public partial class DaemonSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -63,7 +63,12 @@ public partial class DaemonSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSet(string name, Types.Inputs.Apps.V1Beta2.DaemonSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:DaemonSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:DaemonSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:DaemonSet", name, dictionary, options) { } @@ -75,15 +80,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Daemo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSet resource's state with the given name and ID. /// @@ -92,10 +88,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSet(name, default(Types.Inputs.Apps.V1Beta2.DaemonSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/DaemonSetList.cs b/sdk/dotnet/Apps/V1Beta2/DaemonSetList.cs index fecc57d981..cc075d7c95 100755 --- a/sdk/dotnet/Apps/V1Beta2/DaemonSetList.cs +++ b/sdk/dotnet/Apps/V1Beta2/DaemonSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// DaemonSetList is a collection of daemon sets. /// - public partial class DaemonSetList : Pulumi.CustomResource + public partial class DaemonSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class DaemonSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSetList(string name, Types.Inputs.Apps.V1Beta2.DaemonSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:DaemonSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:DaemonSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:DaemonSetList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Daemo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSetList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSetList(name, default(Types.Inputs.Apps.V1Beta2.DaemonSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/Deployment.cs b/sdk/dotnet/Apps/V1Beta2/Deployment.cs index 3783603e63..38c52aefa5 100755 --- a/sdk/dotnet/Apps/V1Beta2/Deployment.cs +++ b/sdk/dotnet/Apps/V1Beta2/Deployment.cs @@ -37,7 +37,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Deployment : Pulumi.CustomResource + public partial class Deployment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -83,7 +83,12 @@ public partial class Deployment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Deployment(string name, Types.Inputs.Apps.V1Beta2.DeploymentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:Deployment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:Deployment", name, SetAPIKindAndVersion(args), options) + { + } + + internal Deployment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:Deployment", name, dictionary, options) { } @@ -95,15 +100,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Deplo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Deployment resource's state with the given name and ID. /// @@ -112,10 +108,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Deployment Get(string name, Input id, CustomResourceOptions? options = null) { - return new Deployment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Deployment(name, default(Types.Inputs.Apps.V1Beta2.DeploymentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/DeploymentList.cs b/sdk/dotnet/Apps/V1Beta2/DeploymentList.cs index 0820acd8b4..997645331d 100755 --- a/sdk/dotnet/Apps/V1Beta2/DeploymentList.cs +++ b/sdk/dotnet/Apps/V1Beta2/DeploymentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// DeploymentList is a list of Deployments. /// - public partial class DeploymentList : Pulumi.CustomResource + public partial class DeploymentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class DeploymentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DeploymentList(string name, Types.Inputs.Apps.V1Beta2.DeploymentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:DeploymentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:DeploymentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DeploymentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:DeploymentList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Deplo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DeploymentList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DeploymentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DeploymentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DeploymentList(name, default(Types.Inputs.Apps.V1Beta2.DeploymentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/ReplicaSet.cs b/sdk/dotnet/Apps/V1Beta2/ReplicaSet.cs index b7fa2317ae..a62fee650d 100755 --- a/sdk/dotnet/Apps/V1Beta2/ReplicaSet.cs +++ b/sdk/dotnet/Apps/V1Beta2/ReplicaSet.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// ReplicaSet ensures that a specified number of pod replicas are running at any given time. /// - public partial class ReplicaSet : Pulumi.CustomResource + public partial class ReplicaSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -64,7 +64,12 @@ public partial class ReplicaSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSet(string name, Types.Inputs.Apps.V1Beta2.ReplicaSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:ReplicaSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:ReplicaSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:ReplicaSet", name, dictionary, options) { } @@ -76,15 +81,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Repli return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSet resource's state with the given name and ID. /// @@ -93,10 +89,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSet(name, default(Types.Inputs.Apps.V1Beta2.ReplicaSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/ReplicaSetList.cs b/sdk/dotnet/Apps/V1Beta2/ReplicaSetList.cs index 3dccfe5de6..e4e6600982 100755 --- a/sdk/dotnet/Apps/V1Beta2/ReplicaSetList.cs +++ b/sdk/dotnet/Apps/V1Beta2/ReplicaSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// ReplicaSetList is a collection of ReplicaSets. /// - public partial class ReplicaSetList : Pulumi.CustomResource + public partial class ReplicaSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ReplicaSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSetList(string name, Types.Inputs.Apps.V1Beta2.ReplicaSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:ReplicaSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:ReplicaSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:ReplicaSetList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.Repli return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSetList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSetList(name, default(Types.Inputs.Apps.V1Beta2.ReplicaSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/StatefulSet.cs b/sdk/dotnet/Apps/V1Beta2/StatefulSet.cs index 24220877b0..904d69b4d9 100755 --- a/sdk/dotnet/Apps/V1Beta2/StatefulSet.cs +++ b/sdk/dotnet/Apps/V1Beta2/StatefulSet.cs @@ -30,7 +30,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class StatefulSet : Pulumi.CustomResource + public partial class StatefulSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -75,7 +75,12 @@ public partial class StatefulSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSet(string name, Types.Inputs.Apps.V1Beta2.StatefulSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:StatefulSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:StatefulSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:StatefulSet", name, dictionary, options) { } @@ -87,15 +92,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.State return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSet resource's state with the given name and ID. /// @@ -104,10 +100,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSet(name, default(Types.Inputs.Apps.V1Beta2.StatefulSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Apps/V1Beta2/StatefulSetList.cs b/sdk/dotnet/Apps/V1Beta2/StatefulSetList.cs index 1187f2206f..630a3e8efc 100755 --- a/sdk/dotnet/Apps/V1Beta2/StatefulSetList.cs +++ b/sdk/dotnet/Apps/V1Beta2/StatefulSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Apps.V1Beta2 /// /// StatefulSetList is a collection of StatefulSets. /// - public partial class StatefulSetList : Pulumi.CustomResource + public partial class StatefulSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class StatefulSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StatefulSetList(string name, Types.Inputs.Apps.V1Beta2.StatefulSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:apps/v1beta2:StatefulSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:apps/v1beta2:StatefulSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal StatefulSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:apps/v1beta2:StatefulSetList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Apps.V1Beta2.State return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StatefulSetList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StatefulSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new StatefulSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StatefulSetList(name, default(Types.Inputs.Apps.V1Beta2.StatefulSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSink.cs b/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSink.cs index 99c0951418..3be7e43463 100755 --- a/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSink.cs +++ b/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSink.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AuditRegistraion.V1Alpha1 /// /// AuditSink represents a cluster level audit sink /// - public partial class AuditSink : Pulumi.CustomResource + public partial class AuditSink : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -48,7 +48,12 @@ public partial class AuditSink : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public AuditSink(string name, Types.Inputs.AuditRegistraion.V1Alpha1.AuditSinkArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSink", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSink", name, SetAPIKindAndVersion(args), options) + { + } + + internal AuditSink(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSink", name, dictionary, options) { } @@ -60,15 +65,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AuditRegistraion.V return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing AuditSink resource's state with the given name and ID. /// @@ -77,10 +73,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static AuditSink Get(string name, Input id, CustomResourceOptions? options = null) { - return new AuditSink(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new AuditSink(name, default(Types.Inputs.AuditRegistraion.V1Alpha1.AuditSinkArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSinkList.cs b/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSinkList.cs index ab2cc2599b..b89aa4aa5d 100755 --- a/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSinkList.cs +++ b/sdk/dotnet/AuditRegistraion/V1Alpha1/AuditSinkList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.AuditRegistraion.V1Alpha1 /// /// AuditSinkList is a list of AuditSink items. /// - public partial class AuditSinkList : Pulumi.CustomResource + public partial class AuditSinkList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -48,7 +48,12 @@ public partial class AuditSinkList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public AuditSinkList(string name, Types.Inputs.AuditRegistraion.V1Alpha1.AuditSinkListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSinkList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSinkList", name, SetAPIKindAndVersion(args), options) + { + } + + internal AuditSinkList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSinkList", name, dictionary, options) { } @@ -60,15 +65,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.AuditRegistraion.V return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing AuditSinkList resource's state with the given name and ID. /// @@ -77,10 +73,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static AuditSinkList Get(string name, Input id, CustomResourceOptions? options = null) { - return new AuditSinkList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new AuditSinkList(name, default(Types.Inputs.AuditRegistraion.V1Alpha1.AuditSinkListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authentication/V1/TokenRequest.cs b/sdk/dotnet/Authentication/V1/TokenRequest.cs index 770469efac..b43ba8005a 100755 --- a/sdk/dotnet/Authentication/V1/TokenRequest.cs +++ b/sdk/dotnet/Authentication/V1/TokenRequest.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Authentication.V1 /// /// TokenRequest requests a token for a given service account. /// - public partial class TokenRequest : Pulumi.CustomResource + public partial class TokenRequest : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class TokenRequest : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public TokenRequest(string name, Types.Inputs.Authentication.V1.TokenRequestArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authentication.k8s.io/v1:TokenRequest", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authentication.k8s.io/v1:TokenRequest", name, SetAPIKindAndVersion(args), options) + { + } + + internal TokenRequest(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authentication.k8s.io/v1:TokenRequest", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authentication.V1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing TokenRequest resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static TokenRequest Get(string name, Input id, CustomResourceOptions? options = null) { - return new TokenRequest(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new TokenRequest(name, default(Types.Inputs.Authentication.V1.TokenRequestArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authentication/V1/TokenReview.cs b/sdk/dotnet/Authentication/V1/TokenReview.cs index f8e90ca0f8..4b05c11d31 100755 --- a/sdk/dotnet/Authentication/V1/TokenReview.cs +++ b/sdk/dotnet/Authentication/V1/TokenReview.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Authentication.V1 /// TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may /// be cached by the webhook token authenticator plugin in the kube-apiserver. /// - public partial class TokenReview : Pulumi.CustomResource + public partial class TokenReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -56,7 +56,12 @@ public partial class TokenReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public TokenReview(string name, Types.Inputs.Authentication.V1.TokenReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authentication.k8s.io/v1:TokenReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authentication.k8s.io/v1:TokenReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal TokenReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authentication.k8s.io/v1:TokenReview", name, dictionary, options) { } @@ -68,15 +73,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authentication.V1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing TokenReview resource's state with the given name and ID. /// @@ -85,10 +81,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static TokenReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new TokenReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new TokenReview(name, default(Types.Inputs.Authentication.V1.TokenReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authentication/V1Beta1/TokenReview.cs b/sdk/dotnet/Authentication/V1Beta1/TokenReview.cs index 9a6498fe64..11d5d8dc93 100755 --- a/sdk/dotnet/Authentication/V1Beta1/TokenReview.cs +++ b/sdk/dotnet/Authentication/V1Beta1/TokenReview.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Authentication.V1Beta1 /// TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may /// be cached by the webhook token authenticator plugin in the kube-apiserver. /// - public partial class TokenReview : Pulumi.CustomResource + public partial class TokenReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -56,7 +56,12 @@ public partial class TokenReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public TokenReview(string name, Types.Inputs.Authentication.V1Beta1.TokenReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authentication.k8s.io/v1beta1:TokenReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authentication.k8s.io/v1beta1:TokenReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal TokenReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authentication.k8s.io/v1beta1:TokenReview", name, dictionary, options) { } @@ -68,15 +73,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authentication.V1B return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing TokenReview resource's state with the given name and ID. /// @@ -85,10 +81,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static TokenReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new TokenReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new TokenReview(name, default(Types.Inputs.Authentication.V1Beta1.TokenReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1/LocalSubjectAccessReview.cs b/sdk/dotnet/Authorization/V1/LocalSubjectAccessReview.cs index ea05a29dff..861fc7e2ca 100755 --- a/sdk/dotnet/Authorization/V1/LocalSubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1/LocalSubjectAccessReview.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Authorization.V1 /// given namespace. Having a namespace scoped resource makes it much easier to grant namespace /// scoped policy that includes permissions checking. /// - public partial class LocalSubjectAccessReview : Pulumi.CustomResource + public partial class LocalSubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -57,7 +57,12 @@ public partial class LocalSubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LocalSubjectAccessReview(string name, Types.Inputs.Authorization.V1.LocalSubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1:LocalSubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1:LocalSubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal LocalSubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1:LocalSubjectAccessReview", name, dictionary, options) { } @@ -69,15 +74,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1.L return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LocalSubjectAccessReview resource's state with the given name and ID. /// @@ -86,10 +82,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LocalSubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new LocalSubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LocalSubjectAccessReview(name, default(Types.Inputs.Authorization.V1.LocalSubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1/SelfSubjectAccessReview.cs b/sdk/dotnet/Authorization/V1/SelfSubjectAccessReview.cs index 1a4cefcc84..0013cb4884 100755 --- a/sdk/dotnet/Authorization/V1/SelfSubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1/SelfSubjectAccessReview.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Authorization.V1 /// filling in a spec.namespace means "in all namespaces". Self is a special case, because /// users should always be able to check whether they can perform an action /// - public partial class SelfSubjectAccessReview : Pulumi.CustomResource + public partial class SelfSubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -56,7 +56,12 @@ public partial class SelfSubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SelfSubjectAccessReview(string name, Types.Inputs.Authorization.V1.SelfSubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1:SelfSubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1:SelfSubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SelfSubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1:SelfSubjectAccessReview", name, dictionary, options) { } @@ -68,15 +73,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1.S return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SelfSubjectAccessReview resource's state with the given name and ID. /// @@ -85,10 +81,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SelfSubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SelfSubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SelfSubjectAccessReview(name, default(Types.Inputs.Authorization.V1.SelfSubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1/SelfSubjectRulesReview.cs b/sdk/dotnet/Authorization/V1/SelfSubjectRulesReview.cs index 5a595767f0..ce3232e000 100755 --- a/sdk/dotnet/Authorization/V1/SelfSubjectRulesReview.cs +++ b/sdk/dotnet/Authorization/V1/SelfSubjectRulesReview.cs @@ -17,7 +17,7 @@ namespace Pulumi.Kubernetes.Authorization.V1 /// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization /// decisions to the API server. /// - public partial class SelfSubjectRulesReview : Pulumi.CustomResource + public partial class SelfSubjectRulesReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class SelfSubjectRulesReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SelfSubjectRulesReview(string name, Types.Inputs.Authorization.V1.SelfSubjectRulesReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1:SelfSubjectRulesReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1:SelfSubjectRulesReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SelfSubjectRulesReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1:SelfSubjectRulesReview", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1.S return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SelfSubjectRulesReview resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SelfSubjectRulesReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SelfSubjectRulesReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SelfSubjectRulesReview(name, default(Types.Inputs.Authorization.V1.SelfSubjectRulesReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1/SubjectAccessReview.cs b/sdk/dotnet/Authorization/V1/SubjectAccessReview.cs index 674638494e..c0f623e69e 100755 --- a/sdk/dotnet/Authorization/V1/SubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1/SubjectAccessReview.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Authorization.V1 /// /// SubjectAccessReview checks whether or not a user or group can perform an action. /// - public partial class SubjectAccessReview : Pulumi.CustomResource + public partial class SubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -54,7 +54,12 @@ public partial class SubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SubjectAccessReview(string name, Types.Inputs.Authorization.V1.SubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1:SubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1:SubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1:SubjectAccessReview", name, dictionary, options) { } @@ -66,15 +71,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1.S return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SubjectAccessReview resource's state with the given name and ID. /// @@ -83,10 +79,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SubjectAccessReview(name, default(Types.Inputs.Authorization.V1.SubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1Beta1/LocalSubjectAccessReview.cs b/sdk/dotnet/Authorization/V1Beta1/LocalSubjectAccessReview.cs index a46594a2c9..ca070d5669 100755 --- a/sdk/dotnet/Authorization/V1Beta1/LocalSubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1Beta1/LocalSubjectAccessReview.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Authorization.V1Beta1 /// given namespace. Having a namespace scoped resource makes it much easier to grant namespace /// scoped policy that includes permissions checking. /// - public partial class LocalSubjectAccessReview : Pulumi.CustomResource + public partial class LocalSubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -57,7 +57,12 @@ public partial class LocalSubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LocalSubjectAccessReview(string name, Types.Inputs.Authorization.V1Beta1.LocalSubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1beta1:LocalSubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1beta1:LocalSubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal LocalSubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1beta1:LocalSubjectAccessReview", name, dictionary, options) { } @@ -69,15 +74,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LocalSubjectAccessReview resource's state with the given name and ID. /// @@ -86,10 +82,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LocalSubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new LocalSubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LocalSubjectAccessReview(name, default(Types.Inputs.Authorization.V1Beta1.LocalSubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1Beta1/SelfSubjectAccessReview.cs b/sdk/dotnet/Authorization/V1Beta1/SelfSubjectAccessReview.cs index 511e4d6e78..026c496583 100755 --- a/sdk/dotnet/Authorization/V1Beta1/SelfSubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1Beta1/SelfSubjectAccessReview.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Authorization.V1Beta1 /// filling in a spec.namespace means "in all namespaces". Self is a special case, because /// users should always be able to check whether they can perform an action /// - public partial class SelfSubjectAccessReview : Pulumi.CustomResource + public partial class SelfSubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -56,7 +56,12 @@ public partial class SelfSubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SelfSubjectAccessReview(string name, Types.Inputs.Authorization.V1Beta1.SelfSubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SelfSubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectAccessReview", name, dictionary, options) { } @@ -68,15 +73,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SelfSubjectAccessReview resource's state with the given name and ID. /// @@ -85,10 +81,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SelfSubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SelfSubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SelfSubjectAccessReview(name, default(Types.Inputs.Authorization.V1Beta1.SelfSubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1Beta1/SelfSubjectRulesReview.cs b/sdk/dotnet/Authorization/V1Beta1/SelfSubjectRulesReview.cs index 3f4e0b126f..c1b62a2142 100755 --- a/sdk/dotnet/Authorization/V1Beta1/SelfSubjectRulesReview.cs +++ b/sdk/dotnet/Authorization/V1Beta1/SelfSubjectRulesReview.cs @@ -17,7 +17,7 @@ namespace Pulumi.Kubernetes.Authorization.V1Beta1 /// SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization /// decisions to the API server. /// - public partial class SelfSubjectRulesReview : Pulumi.CustomResource + public partial class SelfSubjectRulesReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class SelfSubjectRulesReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SelfSubjectRulesReview(string name, Types.Inputs.Authorization.V1Beta1.SelfSubjectRulesReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectRulesReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectRulesReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SelfSubjectRulesReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1beta1:SelfSubjectRulesReview", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SelfSubjectRulesReview resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SelfSubjectRulesReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SelfSubjectRulesReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SelfSubjectRulesReview(name, default(Types.Inputs.Authorization.V1Beta1.SelfSubjectRulesReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Authorization/V1Beta1/SubjectAccessReview.cs b/sdk/dotnet/Authorization/V1Beta1/SubjectAccessReview.cs index cce74a2bd0..29b607aeed 100755 --- a/sdk/dotnet/Authorization/V1Beta1/SubjectAccessReview.cs +++ b/sdk/dotnet/Authorization/V1Beta1/SubjectAccessReview.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Authorization.V1Beta1 /// /// SubjectAccessReview checks whether or not a user or group can perform an action. /// - public partial class SubjectAccessReview : Pulumi.CustomResource + public partial class SubjectAccessReview : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -54,7 +54,12 @@ public partial class SubjectAccessReview : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SubjectAccessReview(string name, Types.Inputs.Authorization.V1Beta1.SubjectAccessReviewArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:authorization.k8s.io/v1beta1:SubjectAccessReview", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:authorization.k8s.io/v1beta1:SubjectAccessReview", name, SetAPIKindAndVersion(args), options) + { + } + + internal SubjectAccessReview(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:authorization.k8s.io/v1beta1:SubjectAccessReview", name, dictionary, options) { } @@ -66,15 +71,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Authorization.V1Be return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SubjectAccessReview resource's state with the given name and ID. /// @@ -83,10 +79,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SubjectAccessReview Get(string name, Input id, CustomResourceOptions? options = null) { - return new SubjectAccessReview(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SubjectAccessReview(name, default(Types.Inputs.Authorization.V1Beta1.SubjectAccessReviewArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscaler.cs b/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscaler.cs index 42ba759782..9cfb8f4db1 100755 --- a/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscaler.cs +++ b/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscaler.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V1 /// /// configuration of a horizontal pod autoscaler. /// - public partial class HorizontalPodAutoscaler : Pulumi.CustomResource + public partial class HorizontalPodAutoscaler : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -58,7 +58,12 @@ public partial class HorizontalPodAutoscaler : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscaler(string name, Types.Inputs.Autoscaling.V1.HorizontalPodAutoscalerArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v1:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v1:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscaler(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v1:HorizontalPodAutoscaler", name, dictionary, options) { } @@ -70,15 +75,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V1.Hor return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscaler resource's state with the given name and ID. /// @@ -87,10 +83,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscaler Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscaler(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscaler(name, default(Types.Inputs.Autoscaling.V1.HorizontalPodAutoscalerArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscalerList.cs b/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscalerList.cs index 0331a63a87..c87d279d9b 100755 --- a/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscalerList.cs +++ b/sdk/dotnet/Autoscaling/V1/HorizontalPodAutoscalerList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V1 /// /// list of horizontal pod autoscaler objects. /// - public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource + public partial class HorizontalPodAutoscalerList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscalerList(string name, Types.Inputs.Autoscaling.V1.HorizontalPodAutoscalerListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v1:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v1:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscalerList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v1:HorizontalPodAutoscalerList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V1.Hor return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscalerList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscalerList Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscalerList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscalerList(name, default(Types.Inputs.Autoscaling.V1.HorizontalPodAutoscalerListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscaler.cs b/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscaler.cs index f2c748196a..2560fa5bf0 100755 --- a/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscaler.cs +++ b/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscaler.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V2Beta1 /// automatically manages the replica count of any resource implementing the scale subresource /// based on the metrics specified. /// - public partial class HorizontalPodAutoscaler : Pulumi.CustomResource + public partial class HorizontalPodAutoscaler : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class HorizontalPodAutoscaler : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscaler(string name, Types.Inputs.Autoscaling.V2Beta1.HorizontalPodAutoscalerArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscaler(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscaler", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V2Beta return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscaler resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscaler Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscaler(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscaler(name, default(Types.Inputs.Autoscaling.V2Beta1.HorizontalPodAutoscalerArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscalerList.cs b/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscalerList.cs index 16bc815bc9..5370b8e6a4 100755 --- a/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscalerList.cs +++ b/sdk/dotnet/Autoscaling/V2Beta1/HorizontalPodAutoscalerList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V2Beta1 /// /// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects. /// - public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource + public partial class HorizontalPodAutoscalerList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscalerList(string name, Types.Inputs.Autoscaling.V2Beta1.HorizontalPodAutoscalerListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscalerList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v2beta1:HorizontalPodAutoscalerList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V2Beta return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscalerList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscalerList Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscalerList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscalerList(name, default(Types.Inputs.Autoscaling.V2Beta1.HorizontalPodAutoscalerListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscaler.cs b/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscaler.cs index 494e25e85d..2b067bba04 100755 --- a/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscaler.cs +++ b/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscaler.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V2Beta2 /// automatically manages the replica count of any resource implementing the scale subresource /// based on the metrics specified. /// - public partial class HorizontalPodAutoscaler : Pulumi.CustomResource + public partial class HorizontalPodAutoscaler : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class HorizontalPodAutoscaler : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscaler(string name, Types.Inputs.Autoscaling.V2Beta2.HorizontalPodAutoscalerArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscaler", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscaler(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscaler", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V2Beta return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscaler resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscaler Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscaler(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscaler(name, default(Types.Inputs.Autoscaling.V2Beta2.HorizontalPodAutoscalerArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscalerList.cs b/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscalerList.cs index e067b1cf2a..835b56f3df 100755 --- a/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscalerList.cs +++ b/sdk/dotnet/Autoscaling/V2Beta2/HorizontalPodAutoscalerList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Autoscaling.V2Beta2 /// /// HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects. /// - public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource + public partial class HorizontalPodAutoscalerList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class HorizontalPodAutoscalerList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public HorizontalPodAutoscalerList(string name, Types.Inputs.Autoscaling.V2Beta2.HorizontalPodAutoscalerListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscalerList", name, SetAPIKindAndVersion(args), options) + { + } + + internal HorizontalPodAutoscalerList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:autoscaling/v2beta2:HorizontalPodAutoscalerList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Autoscaling.V2Beta return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing HorizontalPodAutoscalerList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static HorizontalPodAutoscalerList Get(string name, Input id, CustomResourceOptions? options = null) { - return new HorizontalPodAutoscalerList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new HorizontalPodAutoscalerList(name, default(Types.Inputs.Autoscaling.V2Beta2.HorizontalPodAutoscalerListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V1/Job.cs b/sdk/dotnet/Batch/V1/Job.cs index ef021f54f5..405eb79ad4 100755 --- a/sdk/dotnet/Batch/V1/Job.cs +++ b/sdk/dotnet/Batch/V1/Job.cs @@ -25,7 +25,7 @@ namespace Pulumi.Kubernetes.Batch.V1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Job : Pulumi.CustomResource + public partial class Job : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -74,7 +74,12 @@ public partial class Job : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Job(string name, Types.Inputs.Batch.V1.JobArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v1:Job", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v1:Job", name, SetAPIKindAndVersion(args), options) + { + } + + internal Job(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:Job", name, dictionary, options) { } @@ -86,15 +91,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V1.JobArgs? return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Job resource's state with the given name and ID. /// @@ -103,10 +99,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Job Get(string name, Input id, CustomResourceOptions? options = null) { - return new Job(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Job(name, default(Types.Inputs.Batch.V1.JobArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V1/JobList.cs b/sdk/dotnet/Batch/V1/JobList.cs index a0c8152343..d90225554d 100755 --- a/sdk/dotnet/Batch/V1/JobList.cs +++ b/sdk/dotnet/Batch/V1/JobList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Batch.V1 /// /// JobList is a collection of jobs. /// - public partial class JobList : Pulumi.CustomResource + public partial class JobList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class JobList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public JobList(string name, Types.Inputs.Batch.V1.JobListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v1:JobList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v1:JobList", name, SetAPIKindAndVersion(args), options) + { + } + + internal JobList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1:JobList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V1.JobListAr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing JobList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static JobList Get(string name, Input id, CustomResourceOptions? options = null) { - return new JobList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new JobList(name, default(Types.Inputs.Batch.V1.JobListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V1Beta1/CronJob.cs b/sdk/dotnet/Batch/V1Beta1/CronJob.cs index 91f5d81f7c..515aaa6710 100755 --- a/sdk/dotnet/Batch/V1Beta1/CronJob.cs +++ b/sdk/dotnet/Batch/V1Beta1/CronJob.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Batch.V1Beta1 /// /// CronJob represents the configuration of a single cron job. /// - public partial class CronJob : Pulumi.CustomResource + public partial class CronJob : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -59,7 +59,12 @@ public partial class CronJob : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CronJob(string name, Types.Inputs.Batch.V1Beta1.CronJobArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v1beta1:CronJob", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v1beta1:CronJob", name, SetAPIKindAndVersion(args), options) + { + } + + internal CronJob(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1beta1:CronJob", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V1Beta1.Cron return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CronJob resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CronJob Get(string name, Input id, CustomResourceOptions? options = null) { - return new CronJob(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CronJob(name, default(Types.Inputs.Batch.V1Beta1.CronJobArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V1Beta1/CronJobList.cs b/sdk/dotnet/Batch/V1Beta1/CronJobList.cs index 4dc396d783..6576137e51 100755 --- a/sdk/dotnet/Batch/V1Beta1/CronJobList.cs +++ b/sdk/dotnet/Batch/V1Beta1/CronJobList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Batch.V1Beta1 /// /// CronJobList is a collection of cron jobs. /// - public partial class CronJobList : Pulumi.CustomResource + public partial class CronJobList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class CronJobList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CronJobList(string name, Types.Inputs.Batch.V1Beta1.CronJobListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v1beta1:CronJobList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v1beta1:CronJobList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CronJobList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v1beta1:CronJobList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V1Beta1.Cron return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CronJobList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CronJobList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CronJobList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CronJobList(name, default(Types.Inputs.Batch.V1Beta1.CronJobListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V2Alpha1/CronJob.cs b/sdk/dotnet/Batch/V2Alpha1/CronJob.cs index 6a7077ef9c..f60a424a1d 100755 --- a/sdk/dotnet/Batch/V2Alpha1/CronJob.cs +++ b/sdk/dotnet/Batch/V2Alpha1/CronJob.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Batch.V2Alpha1 /// /// CronJob represents the configuration of a single cron job. /// - public partial class CronJob : Pulumi.CustomResource + public partial class CronJob : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -59,7 +59,12 @@ public partial class CronJob : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CronJob(string name, Types.Inputs.Batch.V2Alpha1.CronJobArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v2alpha1:CronJob", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v2alpha1:CronJob", name, SetAPIKindAndVersion(args), options) + { + } + + internal CronJob(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v2alpha1:CronJob", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V2Alpha1.Cro return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CronJob resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CronJob Get(string name, Input id, CustomResourceOptions? options = null) { - return new CronJob(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CronJob(name, default(Types.Inputs.Batch.V2Alpha1.CronJobArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Batch/V2Alpha1/CronJobList.cs b/sdk/dotnet/Batch/V2Alpha1/CronJobList.cs index 3b6740a20d..0a4dd22de3 100755 --- a/sdk/dotnet/Batch/V2Alpha1/CronJobList.cs +++ b/sdk/dotnet/Batch/V2Alpha1/CronJobList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Batch.V2Alpha1 /// /// CronJobList is a collection of cron jobs. /// - public partial class CronJobList : Pulumi.CustomResource + public partial class CronJobList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class CronJobList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CronJobList(string name, Types.Inputs.Batch.V2Alpha1.CronJobListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:batch/v2alpha1:CronJobList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:batch/v2alpha1:CronJobList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CronJobList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:batch/v2alpha1:CronJobList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Batch.V2Alpha1.Cro return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CronJobList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CronJobList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CronJobList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CronJobList(name, default(Types.Inputs.Batch.V2Alpha1.CronJobListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequest.cs b/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequest.cs index c1fb58e022..0c17b0ac40 100755 --- a/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequest.cs +++ b/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequest.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Certificates.V1Beta1 /// /// Describes a certificate signing request /// - public partial class CertificateSigningRequest : Pulumi.CustomResource + public partial class CertificateSigningRequest : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -54,7 +54,12 @@ public partial class CertificateSigningRequest : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CertificateSigningRequest(string name, Types.Inputs.Certificates.V1Beta1.CertificateSigningRequestArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequest", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequest", name, SetAPIKindAndVersion(args), options) + { + } + + internal CertificateSigningRequest(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequest", name, dictionary, options) { } @@ -66,15 +71,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Certificates.V1Bet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CertificateSigningRequest resource's state with the given name and ID. /// @@ -83,10 +79,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CertificateSigningRequest Get(string name, Input id, CustomResourceOptions? options = null) { - return new CertificateSigningRequest(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CertificateSigningRequest(name, default(Types.Inputs.Certificates.V1Beta1.CertificateSigningRequestArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequestList.cs b/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequestList.cs index d083062543..e636c3e719 100755 --- a/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequestList.cs +++ b/sdk/dotnet/Certificates/V1Beta1/CertificateSigningRequestList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Certificates.V1Beta1 /// /// /// - public partial class CertificateSigningRequestList : Pulumi.CustomResource + public partial class CertificateSigningRequestList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class CertificateSigningRequestList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CertificateSigningRequestList(string name, Types.Inputs.Certificates.V1Beta1.CertificateSigningRequestListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CertificateSigningRequestList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Certificates.V1Bet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CertificateSigningRequestList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CertificateSigningRequestList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CertificateSigningRequestList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CertificateSigningRequestList(name, default(Types.Inputs.Certificates.V1Beta1.CertificateSigningRequestListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Coordination/V1/Lease.cs b/sdk/dotnet/Coordination/V1/Lease.cs index 5e68cca8ed..ffddce080f 100755 --- a/sdk/dotnet/Coordination/V1/Lease.cs +++ b/sdk/dotnet/Coordination/V1/Lease.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Coordination.V1 /// /// Lease defines a lease concept. /// - public partial class Lease : Pulumi.CustomResource + public partial class Lease : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class Lease : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Lease(string name, Types.Inputs.Coordination.V1.LeaseArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:coordination.k8s.io/v1:Lease", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:coordination.k8s.io/v1:Lease", name, SetAPIKindAndVersion(args), options) + { + } + + internal Lease(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:coordination.k8s.io/v1:Lease", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Coordination.V1.Le return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Lease resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Lease Get(string name, Input id, CustomResourceOptions? options = null) { - return new Lease(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Lease(name, default(Types.Inputs.Coordination.V1.LeaseArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Coordination/V1/LeaseList.cs b/sdk/dotnet/Coordination/V1/LeaseList.cs index 72a5c9c05a..98064f5c9c 100755 --- a/sdk/dotnet/Coordination/V1/LeaseList.cs +++ b/sdk/dotnet/Coordination/V1/LeaseList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Coordination.V1 /// /// LeaseList is a list of Lease objects. /// - public partial class LeaseList : Pulumi.CustomResource + public partial class LeaseList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class LeaseList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LeaseList(string name, Types.Inputs.Coordination.V1.LeaseListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:coordination.k8s.io/v1:LeaseList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:coordination.k8s.io/v1:LeaseList", name, SetAPIKindAndVersion(args), options) + { + } + + internal LeaseList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:coordination.k8s.io/v1:LeaseList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Coordination.V1.Le return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LeaseList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LeaseList Get(string name, Input id, CustomResourceOptions? options = null) { - return new LeaseList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LeaseList(name, default(Types.Inputs.Coordination.V1.LeaseListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Coordination/V1Beta1/Lease.cs b/sdk/dotnet/Coordination/V1Beta1/Lease.cs index 82f64d97ca..54d49543a4 100755 --- a/sdk/dotnet/Coordination/V1Beta1/Lease.cs +++ b/sdk/dotnet/Coordination/V1Beta1/Lease.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Coordination.V1Beta1 /// /// Lease defines a lease concept. /// - public partial class Lease : Pulumi.CustomResource + public partial class Lease : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class Lease : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Lease(string name, Types.Inputs.Coordination.V1Beta1.LeaseArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:coordination.k8s.io/v1beta1:Lease", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:coordination.k8s.io/v1beta1:Lease", name, SetAPIKindAndVersion(args), options) + { + } + + internal Lease(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:coordination.k8s.io/v1beta1:Lease", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Coordination.V1Bet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Lease resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Lease Get(string name, Input id, CustomResourceOptions? options = null) { - return new Lease(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Lease(name, default(Types.Inputs.Coordination.V1Beta1.LeaseArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Coordination/V1Beta1/LeaseList.cs b/sdk/dotnet/Coordination/V1Beta1/LeaseList.cs index eb95c76ee9..25181c8c87 100755 --- a/sdk/dotnet/Coordination/V1Beta1/LeaseList.cs +++ b/sdk/dotnet/Coordination/V1Beta1/LeaseList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Coordination.V1Beta1 /// /// LeaseList is a list of Lease objects. /// - public partial class LeaseList : Pulumi.CustomResource + public partial class LeaseList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class LeaseList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LeaseList(string name, Types.Inputs.Coordination.V1Beta1.LeaseListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:coordination.k8s.io/v1beta1:LeaseList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:coordination.k8s.io/v1beta1:LeaseList", name, SetAPIKindAndVersion(args), options) + { + } + + internal LeaseList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:coordination.k8s.io/v1beta1:LeaseList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Coordination.V1Bet return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LeaseList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LeaseList Get(string name, Input id, CustomResourceOptions? options = null) { - return new LeaseList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LeaseList(name, default(Types.Inputs.Coordination.V1Beta1.LeaseListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Binding.cs b/sdk/dotnet/Core/V1/Binding.cs index 65017f0c8d..7488ced386 100755 --- a/sdk/dotnet/Core/V1/Binding.cs +++ b/sdk/dotnet/Core/V1/Binding.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// Binding ties one object to another; for example, a pod is bound to a node by a scheduler. /// Deprecated in 1.7, please use the bindings subresource of pods instead. /// - public partial class Binding : Pulumi.CustomResource + public partial class Binding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class Binding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Binding(string name, Types.Inputs.Core.V1.BindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Binding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Binding", name, SetAPIKindAndVersion(args), options) + { + } + + internal Binding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Binding", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.BindingArg return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Binding resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Binding Get(string name, Input id, CustomResourceOptions? options = null) { - return new Binding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Binding(name, default(Types.Inputs.Core.V1.BindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ComponentStatus.cs b/sdk/dotnet/Core/V1/ComponentStatus.cs index d0c6e36e78..13566b1e38 100755 --- a/sdk/dotnet/Core/V1/ComponentStatus.cs +++ b/sdk/dotnet/Core/V1/ComponentStatus.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ComponentStatus (and ComponentStatusList) holds the cluster validation info. /// - public partial class ComponentStatus : Pulumi.CustomResource + public partial class ComponentStatus : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ComponentStatus : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ComponentStatus(string name, Types.Inputs.Core.V1.ComponentStatusArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ComponentStatus", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ComponentStatus", name, SetAPIKindAndVersion(args), options) + { + } + + internal ComponentStatus(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ComponentStatus", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ComponentS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ComponentStatus resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ComponentStatus Get(string name, Input id, CustomResourceOptions? options = null) { - return new ComponentStatus(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ComponentStatus(name, default(Types.Inputs.Core.V1.ComponentStatusArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ComponentStatusList.cs b/sdk/dotnet/Core/V1/ComponentStatusList.cs index 7710983f7d..e0979be708 100755 --- a/sdk/dotnet/Core/V1/ComponentStatusList.cs +++ b/sdk/dotnet/Core/V1/ComponentStatusList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// Status of all the conditions for the component as a list of ComponentStatus objects. /// - public partial class ComponentStatusList : Pulumi.CustomResource + public partial class ComponentStatusList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ComponentStatusList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ComponentStatusList(string name, Types.Inputs.Core.V1.ComponentStatusListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ComponentStatusList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ComponentStatusList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ComponentStatusList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ComponentStatusList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ComponentS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ComponentStatusList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ComponentStatusList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ComponentStatusList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ComponentStatusList(name, default(Types.Inputs.Core.V1.ComponentStatusListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ConfigMap.cs b/sdk/dotnet/Core/V1/ConfigMap.cs index 43174ff08c..4cabc15b1d 100755 --- a/sdk/dotnet/Core/V1/ConfigMap.cs +++ b/sdk/dotnet/Core/V1/ConfigMap.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ConfigMap holds configuration data for pods to consume. /// - public partial class ConfigMap : Pulumi.CustomResource + public partial class ConfigMap : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -64,7 +64,12 @@ public partial class ConfigMap : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ConfigMap(string name, Types.Inputs.Core.V1.ConfigMapArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ConfigMap", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ConfigMap", name, SetAPIKindAndVersion(args), options) + { + } + + internal ConfigMap(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ConfigMap", name, dictionary, options) { } @@ -76,15 +81,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ConfigMapA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ConfigMap resource's state with the given name and ID. /// @@ -93,10 +89,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ConfigMap Get(string name, Input id, CustomResourceOptions? options = null) { - return new ConfigMap(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ConfigMap(name, default(Types.Inputs.Core.V1.ConfigMapArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ConfigMapList.cs b/sdk/dotnet/Core/V1/ConfigMapList.cs index e3fbbb39f5..0ae803dcde 100755 --- a/sdk/dotnet/Core/V1/ConfigMapList.cs +++ b/sdk/dotnet/Core/V1/ConfigMapList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ConfigMapList is a resource containing a list of ConfigMap objects. /// - public partial class ConfigMapList : Pulumi.CustomResource + public partial class ConfigMapList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ConfigMapList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ConfigMapList(string name, Types.Inputs.Core.V1.ConfigMapListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ConfigMapList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ConfigMapList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ConfigMapList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ConfigMapList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ConfigMapL return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ConfigMapList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ConfigMapList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ConfigMapList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ConfigMapList(name, default(Types.Inputs.Core.V1.ConfigMapListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Endpoints.cs b/sdk/dotnet/Core/V1/Endpoints.cs index 8dd78a30ac..fe1b0bf7bb 100755 --- a/sdk/dotnet/Core/V1/Endpoints.cs +++ b/sdk/dotnet/Core/V1/Endpoints.cs @@ -21,7 +21,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// }, /// ] /// - public partial class Endpoints : Pulumi.CustomResource + public partial class Endpoints : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -67,7 +67,12 @@ public partial class Endpoints : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Endpoints(string name, Types.Inputs.Core.V1.EndpointsArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Endpoints", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Endpoints", name, SetAPIKindAndVersion(args), options) + { + } + + internal Endpoints(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Endpoints", name, dictionary, options) { } @@ -79,15 +84,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.EndpointsA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Endpoints resource's state with the given name and ID. /// @@ -96,10 +92,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Endpoints Get(string name, Input id, CustomResourceOptions? options = null) { - return new Endpoints(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Endpoints(name, default(Types.Inputs.Core.V1.EndpointsArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/EndpointsList.cs b/sdk/dotnet/Core/V1/EndpointsList.cs index 585e281457..ef848011bf 100755 --- a/sdk/dotnet/Core/V1/EndpointsList.cs +++ b/sdk/dotnet/Core/V1/EndpointsList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// EndpointsList is a list of endpoints. /// - public partial class EndpointsList : Pulumi.CustomResource + public partial class EndpointsList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class EndpointsList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public EndpointsList(string name, Types.Inputs.Core.V1.EndpointsListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:EndpointsList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:EndpointsList", name, SetAPIKindAndVersion(args), options) + { + } + + internal EndpointsList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:EndpointsList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.EndpointsL return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing EndpointsList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static EndpointsList Get(string name, Input id, CustomResourceOptions? options = null) { - return new EndpointsList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new EndpointsList(name, default(Types.Inputs.Core.V1.EndpointsListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Event.cs b/sdk/dotnet/Core/V1/Event.cs index c66b0dde44..c79ccd5b2f 100755 --- a/sdk/dotnet/Core/V1/Event.cs +++ b/sdk/dotnet/Core/V1/Event.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// Event is a report of an event somewhere in the cluster. /// - public partial class Event : Pulumi.CustomResource + public partial class Event : KubernetesResource { /// /// What action was taken/failed regarding to the Regarding object. @@ -130,7 +130,12 @@ public partial class Event : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Event(string name, Types.Inputs.Core.V1.EventArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Event", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Event", name, SetAPIKindAndVersion(args), options) + { + } + + internal Event(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Event", name, dictionary, options) { } @@ -142,15 +147,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.EventArgs? return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Event resource's state with the given name and ID. /// @@ -159,10 +155,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Event Get(string name, Input id, CustomResourceOptions? options = null) { - return new Event(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Event(name, default(Types.Inputs.Core.V1.EventArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/EventList.cs b/sdk/dotnet/Core/V1/EventList.cs index b0aa660f48..e94dfdee53 100755 --- a/sdk/dotnet/Core/V1/EventList.cs +++ b/sdk/dotnet/Core/V1/EventList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// EventList is a list of events. /// - public partial class EventList : Pulumi.CustomResource + public partial class EventList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class EventList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public EventList(string name, Types.Inputs.Core.V1.EventListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:EventList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:EventList", name, SetAPIKindAndVersion(args), options) + { + } + + internal EventList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:EventList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.EventListA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing EventList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static EventList Get(string name, Input id, CustomResourceOptions? options = null) { - return new EventList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new EventList(name, default(Types.Inputs.Core.V1.EventListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/LimitRange.cs b/sdk/dotnet/Core/V1/LimitRange.cs index ec16b631ed..db36db3e32 100755 --- a/sdk/dotnet/Core/V1/LimitRange.cs +++ b/sdk/dotnet/Core/V1/LimitRange.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// LimitRange sets resource usage limits for each kind of resource in a Namespace. /// - public partial class LimitRange : Pulumi.CustomResource + public partial class LimitRange : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class LimitRange : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LimitRange(string name, Types.Inputs.Core.V1.LimitRangeArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:LimitRange", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:LimitRange", name, SetAPIKindAndVersion(args), options) + { + } + + internal LimitRange(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:LimitRange", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.LimitRange return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LimitRange resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LimitRange Get(string name, Input id, CustomResourceOptions? options = null) { - return new LimitRange(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LimitRange(name, default(Types.Inputs.Core.V1.LimitRangeArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/LimitRangeList.cs b/sdk/dotnet/Core/V1/LimitRangeList.cs index 16eaffd44f..6aa3eaf99f 100755 --- a/sdk/dotnet/Core/V1/LimitRangeList.cs +++ b/sdk/dotnet/Core/V1/LimitRangeList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// LimitRangeList is a list of LimitRange items. /// - public partial class LimitRangeList : Pulumi.CustomResource + public partial class LimitRangeList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class LimitRangeList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public LimitRangeList(string name, Types.Inputs.Core.V1.LimitRangeListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:LimitRangeList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:LimitRangeList", name, SetAPIKindAndVersion(args), options) + { + } + + internal LimitRangeList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:LimitRangeList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.LimitRange return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing LimitRangeList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static LimitRangeList Get(string name, Input id, CustomResourceOptions? options = null) { - return new LimitRangeList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new LimitRangeList(name, default(Types.Inputs.Core.V1.LimitRangeListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Namespace.cs b/sdk/dotnet/Core/V1/Namespace.cs index 3774c43c65..4eab772182 100755 --- a/sdk/dotnet/Core/V1/Namespace.cs +++ b/sdk/dotnet/Core/V1/Namespace.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// Namespace provides a scope for Names. Use of multiple namespaces is optional. /// - public partial class Namespace : Pulumi.CustomResource + public partial class Namespace : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -59,7 +59,12 @@ public partial class Namespace : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Namespace(string name, Types.Inputs.Core.V1.NamespaceArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Namespace", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Namespace", name, SetAPIKindAndVersion(args), options) + { + } + + internal Namespace(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Namespace", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.NamespaceA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Namespace resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Namespace Get(string name, Input id, CustomResourceOptions? options = null) { - return new Namespace(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Namespace(name, default(Types.Inputs.Core.V1.NamespaceArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/NamespaceList.cs b/sdk/dotnet/Core/V1/NamespaceList.cs index fd743cd1d5..2456a6e96c 100755 --- a/sdk/dotnet/Core/V1/NamespaceList.cs +++ b/sdk/dotnet/Core/V1/NamespaceList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// NamespaceList is a list of Namespaces. /// - public partial class NamespaceList : Pulumi.CustomResource + public partial class NamespaceList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class NamespaceList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NamespaceList(string name, Types.Inputs.Core.V1.NamespaceListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:NamespaceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:NamespaceList", name, SetAPIKindAndVersion(args), options) + { + } + + internal NamespaceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:NamespaceList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.NamespaceL return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NamespaceList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NamespaceList Get(string name, Input id, CustomResourceOptions? options = null) { - return new NamespaceList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NamespaceList(name, default(Types.Inputs.Core.V1.NamespaceListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Node.cs b/sdk/dotnet/Core/V1/Node.cs index 6c672e40bd..e28bd9a8e2 100755 --- a/sdk/dotnet/Core/V1/Node.cs +++ b/sdk/dotnet/Core/V1/Node.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache /// (i.e. in etcd). /// - public partial class Node : Pulumi.CustomResource + public partial class Node : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class Node : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Node(string name, Types.Inputs.Core.V1.NodeArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Node", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Node", name, SetAPIKindAndVersion(args), options) + { + } + + internal Node(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Node", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.NodeArgs? return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Node resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Node Get(string name, Input id, CustomResourceOptions? options = null) { - return new Node(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Node(name, default(Types.Inputs.Core.V1.NodeArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/NodeList.cs b/sdk/dotnet/Core/V1/NodeList.cs index ac01a3eaba..9a53ef7b18 100755 --- a/sdk/dotnet/Core/V1/NodeList.cs +++ b/sdk/dotnet/Core/V1/NodeList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// NodeList is the whole list of all Nodes which have been registered with master. /// - public partial class NodeList : Pulumi.CustomResource + public partial class NodeList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class NodeList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NodeList(string name, Types.Inputs.Core.V1.NodeListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:NodeList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:NodeList", name, SetAPIKindAndVersion(args), options) + { + } + + internal NodeList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:NodeList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.NodeListAr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NodeList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NodeList Get(string name, Input id, CustomResourceOptions? options = null) { - return new NodeList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NodeList(name, default(Types.Inputs.Core.V1.NodeListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PersistentVolume.cs b/sdk/dotnet/Core/V1/PersistentVolume.cs index 657894b1d5..9076422b11 100755 --- a/sdk/dotnet/Core/V1/PersistentVolume.cs +++ b/sdk/dotnet/Core/V1/PersistentVolume.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous /// to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes /// - public partial class PersistentVolume : Pulumi.CustomResource + public partial class PersistentVolume : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -62,7 +62,12 @@ public partial class PersistentVolume : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PersistentVolume(string name, Types.Inputs.Core.V1.PersistentVolumeArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PersistentVolume", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PersistentVolume", name, SetAPIKindAndVersion(args), options) + { + } + + internal PersistentVolume(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PersistentVolume", name, dictionary, options) { } @@ -74,15 +79,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Persistent return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PersistentVolume resource's state with the given name and ID. /// @@ -91,10 +87,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PersistentVolume Get(string name, Input id, CustomResourceOptions? options = null) { - return new PersistentVolume(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PersistentVolume(name, default(Types.Inputs.Core.V1.PersistentVolumeArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PersistentVolumeClaim.cs b/sdk/dotnet/Core/V1/PersistentVolumeClaim.cs index 113500df40..63133e957a 100755 --- a/sdk/dotnet/Core/V1/PersistentVolumeClaim.cs +++ b/sdk/dotnet/Core/V1/PersistentVolumeClaim.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PersistentVolumeClaim is a user's request for and claim to a persistent volume /// - public partial class PersistentVolumeClaim : Pulumi.CustomResource + public partial class PersistentVolumeClaim : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class PersistentVolumeClaim : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PersistentVolumeClaim(string name, Types.Inputs.Core.V1.PersistentVolumeClaimArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PersistentVolumeClaim", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PersistentVolumeClaim", name, SetAPIKindAndVersion(args), options) + { + } + + internal PersistentVolumeClaim(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PersistentVolumeClaim", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Persistent return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PersistentVolumeClaim resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PersistentVolumeClaim Get(string name, Input id, CustomResourceOptions? options = null) { - return new PersistentVolumeClaim(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PersistentVolumeClaim(name, default(Types.Inputs.Core.V1.PersistentVolumeClaimArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PersistentVolumeClaimList.cs b/sdk/dotnet/Core/V1/PersistentVolumeClaimList.cs index d22882fb45..f9ddc76f2d 100755 --- a/sdk/dotnet/Core/V1/PersistentVolumeClaimList.cs +++ b/sdk/dotnet/Core/V1/PersistentVolumeClaimList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PersistentVolumeClaimList is a list of PersistentVolumeClaim items. /// - public partial class PersistentVolumeClaimList : Pulumi.CustomResource + public partial class PersistentVolumeClaimList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PersistentVolumeClaimList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PersistentVolumeClaimList(string name, Types.Inputs.Core.V1.PersistentVolumeClaimListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PersistentVolumeClaimList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PersistentVolumeClaimList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PersistentVolumeClaimList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PersistentVolumeClaimList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Persistent return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PersistentVolumeClaimList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PersistentVolumeClaimList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PersistentVolumeClaimList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PersistentVolumeClaimList(name, default(Types.Inputs.Core.V1.PersistentVolumeClaimListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PersistentVolumeList.cs b/sdk/dotnet/Core/V1/PersistentVolumeList.cs index 030be34a4a..52acb949ac 100755 --- a/sdk/dotnet/Core/V1/PersistentVolumeList.cs +++ b/sdk/dotnet/Core/V1/PersistentVolumeList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PersistentVolumeList is a list of PersistentVolume items. /// - public partial class PersistentVolumeList : Pulumi.CustomResource + public partial class PersistentVolumeList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PersistentVolumeList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PersistentVolumeList(string name, Types.Inputs.Core.V1.PersistentVolumeListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PersistentVolumeList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PersistentVolumeList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PersistentVolumeList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PersistentVolumeList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Persistent return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PersistentVolumeList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PersistentVolumeList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PersistentVolumeList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PersistentVolumeList(name, default(Types.Inputs.Core.V1.PersistentVolumeListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Pod.cs b/sdk/dotnet/Core/V1/Pod.cs index c75903439f..5c59079e80 100755 --- a/sdk/dotnet/Core/V1/Pod.cs +++ b/sdk/dotnet/Core/V1/Pod.cs @@ -26,7 +26,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Pod : Pulumi.CustomResource + public partial class Pod : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -76,7 +76,12 @@ public partial class Pod : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Pod(string name, Types.Inputs.Core.V1.PodArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Pod", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Pod", name, SetAPIKindAndVersion(args), options) + { + } + + internal Pod(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Pod", name, dictionary, options) { } @@ -88,15 +93,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.PodArgs? a return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Pod resource's state with the given name and ID. /// @@ -105,10 +101,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Pod Get(string name, Input id, CustomResourceOptions? options = null) { - return new Pod(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Pod(name, default(Types.Inputs.Core.V1.PodArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PodList.cs b/sdk/dotnet/Core/V1/PodList.cs index b6adc99c56..a15c498b87 100755 --- a/sdk/dotnet/Core/V1/PodList.cs +++ b/sdk/dotnet/Core/V1/PodList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PodList is a list of Pods. /// - public partial class PodList : Pulumi.CustomResource + public partial class PodList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PodList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodList(string name, Types.Inputs.Core.V1.PodListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PodList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PodList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PodList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.PodListArg return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodList(name, default(Types.Inputs.Core.V1.PodListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PodTemplate.cs b/sdk/dotnet/Core/V1/PodTemplate.cs index 7ed38a149e..4b764d1be5 100755 --- a/sdk/dotnet/Core/V1/PodTemplate.cs +++ b/sdk/dotnet/Core/V1/PodTemplate.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PodTemplate describes a template for creating copies of a predefined pod. /// - public partial class PodTemplate : Pulumi.CustomResource + public partial class PodTemplate : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PodTemplate : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodTemplate(string name, Types.Inputs.Core.V1.PodTemplateArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PodTemplate", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PodTemplate", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodTemplate(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PodTemplate", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.PodTemplat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodTemplate resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodTemplate Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodTemplate(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodTemplate(name, default(Types.Inputs.Core.V1.PodTemplateArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/PodTemplateList.cs b/sdk/dotnet/Core/V1/PodTemplateList.cs index 4d21a06d1c..355faeebac 100755 --- a/sdk/dotnet/Core/V1/PodTemplateList.cs +++ b/sdk/dotnet/Core/V1/PodTemplateList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// PodTemplateList is a list of PodTemplates. /// - public partial class PodTemplateList : Pulumi.CustomResource + public partial class PodTemplateList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PodTemplateList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodTemplateList(string name, Types.Inputs.Core.V1.PodTemplateListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:PodTemplateList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:PodTemplateList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodTemplateList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:PodTemplateList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.PodTemplat return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodTemplateList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodTemplateList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodTemplateList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodTemplateList(name, default(Types.Inputs.Core.V1.PodTemplateListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ReplicationController.cs b/sdk/dotnet/Core/V1/ReplicationController.cs index 91b1a84ede..1fc6c0f321 100755 --- a/sdk/dotnet/Core/V1/ReplicationController.cs +++ b/sdk/dotnet/Core/V1/ReplicationController.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ReplicationController represents the configuration of a replication controller. /// - public partial class ReplicationController : Pulumi.CustomResource + public partial class ReplicationController : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -63,7 +63,12 @@ public partial class ReplicationController : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicationController(string name, Types.Inputs.Core.V1.ReplicationControllerArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ReplicationController", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ReplicationController", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicationController(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ReplicationController", name, dictionary, options) { } @@ -75,15 +80,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Replicatio return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicationController resource's state with the given name and ID. /// @@ -92,10 +88,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicationController Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicationController(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicationController(name, default(Types.Inputs.Core.V1.ReplicationControllerArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ReplicationControllerList.cs b/sdk/dotnet/Core/V1/ReplicationControllerList.cs index 1252488d10..42cbb64e82 100755 --- a/sdk/dotnet/Core/V1/ReplicationControllerList.cs +++ b/sdk/dotnet/Core/V1/ReplicationControllerList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ReplicationControllerList is a collection of replication controllers. /// - public partial class ReplicationControllerList : Pulumi.CustomResource + public partial class ReplicationControllerList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ReplicationControllerList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicationControllerList(string name, Types.Inputs.Core.V1.ReplicationControllerListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ReplicationControllerList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ReplicationControllerList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicationControllerList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ReplicationControllerList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.Replicatio return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicationControllerList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicationControllerList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicationControllerList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicationControllerList(name, default(Types.Inputs.Core.V1.ReplicationControllerListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ResourceQuota.cs b/sdk/dotnet/Core/V1/ResourceQuota.cs index 2542f52767..2ecfe61e47 100755 --- a/sdk/dotnet/Core/V1/ResourceQuota.cs +++ b/sdk/dotnet/Core/V1/ResourceQuota.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ResourceQuota sets aggregate quota restrictions enforced per namespace /// - public partial class ResourceQuota : Pulumi.CustomResource + public partial class ResourceQuota : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -59,7 +59,12 @@ public partial class ResourceQuota : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ResourceQuota(string name, Types.Inputs.Core.V1.ResourceQuotaArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ResourceQuota", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ResourceQuota", name, SetAPIKindAndVersion(args), options) + { + } + + internal ResourceQuota(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ResourceQuota", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ResourceQu return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ResourceQuota resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ResourceQuota Get(string name, Input id, CustomResourceOptions? options = null) { - return new ResourceQuota(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ResourceQuota(name, default(Types.Inputs.Core.V1.ResourceQuotaArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ResourceQuotaList.cs b/sdk/dotnet/Core/V1/ResourceQuotaList.cs index 43413a428e..849ba92092 100755 --- a/sdk/dotnet/Core/V1/ResourceQuotaList.cs +++ b/sdk/dotnet/Core/V1/ResourceQuotaList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ResourceQuotaList is a list of ResourceQuota items. /// - public partial class ResourceQuotaList : Pulumi.CustomResource + public partial class ResourceQuotaList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ResourceQuotaList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ResourceQuotaList(string name, Types.Inputs.Core.V1.ResourceQuotaListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ResourceQuotaList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ResourceQuotaList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ResourceQuotaList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ResourceQuotaList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ResourceQu return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ResourceQuotaList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ResourceQuotaList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ResourceQuotaList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ResourceQuotaList(name, default(Types.Inputs.Core.V1.ResourceQuotaListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Secret.cs b/sdk/dotnet/Core/V1/Secret.cs index 0ad4d1d934..ec393375aa 100755 --- a/sdk/dotnet/Core/V1/Secret.cs +++ b/sdk/dotnet/Core/V1/Secret.cs @@ -21,7 +21,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// https://kubernetes.io/docs/concepts/configuration/secret/#security-properties /// https://kubernetes.io/docs/concepts/configuration/secret/#risks /// - public partial class Secret : Pulumi.CustomResource + public partial class Secret : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -79,7 +79,12 @@ public partial class Secret : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Secret(string name, Types.Inputs.Core.V1.SecretArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Secret", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Secret", name, SetAPIKindAndVersion(args), options) + { + } + + internal Secret(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Secret", name, dictionary, options) { } @@ -91,15 +96,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.SecretArgs return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Secret resource's state with the given name and ID. /// @@ -108,10 +104,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Secret Get(string name, Input id, CustomResourceOptions? options = null) { - return new Secret(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Secret(name, default(Types.Inputs.Core.V1.SecretArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/SecretList.cs b/sdk/dotnet/Core/V1/SecretList.cs index 350c98167b..25a1eda111 100755 --- a/sdk/dotnet/Core/V1/SecretList.cs +++ b/sdk/dotnet/Core/V1/SecretList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// SecretList is a list of Secret. /// - public partial class SecretList : Pulumi.CustomResource + public partial class SecretList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class SecretList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public SecretList(string name, Types.Inputs.Core.V1.SecretListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:SecretList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:SecretList", name, SetAPIKindAndVersion(args), options) + { + } + + internal SecretList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:SecretList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.SecretList return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing SecretList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static SecretList Get(string name, Input id, CustomResourceOptions? options = null) { - return new SecretList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new SecretList(name, default(Types.Inputs.Core.V1.SecretListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/Service.cs b/sdk/dotnet/Core/V1/Service.cs index c31c48a1f6..66a25ee930 100755 --- a/sdk/dotnet/Core/V1/Service.cs +++ b/sdk/dotnet/Core/V1/Service.cs @@ -37,7 +37,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Service : Pulumi.CustomResource + public partial class Service : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -87,7 +87,12 @@ public partial class Service : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Service(string name, Types.Inputs.Core.V1.ServiceArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Service", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Service", name, SetAPIKindAndVersion(args), options) + { + } + + internal Service(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Service", name, dictionary, options) { } @@ -99,15 +104,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ServiceArg return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Service resource's state with the given name and ID. /// @@ -116,10 +112,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Service Get(string name, Input id, CustomResourceOptions? options = null) { - return new Service(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Service(name, default(Types.Inputs.Core.V1.ServiceArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ServiceAccount.cs b/sdk/dotnet/Core/V1/ServiceAccount.cs index 4d9c18fdcc..d744885245 100755 --- a/sdk/dotnet/Core/V1/ServiceAccount.cs +++ b/sdk/dotnet/Core/V1/ServiceAccount.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// systems, for an identity * a principal that can be authenticated and authorized * a set of /// secrets /// - public partial class ServiceAccount : Pulumi.CustomResource + public partial class ServiceAccount : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -71,7 +71,12 @@ public partial class ServiceAccount : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ServiceAccount(string name, Types.Inputs.Core.V1.ServiceAccountArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ServiceAccount", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ServiceAccount", name, SetAPIKindAndVersion(args), options) + { + } + + internal ServiceAccount(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ServiceAccount", name, dictionary, options) { } @@ -83,15 +88,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ServiceAcc return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ServiceAccount resource's state with the given name and ID. /// @@ -100,10 +96,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ServiceAccount Get(string name, Input id, CustomResourceOptions? options = null) { - return new ServiceAccount(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ServiceAccount(name, default(Types.Inputs.Core.V1.ServiceAccountArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ServiceAccountList.cs b/sdk/dotnet/Core/V1/ServiceAccountList.cs index 8a3af2b424..02fc1eb10d 100755 --- a/sdk/dotnet/Core/V1/ServiceAccountList.cs +++ b/sdk/dotnet/Core/V1/ServiceAccountList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ServiceAccountList is a list of ServiceAccount objects /// - public partial class ServiceAccountList : Pulumi.CustomResource + public partial class ServiceAccountList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ServiceAccountList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ServiceAccountList(string name, Types.Inputs.Core.V1.ServiceAccountListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ServiceAccountList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ServiceAccountList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ServiceAccountList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ServiceAccountList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ServiceAcc return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ServiceAccountList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ServiceAccountList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ServiceAccountList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ServiceAccountList(name, default(Types.Inputs.Core.V1.ServiceAccountListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Core/V1/ServiceList.cs b/sdk/dotnet/Core/V1/ServiceList.cs index 4381f6d465..3d2948ccfb 100755 --- a/sdk/dotnet/Core/V1/ServiceList.cs +++ b/sdk/dotnet/Core/V1/ServiceList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Core.V1 /// /// ServiceList holds a list of services. /// - public partial class ServiceList : Pulumi.CustomResource + public partial class ServiceList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ServiceList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ServiceList(string name, Types.Inputs.Core.V1.ServiceListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:ServiceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:ServiceList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ServiceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:ServiceList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Core.V1.ServiceLis return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ServiceList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ServiceList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ServiceList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ServiceList(name, default(Types.Inputs.Core.V1.ServiceListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs b/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs index b9c0bfb466..0b19643855 100755 --- a/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs +++ b/sdk/dotnet/Discovery/V1Beta1/EndpointSlice.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Discovery.V1Beta1 /// service there may be multiple EndpointSlice objects, selected by labels, which must be /// joined to produce the full set of endpoints. /// - public partial class EndpointSlice : Pulumi.CustomResource + public partial class EndpointSlice : KubernetesResource { /// /// addressType specifies the type of address carried by this EndpointSlice. All addresses @@ -71,7 +71,12 @@ public partial class EndpointSlice : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public EndpointSlice(string name, Types.Inputs.Discovery.V1Beta1.EndpointSliceArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", name, SetAPIKindAndVersion(args), options) + { + } + + internal EndpointSlice(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSlice", name, dictionary, options) { } @@ -83,15 +88,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Beta1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing EndpointSlice resource's state with the given name and ID. /// @@ -100,10 +96,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static EndpointSlice Get(string name, Input id, CustomResourceOptions? options = null) { - return new EndpointSlice(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new EndpointSlice(name, default(Types.Inputs.Discovery.V1Beta1.EndpointSliceArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Discovery/V1Beta1/EndpointSliceList.cs b/sdk/dotnet/Discovery/V1Beta1/EndpointSliceList.cs index d12fe03084..793aae418b 100755 --- a/sdk/dotnet/Discovery/V1Beta1/EndpointSliceList.cs +++ b/sdk/dotnet/Discovery/V1Beta1/EndpointSliceList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Discovery.V1Beta1 /// /// EndpointSliceList represents a list of endpoint slices /// - public partial class EndpointSliceList : Pulumi.CustomResource + public partial class EndpointSliceList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class EndpointSliceList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public EndpointSliceList(string name, Types.Inputs.Discovery.V1Beta1.EndpointSliceListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, SetAPIKindAndVersion(args), options) + { + } + + internal EndpointSliceList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:discovery.k8s.io/v1beta1:EndpointSliceList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Discovery.V1Beta1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing EndpointSliceList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static EndpointSliceList Get(string name, Input id, CustomResourceOptions? options = null) { - return new EndpointSliceList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new EndpointSliceList(name, default(Types.Inputs.Discovery.V1Beta1.EndpointSliceListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Events/V1Beta1/Event.cs b/sdk/dotnet/Events/V1Beta1/Event.cs index 21bc941c75..6a6a151221 100755 --- a/sdk/dotnet/Events/V1Beta1/Event.cs +++ b/sdk/dotnet/Events/V1Beta1/Event.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Events.V1Beta1 /// Event is a report of an event somewhere in the cluster. It generally denotes some state /// change in the system. /// - public partial class Event : Pulumi.CustomResource + public partial class Event : KubernetesResource { /// /// What action was taken/failed regarding to the regarding object. @@ -131,7 +131,12 @@ public partial class Event : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Event(string name, Types.Inputs.Events.V1Beta1.EventArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:events.k8s.io/v1beta1:Event", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:events.k8s.io/v1beta1:Event", name, SetAPIKindAndVersion(args), options) + { + } + + internal Event(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:events.k8s.io/v1beta1:Event", name, dictionary, options) { } @@ -143,15 +148,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Events.V1Beta1.Eve return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Event resource's state with the given name and ID. /// @@ -160,10 +156,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Event Get(string name, Input id, CustomResourceOptions? options = null) { - return new Event(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Event(name, default(Types.Inputs.Events.V1Beta1.EventArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Events/V1Beta1/EventList.cs b/sdk/dotnet/Events/V1Beta1/EventList.cs index 419d5e5ed2..cc37d3a71d 100755 --- a/sdk/dotnet/Events/V1Beta1/EventList.cs +++ b/sdk/dotnet/Events/V1Beta1/EventList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Events.V1Beta1 /// /// EventList is a list of Event objects. /// - public partial class EventList : Pulumi.CustomResource + public partial class EventList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class EventList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public EventList(string name, Types.Inputs.Events.V1Beta1.EventListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:events.k8s.io/v1beta1:EventList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:events.k8s.io/v1beta1:EventList", name, SetAPIKindAndVersion(args), options) + { + } + + internal EventList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:events.k8s.io/v1beta1:EventList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Events.V1Beta1.Eve return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing EventList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static EventList Get(string name, Input id, CustomResourceOptions? options = null) { - return new EventList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new EventList(name, default(Types.Inputs.Events.V1Beta1.EventListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/DaemonSet.cs b/sdk/dotnet/Extensions/V1Beta1/DaemonSet.cs index 9e4350aa9c..ef9145d664 100755 --- a/sdk/dotnet/Extensions/V1Beta1/DaemonSet.cs +++ b/sdk/dotnet/Extensions/V1Beta1/DaemonSet.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// DaemonSet represents the configuration of a daemon set. /// - public partial class DaemonSet : Pulumi.CustomResource + public partial class DaemonSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -63,7 +63,12 @@ public partial class DaemonSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSet(string name, Types.Inputs.Extensions.V1Beta1.DaemonSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:DaemonSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:DaemonSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:DaemonSet", name, dictionary, options) { } @@ -75,15 +80,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSet resource's state with the given name and ID. /// @@ -92,10 +88,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSet(name, default(Types.Inputs.Extensions.V1Beta1.DaemonSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/DaemonSetList.cs b/sdk/dotnet/Extensions/V1Beta1/DaemonSetList.cs index 6fc48f1185..2f98046ee4 100755 --- a/sdk/dotnet/Extensions/V1Beta1/DaemonSetList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/DaemonSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// DaemonSetList is a collection of daemon sets. /// - public partial class DaemonSetList : Pulumi.CustomResource + public partial class DaemonSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class DaemonSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DaemonSetList(string name, Types.Inputs.Extensions.V1Beta1.DaemonSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:DaemonSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:DaemonSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DaemonSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:DaemonSetList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DaemonSetList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DaemonSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DaemonSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DaemonSetList(name, default(Types.Inputs.Extensions.V1Beta1.DaemonSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/Deployment.cs b/sdk/dotnet/Extensions/V1Beta1/Deployment.cs index bd6506f898..fb9cfc8c9d 100755 --- a/sdk/dotnet/Extensions/V1Beta1/Deployment.cs +++ b/sdk/dotnet/Extensions/V1Beta1/Deployment.cs @@ -37,7 +37,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Deployment : Pulumi.CustomResource + public partial class Deployment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -83,7 +83,12 @@ public partial class Deployment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Deployment(string name, Types.Inputs.Extensions.V1Beta1.DeploymentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:Deployment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:Deployment", name, SetAPIKindAndVersion(args), options) + { + } + + internal Deployment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:Deployment", name, dictionary, options) { } @@ -95,15 +100,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Deployment resource's state with the given name and ID. /// @@ -112,10 +108,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Deployment Get(string name, Input id, CustomResourceOptions? options = null) { - return new Deployment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Deployment(name, default(Types.Inputs.Extensions.V1Beta1.DeploymentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/DeploymentList.cs b/sdk/dotnet/Extensions/V1Beta1/DeploymentList.cs index 5028838804..a4f0860478 100755 --- a/sdk/dotnet/Extensions/V1Beta1/DeploymentList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/DeploymentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// DeploymentList is a list of Deployments. /// - public partial class DeploymentList : Pulumi.CustomResource + public partial class DeploymentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class DeploymentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public DeploymentList(string name, Types.Inputs.Extensions.V1Beta1.DeploymentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:DeploymentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:DeploymentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal DeploymentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:DeploymentList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing DeploymentList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static DeploymentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new DeploymentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new DeploymentList(name, default(Types.Inputs.Extensions.V1Beta1.DeploymentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/Ingress.cs b/sdk/dotnet/Extensions/V1Beta1/Ingress.cs index ff5d5ce8d0..0ad03551bd 100755 --- a/sdk/dotnet/Extensions/V1Beta1/Ingress.cs +++ b/sdk/dotnet/Extensions/V1Beta1/Ingress.cs @@ -29,7 +29,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Ingress : Pulumi.CustomResource + public partial class Ingress : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -78,7 +78,12 @@ public partial class Ingress : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Ingress(string name, Types.Inputs.Extensions.V1Beta1.IngressArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:Ingress", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:Ingress", name, SetAPIKindAndVersion(args), options) + { + } + + internal Ingress(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:Ingress", name, dictionary, options) { } @@ -90,15 +95,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Ingress resource's state with the given name and ID. /// @@ -107,10 +103,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Ingress Get(string name, Input id, CustomResourceOptions? options = null) { - return new Ingress(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Ingress(name, default(Types.Inputs.Extensions.V1Beta1.IngressArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/IngressList.cs b/sdk/dotnet/Extensions/V1Beta1/IngressList.cs index c0417db4e1..57620ea2e8 100755 --- a/sdk/dotnet/Extensions/V1Beta1/IngressList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/IngressList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// IngressList is a collection of Ingress. /// - public partial class IngressList : Pulumi.CustomResource + public partial class IngressList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class IngressList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public IngressList(string name, Types.Inputs.Extensions.V1Beta1.IngressListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:IngressList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:IngressList", name, SetAPIKindAndVersion(args), options) + { + } + + internal IngressList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:IngressList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing IngressList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static IngressList Get(string name, Input id, CustomResourceOptions? options = null) { - return new IngressList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new IngressList(name, default(Types.Inputs.Extensions.V1Beta1.IngressListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/NetworkPolicy.cs b/sdk/dotnet/Extensions/V1Beta1/NetworkPolicy.cs index 2bc1ef7221..3d060afa1b 100755 --- a/sdk/dotnet/Extensions/V1Beta1/NetworkPolicy.cs +++ b/sdk/dotnet/Extensions/V1Beta1/NetworkPolicy.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// networking/v1/NetworkPolicy. NetworkPolicy describes what network traffic is allowed for a /// set of Pods /// - public partial class NetworkPolicy : Pulumi.CustomResource + public partial class NetworkPolicy : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -53,7 +53,12 @@ public partial class NetworkPolicy : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NetworkPolicy(string name, Types.Inputs.Extensions.V1Beta1.NetworkPolicyArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:NetworkPolicy", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:NetworkPolicy", name, SetAPIKindAndVersion(args), options) + { + } + + internal NetworkPolicy(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:NetworkPolicy", name, dictionary, options) { } @@ -65,15 +70,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NetworkPolicy resource's state with the given name and ID. /// @@ -82,10 +78,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NetworkPolicy Get(string name, Input id, CustomResourceOptions? options = null) { - return new NetworkPolicy(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NetworkPolicy(name, default(Types.Inputs.Extensions.V1Beta1.NetworkPolicyArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/NetworkPolicyList.cs b/sdk/dotnet/Extensions/V1Beta1/NetworkPolicyList.cs index 6eca60230b..56c145b828 100755 --- a/sdk/dotnet/Extensions/V1Beta1/NetworkPolicyList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/NetworkPolicyList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// DEPRECATED 1.9 - This group version of NetworkPolicyList is deprecated by /// networking/v1/NetworkPolicyList. Network Policy List is a list of NetworkPolicy objects. /// - public partial class NetworkPolicyList : Pulumi.CustomResource + public partial class NetworkPolicyList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class NetworkPolicyList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NetworkPolicyList(string name, Types.Inputs.Extensions.V1Beta1.NetworkPolicyListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:NetworkPolicyList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:NetworkPolicyList", name, SetAPIKindAndVersion(args), options) + { + } + + internal NetworkPolicyList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:NetworkPolicyList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NetworkPolicyList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NetworkPolicyList Get(string name, Input id, CustomResourceOptions? options = null) { - return new NetworkPolicyList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NetworkPolicyList(name, default(Types.Inputs.Extensions.V1Beta1.NetworkPolicyListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicy.cs b/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicy.cs index 6dee99a3b6..a76eb6b553 100755 --- a/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicy.cs +++ b/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicy.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// will be applied to a pod and container. Deprecated: use PodSecurityPolicy from policy API /// Group instead. /// - public partial class PodSecurityPolicy : Pulumi.CustomResource + public partial class PodSecurityPolicy : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -53,7 +53,12 @@ public partial class PodSecurityPolicy : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodSecurityPolicy(string name, Types.Inputs.Extensions.V1Beta1.PodSecurityPolicyArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:PodSecurityPolicy", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:PodSecurityPolicy", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodSecurityPolicy(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:PodSecurityPolicy", name, dictionary, options) { } @@ -65,15 +70,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodSecurityPolicy resource's state with the given name and ID. /// @@ -82,10 +78,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodSecurityPolicy Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodSecurityPolicy(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodSecurityPolicy(name, default(Types.Inputs.Extensions.V1Beta1.PodSecurityPolicyArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicyList.cs b/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicyList.cs index 7857892c98..8db1a07ea6 100755 --- a/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicyList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/PodSecurityPolicyList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// PodSecurityPolicyList is a list of PodSecurityPolicy objects. Deprecated: use /// PodSecurityPolicyList from policy API Group instead. /// - public partial class PodSecurityPolicyList : Pulumi.CustomResource + public partial class PodSecurityPolicyList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PodSecurityPolicyList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodSecurityPolicyList(string name, Types.Inputs.Extensions.V1Beta1.PodSecurityPolicyListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:PodSecurityPolicyList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:PodSecurityPolicyList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodSecurityPolicyList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:PodSecurityPolicyList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodSecurityPolicyList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodSecurityPolicyList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodSecurityPolicyList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodSecurityPolicyList(name, default(Types.Inputs.Extensions.V1Beta1.PodSecurityPolicyListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/ReplicaSet.cs b/sdk/dotnet/Extensions/V1Beta1/ReplicaSet.cs index 89ef764bc3..80df130c8c 100755 --- a/sdk/dotnet/Extensions/V1Beta1/ReplicaSet.cs +++ b/sdk/dotnet/Extensions/V1Beta1/ReplicaSet.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// ReplicaSet ensures that a specified number of pod replicas are running at any given time. /// - public partial class ReplicaSet : Pulumi.CustomResource + public partial class ReplicaSet : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -64,7 +64,12 @@ public partial class ReplicaSet : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSet(string name, Types.Inputs.Extensions.V1Beta1.ReplicaSetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:ReplicaSet", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:ReplicaSet", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSet(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:ReplicaSet", name, dictionary, options) { } @@ -76,15 +81,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSet resource's state with the given name and ID. /// @@ -93,10 +89,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSet Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSet(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSet(name, default(Types.Inputs.Extensions.V1Beta1.ReplicaSetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Extensions/V1Beta1/ReplicaSetList.cs b/sdk/dotnet/Extensions/V1Beta1/ReplicaSetList.cs index 77abbab7e1..32aaad0598 100755 --- a/sdk/dotnet/Extensions/V1Beta1/ReplicaSetList.cs +++ b/sdk/dotnet/Extensions/V1Beta1/ReplicaSetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Extensions.V1Beta1 /// /// ReplicaSetList is a collection of ReplicaSets. /// - public partial class ReplicaSetList : Pulumi.CustomResource + public partial class ReplicaSetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ReplicaSetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ReplicaSetList(string name, Types.Inputs.Extensions.V1Beta1.ReplicaSetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:extensions/v1beta1:ReplicaSetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:extensions/v1beta1:ReplicaSetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ReplicaSetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:extensions/v1beta1:ReplicaSetList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Extensions.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ReplicaSetList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ReplicaSetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ReplicaSetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ReplicaSetList(name, default(Types.Inputs.Extensions.V1Beta1.ReplicaSetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/FlowControl/V1Alpha1/FlowSchema.cs b/sdk/dotnet/FlowControl/V1Alpha1/FlowSchema.cs index 81757c4b7e..018a58b677 100755 --- a/sdk/dotnet/FlowControl/V1Alpha1/FlowSchema.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/FlowSchema.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.FlowControl.V1Alpha1 /// inbound API requests with similar attributes and is identified by a pair of strings: the /// name of the FlowSchema and a "flow distinguisher". /// - public partial class FlowSchema : Pulumi.CustomResource + public partial class FlowSchema : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class FlowSchema : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public FlowSchema(string name, Types.Inputs.FlowControl.V1Alpha1.FlowSchemaArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, SetAPIKindAndVersion(args), options) + { + } + + internal FlowSchema(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alph return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing FlowSchema resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static FlowSchema Get(string name, Input id, CustomResourceOptions? options = null) { - return new FlowSchema(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new FlowSchema(name, default(Types.Inputs.FlowControl.V1Alpha1.FlowSchemaArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/FlowControl/V1Alpha1/FlowSchemaList.cs b/sdk/dotnet/FlowControl/V1Alpha1/FlowSchemaList.cs index a300efd0fd..ec5d27489f 100755 --- a/sdk/dotnet/FlowControl/V1Alpha1/FlowSchemaList.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/FlowSchemaList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.FlowControl.V1Alpha1 /// /// FlowSchemaList is a list of FlowSchema objects. /// - public partial class FlowSchemaList : Pulumi.CustomResource + public partial class FlowSchemaList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class FlowSchemaList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public FlowSchemaList(string name, Types.Inputs.FlowControl.V1Alpha1.FlowSchemaListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchemaList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchemaList", name, SetAPIKindAndVersion(args), options) + { + } + + internal FlowSchemaList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchemaList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alph return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing FlowSchemaList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static FlowSchemaList Get(string name, Input id, CustomResourceOptions? options = null) { - return new FlowSchemaList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new FlowSchemaList(name, default(Types.Inputs.FlowControl.V1Alpha1.FlowSchemaListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfiguration.cs b/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfiguration.cs index 23fc09646c..8a39f9f060 100755 --- a/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfiguration.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfiguration.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.FlowControl.V1Alpha1 /// /// PriorityLevelConfiguration represents the configuration of a priority level. /// - public partial class PriorityLevelConfiguration : Pulumi.CustomResource + public partial class PriorityLevelConfiguration : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -59,7 +59,12 @@ public partial class PriorityLevelConfiguration : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityLevelConfiguration(string name, Types.Inputs.FlowControl.V1Alpha1.PriorityLevelConfigurationArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfiguration", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfiguration", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityLevelConfiguration(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfiguration", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alph return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityLevelConfiguration resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityLevelConfiguration Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityLevelConfiguration(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityLevelConfiguration(name, default(Types.Inputs.FlowControl.V1Alpha1.PriorityLevelConfigurationArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfigurationList.cs b/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfigurationList.cs index dae3dd8cd1..7669afd437 100755 --- a/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfigurationList.cs +++ b/sdk/dotnet/FlowControl/V1Alpha1/PriorityLevelConfigurationList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.FlowControl.V1Alpha1 /// /// PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. /// - public partial class PriorityLevelConfigurationList : Pulumi.CustomResource + public partial class PriorityLevelConfigurationList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PriorityLevelConfigurationList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityLevelConfigurationList(string name, Types.Inputs.FlowControl.V1Alpha1.PriorityLevelConfigurationListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfigurationList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfigurationList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityLevelConfigurationList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:PriorityLevelConfigurationList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.FlowControl.V1Alph return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityLevelConfigurationList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityLevelConfigurationList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityLevelConfigurationList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityLevelConfigurationList(name, default(Types.Inputs.FlowControl.V1Alpha1.PriorityLevelConfigurationListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Helm/ChartBase.cs b/sdk/dotnet/Helm/ChartBase.cs new file mode 100644 index 0000000000..d6550400b5 --- /dev/null +++ b/sdk/dotnet/Helm/ChartBase.cs @@ -0,0 +1,410 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Text.Json; +using Pulumi.Kubernetes.Yaml; +using Pulumi.Utilities; +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Helm +{ + public abstract class ChartBase : CollectionComponentResource + { + /// + /// Create an instance of the specified Helm chart. + /// + /// Name of the Chart (e.g., nginx-ingress). + /// Configuration options for the Chart. + /// A bag of options that control this resource's behavior. + protected ChartBase(string releaseName, Union args, ComponentResourceOptions? options = null) + : base("kubernetes:helm.sh/v2:Chart", GetName(args, releaseName), options) + { + var config = args.Unwrap(); + + var configDeps = Output.Create(OutputUtilities.GetDependenciesAsync(config)); + OutputUtilities.GetIsKnownAsync(config).ContinueWith(isKnown => + { + if (!isKnown.Result) + { + // Note that this can only happen during a preview. + Log.Info("[Can't preview] all chart values must be known ahead of time to generate an accurate preview.", this); + } + }); + + var resources = Output.Tuple(config, configDeps).Apply(values => + { + var chartArgs = values.Item1; + var dependencies = values.Item2; + + // Create temporary directories and files to hold chart data and override values. + var overrides = Path.GetTempFileName(); + var chartDirectoryName = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); + var chartDirectory = Directory.CreateDirectory(chartDirectoryName); + + try + { + string chart; + string defaultValues; + BaseChartArgsUnwrap cfgBase; + if (chartArgs.IsT0) + { + var cfg = chartArgs.AsT0; + // Fetch chart. + if (cfg.Repo != null && cfg.Repo.Contains("http")) + { + throw new Exception( + $"`{nameof(cfg.Repo)}` specifies the name of the Helm chart repo. Use `{nameof(ChartArgs)}.{nameof(cfg.Repo)}` to specify a URL."); + } + + var chartToFetch = !string.IsNullOrEmpty(cfg.Repo) ? $"{cfg.Repo}/{cfg.Chart}" : cfg.Chart; + var fetchOptions = cfg.FetchOptions ?? new ChartFetchArgsUnwrap(); + fetchOptions.Destination = chartDirectoryName; + fetchOptions.Version = cfg.Version; + Fetch(chartToFetch, fetchOptions); + var fetchedChart = chartDirectory.GetDirectories()[0]; + var fetchedChartName = fetchedChart.Name; + chart = fetchedChart.FullName; + defaultValues = Path.Join(chartDirectoryName, fetchedChartName, "values.yaml"); + cfgBase = cfg; + } + else + { + var cfg = chartArgs.AsT1; + chart = cfg.Path; + defaultValues = Path.Join(chart, "values.yaml"); + cfgBase = cfg; + } + + // Write overrides file. + var data = JsonSerializer.Serialize(cfgBase.Values); + File.WriteAllText(overrides, data); + + // Does not require Tiller. From the `helm template` documentation: + // + // > Render chart templates locally and display the output. + // > + // > This does not require Tiller. However, any values that would normally be + // > looked up or retrieved in-cluster will be faked locally. Additionally, none + // > of the server-side testing of chart validity (e.g. whether an API is supported) + // > is done. + var flags = new List(new[] + { + "template", chart, + "--name-template", releaseName, + "--values", defaultValues, + "--values", overrides + }); + if (cfgBase.ApiVersions.Length > 0) + { + flags.Add("--api-versions"); + flags.Add(string.Join(",", cfgBase.ApiVersions)); + } + + if (!string.IsNullOrEmpty(cfgBase.Namespace)) + { + flags.Add("--namespace"); + flags.Add(cfgBase.Namespace); + } + + // Use the HELM_HOME environment variable value if set. + var home = Environment.GetEnvironmentVariable("HELM_HOME"); + if (home != null) + { + flags.Add("--home"); + flags.Add(home); + } + + var yaml = Utilities.ExecuteCommand("helm", flags.ToArray()); + return ParseTemplate( + yaml, cfgBase.Transformations, cfgBase.ResourcePrefix, dependencies, cfgBase.Namespace); + } + catch (Exception e) + { + // Shed stack trace, only emit the error. + throw new ResourceException(e.Message, this); + } + finally + { + chartDirectory.Delete(true); + } + }); + RegisterResources(resources); + } + + private static string GetName(Union config, string releaseName) + { + var prefix = config.Match(v => v.ResourcePrefix, v => v.ResourcePrefix); + return string.IsNullOrEmpty(prefix) ? releaseName : $"{prefix}-{releaseName}"; + } + + private void Fetch(string chart, ChartFetchArgsUnwrap opts) + { + var flags = new List(new[] { "fetch", chart }); + + // Untar by default. + if (opts.Untar != false) + { + flags.Add("--untar"); + } + + // Fallback to using the HELM_HOME environment variable if opts.home is not set. + if (string.IsNullOrEmpty(opts.Home)) { + opts.Home = Environment.GetEnvironmentVariable("HELM_HOME"); + } + + if (!string.IsNullOrEmpty(opts.Version)) + { + flags.Add("--version"); + flags.Add(opts.Version); + } + if (!string.IsNullOrEmpty(opts.CAFile)) + { + flags.Add("--ca-file"); + flags.Add(opts.CAFile); + } + if (!string.IsNullOrEmpty(opts.CertFile)) + { + flags.Add("--cert-file"); + flags.Add(opts.CertFile); + } + if (!string.IsNullOrEmpty(opts.KeyFile)) + { + flags.Add("--key-file"); + flags.Add(opts.KeyFile); + } + if (!string.IsNullOrEmpty(opts.Destination)) + { + flags.Add("--destination"); + flags.Add(opts.Destination); + } + if (!string.IsNullOrEmpty(opts.Keyring)) + { + flags.Add("--keyring"); + flags.Add(opts.Keyring); + } + if (!string.IsNullOrEmpty(opts.Password)) + { + flags.Add("--password"); + flags.Add(opts.Password); + } + if (!string.IsNullOrEmpty(opts.Repo)) + { + flags.Add("--repo"); + flags.Add(opts.Repo); + } + if (!string.IsNullOrEmpty(opts.UntarDir)) + { + flags.Add("--untardir"); + flags.Add(opts.UntarDir); + } + if (!string.IsNullOrEmpty(opts.Username)) + { + flags.Add("--username"); + flags.Add(opts.Username); + } + if (!string.IsNullOrEmpty(opts.Home)) + { + flags.Add("--home"); + flags.Add(opts.Home); + } + if (opts.Devel == true) + { + flags.Add("--devel"); + } + if (opts.Prov == true) + { + flags.Add("--prov"); + } + if (opts.Verify == true) + { + flags.Add("--verify"); + } + + Utilities.ExecuteCommand("helm", flags.ToArray()); + } + + private Output> ParseTemplate(string text, + TransformationAction[]? transformations, string? resourcePrefix, ImmutableHashSet dependsOn, + string? defaultNamespace) + { + return Invokes + .YamlDecode(new YamlDecodeArgs {Text = text, DefaultNamespace = defaultNamespace}) + .Apply(objs => + { + var args = new ConfigGroupArgs + { + ResourcePrefix = resourcePrefix, + Objs = objs, + Transformations = transformations + }; + var opts = new ComponentResourceOptions {Parent = this, DependsOn = dependsOn.ToArray()}; + return Parser.Parse(args, opts); + }); + } + } + + public class BaseChartArgs : ResourceArgs + { + private InputList? _apiVersions; + + /// + /// The optional kubernetes api versions used for Capabilities.APIVersions. + /// + public InputList ApiVersions + { + get => _apiVersions ??= new InputList(); + set => _apiVersions = value; + } + + /// + /// The optional namespace to install chart resources into. + /// + public Input? Namespace { get; set; } + + private InputMap? _values; + + /// + /// Overrides for chart values. + /// + public InputMap Values + { + get => _values ??= new InputMap(); + set => _values = value; + } + + /// + /// Optional array of transformations to apply to resources that will be created by this chart prior to + /// creation. Allows customization of the chart behaviour without directly modifying the chart itself. + /// + public TransformationAction[]? Transformations { get; set; } + + /// + /// An optional prefix for the auto-generated resource names. + /// Example: A resource created with resourcePrefix="foo" would produce a resource named "foo-resourceName". + /// + public string? ResourcePrefix { get; set; } + } + + public class ChartArgs : BaseChartArgs + { + /// + /// The repository name of the chart to deploy. + /// Example: "stable" + /// + public Input? Repo { get; set; } + + /// + /// The name of the chart to deploy. If is provided, this chart + /// name will be prefixed by the repo name. + /// Example: Repo: "stable", Chart: "nginx-ingress" -> "stable/nginx-ingress" + /// Example: Chart: "stable/nginx-ingress" -> "stable/nginx-ingress" + /// + public Input Chart { get; set; } = null!; + + /// + /// The version of the chart to deploy. If not provided, the latest version will be deployed. + /// + public Input? Version { get; set; } + + /// + /// Additional options to customize the fetching of the Helm chart. + /// + public Input? FetchOptions { get; set; } + } + + public class LocalChartArgs : BaseChartArgs + { + /// + /// The path to the chart directory which contains the `Chart.yaml` file. + /// + public string Path { get; set; } = null!; + } + + /// + /// Additional options to customize the fetching of the Helm chart. + /// + public class ChartFetchArgs + { + /// + /// Specific version of a chart. Without this, the latest version is fetched. + /// + public Input? Version { get; set; } + + /// + /// Verify certificates of HTTPS-enabled servers using this CA bundle. + /// + public Input? CAFile { get; set; } + + /// + /// Identify HTTPS client using this SSL certificate file. + /// + public Input? CertFile { get; set; } + + /// + /// Identify HTTPS client using this SSL key file. + /// + public Input? KeyFile { get; set; } + + /// + /// Location to write the chart. If this and tardir are specified, tardir is appended to this + /// (default "."). + /// + public Input? Destination { get; set; } + + /// + /// Keyring containing public keys (default "/Users/alex/.gnupg/pubring.gpg"). + /// + public Input? Keyring { get; set; } + + /// + /// Chart repository password. + /// + public Input? Password { get; set; } + + /// + /// Chart repository url where to locate the requested chart. + /// + public Input? Repo { get; set; } + + /// + /// If untar is specified, this flag specifies the name of the directory into which the chart is + /// expanded (default "."). + /// + public Input? UntarDir { get; set; } + + /// + /// Chart repository username. + /// + public Input? Username { get; set; } + + /// + /// Location of your Helm config. Overrides $HELM_HOME (default "/Users/alex/.helm"). + /// + public Input? Home { get; set; } + + /// + /// Use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is + /// ignored. + /// + public Input? Devel { get; set; } + + /// + /// Fetch the provenance file, but don't perform verification. + /// + public Input? Prov { get; set; } + + /// + /// If set to false, will leave the chart as a tarball after downloading. + /// + public Input? Untar { get; set; } + + /// + /// Verify the package against its signature. + /// + public Input? Verify { get; set; } + } +} diff --git a/sdk/dotnet/Helm/Unwraps.cs b/sdk/dotnet/Helm/Unwraps.cs new file mode 100644 index 0000000000..839dc78639 --- /dev/null +++ b/sdk/dotnet/Helm/Unwraps.cs @@ -0,0 +1,122 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System.Collections.Immutable; +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Helm +{ + internal class BaseChartArgsUnwrap + { + public ImmutableArray ApiVersions { get; set; } + public string? Namespace { get; set; } + public ImmutableDictionary Values { get; set; } = null!; + public TransformationAction[]? Transformations { get; set; } + public string? ResourcePrefix { get; set; } + } + + internal class ChartArgsUnwrap : BaseChartArgsUnwrap + { + public string? Repo { get; set; } + public string Chart { get; set; } = null!; + public string? Version { get; set; } + public ChartFetchArgsUnwrap? FetchOptions { get; set; } + } + + internal class LocalChartArgsUnwrap : BaseChartArgsUnwrap + { + public string Path { get; set; } = null!; + } + + internal class ChartFetchArgsUnwrap + { + public string? Version { get; set; } + public string? CAFile { get; set; } + public string? CertFile { get; set; } + public string? KeyFile { get; set; } + public string? Destination { get; set; } + public string? Keyring { get; set; } + public string? Password { get; set; } + public string? Repo { get; set; } + public string? UntarDir { get; set; } + public string? Username { get; set; } + public string? Home { get; set; } + public bool? Devel { get; set; } + public bool? Prov { get; set; } + public bool? Untar { get; set; } + public bool? Verify { get; set; } + } + + internal static class Extensions + { + public static Output> Unwrap(this Union options) + { + return options.Match( + v => Output.Tuple(v.ApiVersions, v.Namespace.ToNullable(), v.Values, v.Repo.ToNullable(), v.Chart, v.Version.ToNullable(), v.FetchOptions.Unwrap()).Apply(vs => + Union.FromT0( + new ChartArgsUnwrap + { + ApiVersions = vs.Item1, + Namespace = vs.Item2, + Values = vs.Item3, + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Repo = vs.Item4, + Chart = vs.Item5, + Version = vs.Item6, + FetchOptions = vs.Item7 + })), + v => Output.Tuple(v.ApiVersions, v.Namespace.ToNullable(), v.Values).Apply(vs => + Union.FromT1( + new LocalChartArgsUnwrap + { + ApiVersions = vs.Item1, + Namespace = vs.Item2, + Values = vs.Item3, + Transformations = v.Transformations, + ResourcePrefix = v.ResourcePrefix, + Path = v.Path + }))); + } + + private static Input Unwrap(this Input? options) + { + if (options == null) + { + return Output.Create((ChartFetchArgsUnwrap?)null); + } + + var strings = options.Apply(o => Output.All( + o.Version.ToNullable(), o.CAFile.ToNullable(), o.CertFile.ToNullable(), o.KeyFile.ToNullable(), + o.Destination.ToNullable(), o.Keyring.ToNullable(), + o.Password.ToNullable(), o.Repo.ToNullable(), o.UntarDir.ToNullable(), o.Username.ToNullable(), + o.Home.ToNullable())); + var bools = options.Apply(o => Output.All( + o.Devel.ToNullable(), o.Prov.ToNullable(), o.Untar.ToNullable(), o.Verify.ToNullable())); + return Output.Tuple(strings, bools).Apply(vs => + new ChartFetchArgsUnwrap + { + Version = vs.Item1[0], + CAFile = vs.Item1[1], + CertFile = vs.Item1[2], + KeyFile = vs.Item1[3], + Destination = vs.Item1[4], + Keyring = vs.Item1[5], + Password = vs.Item1[6], + Repo = vs.Item1[7], + UntarDir = vs.Item1[8], + Username = vs.Item1[9], + Home = vs.Item1[10], + Devel = vs.Item2[0], + Prov = vs.Item2[1], + Untar = vs.Item2[2], + Verify = vs.Item2[3] + })!; + } + + private static Input ToNullable(this Input? input) where T : class + => input != null ? input.Apply(v => (T?)v) : Output.Create((T?) null); + + private static Input ToNullable(this Input? input) + => input != null ? input.Apply(v => (bool?)v) : Output.Create((bool?) null); + } +} diff --git a/sdk/dotnet/Helm/V2/Chart.cs b/sdk/dotnet/Helm/V2/Chart.cs new file mode 100644 index 0000000000..42f5fd49dd --- /dev/null +++ b/sdk/dotnet/Helm/V2/Chart.cs @@ -0,0 +1,23 @@ +namespace Pulumi.Kubernetes.Helm.V2 +{ + /// + /// Chart is a component representing a collection of resources described by an arbitrary Helm + /// Chart. The Chart can be fetched from any source that is accessible to the `helm` command + /// line. Values in the `values.yml` file can be overridden using + /// (equivalent to `--set` or having multiple + /// `values.yml` files). Objects can be transformed arbitrarily by supplying callbacks to + /// . + /// + /// does not use Tiller. The Chart specified is copied and expanded locally; + /// the semantics are equivalent to running `helm template` and then using Pulumi to manage the + /// resulting YAML manifests. Any values that would be retrieved in-cluster are assigned fake + /// values, and none of Tiller's server-side validity testing is executed. + /// + public sealed class Chart : ChartBase + { + public Chart(string releaseName, Union args, ComponentResourceOptions? options = null) + : base(releaseName, args, options) + { + } + } +} diff --git a/sdk/dotnet/Helm/V3/Chart.cs b/sdk/dotnet/Helm/V3/Chart.cs new file mode 100644 index 0000000000..df15c42d44 --- /dev/null +++ b/sdk/dotnet/Helm/V3/Chart.cs @@ -0,0 +1,23 @@ +namespace Pulumi.Kubernetes.Helm.V3 +{ + /// + /// Chart is a component representing a collection of resources described by an arbitrary Helm + /// Chart. The Chart can be fetched from any source that is accessible to the `helm` command + /// line. Values in the `values.yml` file can be overridden using + /// (equivalent to `--set` or having multiple + /// `values.yml` files). Objects can be transformed arbitrarily by supplying callbacks to + /// . + /// + /// does not use Tiller. The Chart specified is copied and expanded locally; + /// the semantics are equivalent to running `helm template` and then using Pulumi to manage the + /// resulting YAML manifests. Any values that would be retrieved in-cluster are assigned fake + /// values, and none of Tiller's server-side validity testing is executed. + /// + public sealed class Chart : ChartBase + { + public Chart(string releaseName, Union args, ComponentResourceOptions? options = null) + : base(releaseName, args, options) + { + } + } +} diff --git a/sdk/dotnet/KubernetesResource.cs b/sdk/dotnet/KubernetesResource.cs new file mode 100644 index 0000000000..443ef988f4 --- /dev/null +++ b/sdk/dotnet/KubernetesResource.cs @@ -0,0 +1,38 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System.Collections.Immutable; + +namespace Pulumi.Kubernetes +{ + /// + /// A base class for all Kubernetes resources. + /// + public abstract class KubernetesResource : CustomResource + { + /// + /// Standard constructor passing arguments to . + /// + internal KubernetesResource(string type, string name, ResourceArgs? args, CustomResourceOptions? options = null) + : base(type, name, args, MakeResourceOptions(options)) + { + } + + /// + /// Additional constructor for dynamic arguments received from YAML-based sources. + /// + internal KubernetesResource(string type, string name, ImmutableDictionary dictionary, + CustomResourceOptions? options = null) + : base(type, name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + return CustomResourceOptions.Merge(defaultOptions, options); + } + } +} diff --git a/sdk/dotnet/Meta/V1/Status.cs b/sdk/dotnet/Meta/V1/Status.cs index aa94835dcc..fa8bf54170 100755 --- a/sdk/dotnet/Meta/V1/Status.cs +++ b/sdk/dotnet/Meta/V1/Status.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Meta.V1 /// /// Status is a return value for calls that don't return other objects. /// - public partial class Status : Pulumi.CustomResource + public partial class Status : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -80,7 +80,12 @@ public partial class Status : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Status(string name, Types.Inputs.Meta.V1.StatusArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:core/v1:Status", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:core/v1:Status", name, SetAPIKindAndVersion(args), options) + { + } + + internal Status(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:core/v1:Status", name, dictionary, options) { } @@ -92,15 +97,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Meta.V1.StatusArgs return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Status resource's state with the given name and ID. /// @@ -109,10 +105,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Status Get(string name, Input id, CustomResourceOptions? options = null) { - return new Status(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Status(name, default(Types.Inputs.Meta.V1.StatusArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Networking/V1/NetworkPolicy.cs b/sdk/dotnet/Networking/V1/NetworkPolicy.cs index ffd80f78be..e36c54f9c7 100755 --- a/sdk/dotnet/Networking/V1/NetworkPolicy.cs +++ b/sdk/dotnet/Networking/V1/NetworkPolicy.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Networking.V1 /// /// NetworkPolicy describes what network traffic is allowed for a set of Pods /// - public partial class NetworkPolicy : Pulumi.CustomResource + public partial class NetworkPolicy : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class NetworkPolicy : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NetworkPolicy(string name, Types.Inputs.Networking.V1.NetworkPolicyArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:networking.k8s.io/v1:NetworkPolicy", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:networking.k8s.io/v1:NetworkPolicy", name, SetAPIKindAndVersion(args), options) + { + } + + internal NetworkPolicy(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:networking.k8s.io/v1:NetworkPolicy", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Networking.V1.Netw return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NetworkPolicy resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NetworkPolicy Get(string name, Input id, CustomResourceOptions? options = null) { - return new NetworkPolicy(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NetworkPolicy(name, default(Types.Inputs.Networking.V1.NetworkPolicyArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Networking/V1/NetworkPolicyList.cs b/sdk/dotnet/Networking/V1/NetworkPolicyList.cs index 4c47d815fb..b83733f434 100755 --- a/sdk/dotnet/Networking/V1/NetworkPolicyList.cs +++ b/sdk/dotnet/Networking/V1/NetworkPolicyList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Networking.V1 /// /// NetworkPolicyList is a list of NetworkPolicy objects. /// - public partial class NetworkPolicyList : Pulumi.CustomResource + public partial class NetworkPolicyList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class NetworkPolicyList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public NetworkPolicyList(string name, Types.Inputs.Networking.V1.NetworkPolicyListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:networking.k8s.io/v1:NetworkPolicyList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:networking.k8s.io/v1:NetworkPolicyList", name, SetAPIKindAndVersion(args), options) + { + } + + internal NetworkPolicyList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:networking.k8s.io/v1:NetworkPolicyList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Networking.V1.Netw return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing NetworkPolicyList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static NetworkPolicyList Get(string name, Input id, CustomResourceOptions? options = null) { - return new NetworkPolicyList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new NetworkPolicyList(name, default(Types.Inputs.Networking.V1.NetworkPolicyListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Networking/V1Beta1/Ingress.cs b/sdk/dotnet/Networking/V1Beta1/Ingress.cs index 4c6005bdde..c2c8855a37 100755 --- a/sdk/dotnet/Networking/V1Beta1/Ingress.cs +++ b/sdk/dotnet/Networking/V1Beta1/Ingress.cs @@ -26,7 +26,7 @@ namespace Pulumi.Kubernetes.Networking.V1Beta1 /// time out and mark the resource update as Failed. You can override the default timeout value /// by setting the 'customTimeouts' option on the resource. /// - public partial class Ingress : Pulumi.CustomResource + public partial class Ingress : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -75,7 +75,12 @@ public partial class Ingress : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Ingress(string name, Types.Inputs.Networking.V1Beta1.IngressArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:networking.k8s.io/v1beta1:Ingress", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:networking.k8s.io/v1beta1:Ingress", name, SetAPIKindAndVersion(args), options) + { + } + + internal Ingress(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:networking.k8s.io/v1beta1:Ingress", name, dictionary, options) { } @@ -87,15 +92,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Networking.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Ingress resource's state with the given name and ID. /// @@ -104,10 +100,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Ingress Get(string name, Input id, CustomResourceOptions? options = null) { - return new Ingress(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Ingress(name, default(Types.Inputs.Networking.V1Beta1.IngressArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Networking/V1Beta1/IngressList.cs b/sdk/dotnet/Networking/V1Beta1/IngressList.cs index ed93287323..689c6e41fb 100755 --- a/sdk/dotnet/Networking/V1Beta1/IngressList.cs +++ b/sdk/dotnet/Networking/V1Beta1/IngressList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Networking.V1Beta1 /// /// IngressList is a collection of Ingress. /// - public partial class IngressList : Pulumi.CustomResource + public partial class IngressList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class IngressList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public IngressList(string name, Types.Inputs.Networking.V1Beta1.IngressListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:networking.k8s.io/v1beta1:IngressList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:networking.k8s.io/v1beta1:IngressList", name, SetAPIKindAndVersion(args), options) + { + } + + internal IngressList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:networking.k8s.io/v1beta1:IngressList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Networking.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing IngressList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static IngressList Get(string name, Input id, CustomResourceOptions? options = null) { - return new IngressList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new IngressList(name, default(Types.Inputs.Networking.V1Beta1.IngressListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Node/V1Alpha1/RuntimeClass.cs b/sdk/dotnet/Node/V1Alpha1/RuntimeClass.cs index 2cd199657a..8464d972be 100755 --- a/sdk/dotnet/Node/V1Alpha1/RuntimeClass.cs +++ b/sdk/dotnet/Node/V1Alpha1/RuntimeClass.cs @@ -15,7 +15,7 @@ namespace Pulumi.Kubernetes.Node.V1Alpha1 /// reference before running the pod. For more details, see /// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md /// - public partial class RuntimeClass : Pulumi.CustomResource + public partial class RuntimeClass : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -57,7 +57,12 @@ public partial class RuntimeClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RuntimeClass(string name, Types.Inputs.Node.V1Alpha1.RuntimeClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal RuntimeClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClass", name, dictionary, options) { } @@ -69,15 +74,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Node.V1Alpha1.Runt return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RuntimeClass resource's state with the given name and ID. /// @@ -86,10 +82,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RuntimeClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new RuntimeClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RuntimeClass(name, default(Types.Inputs.Node.V1Alpha1.RuntimeClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Node/V1Alpha1/RuntimeClassList.cs b/sdk/dotnet/Node/V1Alpha1/RuntimeClassList.cs index 6d79869a5e..a846e81c4f 100755 --- a/sdk/dotnet/Node/V1Alpha1/RuntimeClassList.cs +++ b/sdk/dotnet/Node/V1Alpha1/RuntimeClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Node.V1Alpha1 /// /// RuntimeClassList is a list of RuntimeClass objects. /// - public partial class RuntimeClassList : Pulumi.CustomResource + public partial class RuntimeClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RuntimeClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RuntimeClassList(string name, Types.Inputs.Node.V1Alpha1.RuntimeClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RuntimeClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:node.k8s.io/v1alpha1:RuntimeClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Node.V1Alpha1.Runt return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RuntimeClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RuntimeClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RuntimeClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RuntimeClassList(name, default(Types.Inputs.Node.V1Alpha1.RuntimeClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Node/V1Beta1/RuntimeClass.cs b/sdk/dotnet/Node/V1Beta1/RuntimeClass.cs index 3607d54844..a0807fe025 100755 --- a/sdk/dotnet/Node/V1Beta1/RuntimeClass.cs +++ b/sdk/dotnet/Node/V1Beta1/RuntimeClass.cs @@ -15,7 +15,7 @@ namespace Pulumi.Kubernetes.Node.V1Beta1 /// reference before running the pod. For more details, see /// https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md /// - public partial class RuntimeClass : Pulumi.CustomResource + public partial class RuntimeClass : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -80,7 +80,12 @@ public partial class RuntimeClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RuntimeClass(string name, Types.Inputs.Node.V1Beta1.RuntimeClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:node.k8s.io/v1beta1:RuntimeClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:node.k8s.io/v1beta1:RuntimeClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal RuntimeClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:node.k8s.io/v1beta1:RuntimeClass", name, dictionary, options) { } @@ -92,15 +97,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Node.V1Beta1.Runti return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RuntimeClass resource's state with the given name and ID. /// @@ -109,10 +105,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RuntimeClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new RuntimeClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RuntimeClass(name, default(Types.Inputs.Node.V1Beta1.RuntimeClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Node/V1Beta1/RuntimeClassList.cs b/sdk/dotnet/Node/V1Beta1/RuntimeClassList.cs index be4337aaa0..ef97a3f834 100755 --- a/sdk/dotnet/Node/V1Beta1/RuntimeClassList.cs +++ b/sdk/dotnet/Node/V1Beta1/RuntimeClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Node.V1Beta1 /// /// RuntimeClassList is a list of RuntimeClass objects. /// - public partial class RuntimeClassList : Pulumi.CustomResource + public partial class RuntimeClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RuntimeClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RuntimeClassList(string name, Types.Inputs.Node.V1Beta1.RuntimeClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:node.k8s.io/v1beta1:RuntimeClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:node.k8s.io/v1beta1:RuntimeClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RuntimeClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:node.k8s.io/v1beta1:RuntimeClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Node.V1Beta1.Runti return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RuntimeClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RuntimeClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RuntimeClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RuntimeClassList(name, default(Types.Inputs.Node.V1Beta1.RuntimeClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs index 3ebbd3c744..ccaacb8f81 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudget.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Policy.V1Beta1 /// PodDisruptionBudget is an object to define the max disruption that can be caused to a /// collection of pods /// - public partial class PodDisruptionBudget : Pulumi.CustomResource + public partial class PodDisruptionBudget : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -55,7 +55,12 @@ public partial class PodDisruptionBudget : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodDisruptionBudget(string name, Types.Inputs.Policy.V1Beta1.PodDisruptionBudgetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:policy/v1beta1:PodDisruptionBudget", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:policy/v1beta1:PodDisruptionBudget", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodDisruptionBudget(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1beta1:PodDisruptionBudget", name, dictionary, options) { } @@ -67,15 +72,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Policy.V1Beta1.Pod return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodDisruptionBudget resource's state with the given name and ID. /// @@ -84,10 +80,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodDisruptionBudget Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodDisruptionBudget(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodDisruptionBudget(name, default(Types.Inputs.Policy.V1Beta1.PodDisruptionBudgetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudgetList.cs b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudgetList.cs index e7c23ff5ee..ccd416b529 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudgetList.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodDisruptionBudgetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Policy.V1Beta1 /// /// PodDisruptionBudgetList is a collection of PodDisruptionBudgets. /// - public partial class PodDisruptionBudgetList : Pulumi.CustomResource + public partial class PodDisruptionBudgetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class PodDisruptionBudgetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodDisruptionBudgetList(string name, Types.Inputs.Policy.V1Beta1.PodDisruptionBudgetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:policy/v1beta1:PodDisruptionBudgetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:policy/v1beta1:PodDisruptionBudgetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodDisruptionBudgetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1beta1:PodDisruptionBudgetList", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Policy.V1Beta1.Pod return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodDisruptionBudgetList resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodDisruptionBudgetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodDisruptionBudgetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodDisruptionBudgetList(name, default(Types.Inputs.Policy.V1Beta1.PodDisruptionBudgetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs index 6a5fa45e15..91d20b8326 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicy.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Policy.V1Beta1 /// PodSecurityPolicy governs the ability to make requests that affect the Security Context that /// will be applied to a pod and container. /// - public partial class PodSecurityPolicy : Pulumi.CustomResource + public partial class PodSecurityPolicy : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class PodSecurityPolicy : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodSecurityPolicy(string name, Types.Inputs.Policy.V1Beta1.PodSecurityPolicyArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:policy/v1beta1:PodSecurityPolicy", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:policy/v1beta1:PodSecurityPolicy", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodSecurityPolicy(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1beta1:PodSecurityPolicy", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Policy.V1Beta1.Pod return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodSecurityPolicy resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodSecurityPolicy Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodSecurityPolicy(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodSecurityPolicy(name, default(Types.Inputs.Policy.V1Beta1.PodSecurityPolicyArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicyList.cs b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicyList.cs index b734586c2d..784e378150 100755 --- a/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicyList.cs +++ b/sdk/dotnet/Policy/V1Beta1/PodSecurityPolicyList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Policy.V1Beta1 /// /// PodSecurityPolicyList is a list of PodSecurityPolicy objects. /// - public partial class PodSecurityPolicyList : Pulumi.CustomResource + public partial class PodSecurityPolicyList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PodSecurityPolicyList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodSecurityPolicyList(string name, Types.Inputs.Policy.V1Beta1.PodSecurityPolicyListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:policy/v1beta1:PodSecurityPolicyList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:policy/v1beta1:PodSecurityPolicyList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodSecurityPolicyList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:policy/v1beta1:PodSecurityPolicyList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Policy.V1Beta1.Pod return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodSecurityPolicyList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodSecurityPolicyList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodSecurityPolicyList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodSecurityPolicyList(name, default(Types.Inputs.Policy.V1Beta1.PodSecurityPolicyListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Pulumi.Kubernetes.csproj b/sdk/dotnet/Pulumi.Kubernetes.csproj index 43ab885547..bbcff731ec 100644 --- a/sdk/dotnet/Pulumi.Kubernetes.csproj +++ b/sdk/dotnet/Pulumi.Kubernetes.csproj @@ -25,8 +25,9 @@ - + + diff --git a/sdk/dotnet/Rbac/V1/ClusterRole.cs b/sdk/dotnet/Rbac/V1/ClusterRole.cs index c944661785..d549ca38ae 100755 --- a/sdk/dotnet/Rbac/V1/ClusterRole.cs +++ b/sdk/dotnet/Rbac/V1/ClusterRole.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a /// unit by a RoleBinding or ClusterRoleBinding. /// - public partial class ClusterRole : Pulumi.CustomResource + public partial class ClusterRole : KubernetesResource { /// /// AggregationRule is an optional field that describes how to build the Rules for this @@ -59,7 +59,12 @@ public partial class ClusterRole : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRole(string name, Types.Inputs.Rbac.V1.ClusterRoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRole", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRole", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRole(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRole", name, dictionary, options) { } @@ -71,15 +76,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.ClusterRol return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRole resource's state with the given name and ID. /// @@ -88,10 +84,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRole Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRole(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRole(name, default(Types.Inputs.Rbac.V1.ClusterRoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/ClusterRoleBinding.cs b/sdk/dotnet/Rbac/V1/ClusterRoleBinding.cs index c85b3383f4..49f01bbacb 100755 --- a/sdk/dotnet/Rbac/V1/ClusterRoleBinding.cs +++ b/sdk/dotnet/Rbac/V1/ClusterRoleBinding.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a /// ClusterRole in the global namespace, and adds who information via Subject. /// - public partial class ClusterRoleBinding : Pulumi.CustomResource + public partial class ClusterRoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -58,7 +58,12 @@ public partial class ClusterRoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBinding(string name, Types.Inputs.Rbac.V1.ClusterRoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBinding", name, dictionary, options) { } @@ -70,15 +75,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.ClusterRol return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBinding resource's state with the given name and ID. /// @@ -87,10 +83,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBinding(name, default(Types.Inputs.Rbac.V1.ClusterRoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/ClusterRoleBindingList.cs b/sdk/dotnet/Rbac/V1/ClusterRoleBindingList.cs index 977e5d5a6b..035376745d 100755 --- a/sdk/dotnet/Rbac/V1/ClusterRoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1/ClusterRoleBindingList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// /// ClusterRoleBindingList is a collection of ClusterRoleBindings /// - public partial class ClusterRoleBindingList : Pulumi.CustomResource + public partial class ClusterRoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class ClusterRoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBindingList(string name, Types.Inputs.Rbac.V1.ClusterRoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleBindingList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.ClusterRol return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBindingList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBindingList(name, default(Types.Inputs.Rbac.V1.ClusterRoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/ClusterRoleList.cs b/sdk/dotnet/Rbac/V1/ClusterRoleList.cs index 641d036d59..6956566254 100755 --- a/sdk/dotnet/Rbac/V1/ClusterRoleList.cs +++ b/sdk/dotnet/Rbac/V1/ClusterRoleList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// /// ClusterRoleList is a collection of ClusterRoles /// - public partial class ClusterRoleList : Pulumi.CustomResource + public partial class ClusterRoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class ClusterRoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleList(string name, Types.Inputs.Rbac.V1.ClusterRoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:ClusterRoleList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.ClusterRol return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleList(name, default(Types.Inputs.Rbac.V1.ClusterRoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/Role.cs b/sdk/dotnet/Rbac/V1/Role.cs index c94fa51f77..88be6199f3 100755 --- a/sdk/dotnet/Rbac/V1/Role.cs +++ b/sdk/dotnet/Rbac/V1/Role.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a /// RoleBinding. /// - public partial class Role : Pulumi.CustomResource + public partial class Role : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class Role : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Role(string name, Types.Inputs.Rbac.V1.RoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:Role", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:Role", name, SetAPIKindAndVersion(args), options) + { + } + + internal Role(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:Role", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.RoleArgs? return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Role resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Role Get(string name, Input id, CustomResourceOptions? options = null) { - return new Role(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Role(name, default(Types.Inputs.Rbac.V1.RoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/RoleBinding.cs b/sdk/dotnet/Rbac/V1/RoleBinding.cs index 29403c31df..16bfc9b2ac 100755 --- a/sdk/dotnet/Rbac/V1/RoleBinding.cs +++ b/sdk/dotnet/Rbac/V1/RoleBinding.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// namespace information by which namespace it exists in. RoleBindings in a given namespace /// only have effect in that namespace. /// - public partial class RoleBinding : Pulumi.CustomResource + public partial class RoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class RoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBinding(string name, Types.Inputs.Rbac.V1.RoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBinding", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.RoleBindin return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBinding resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBinding(name, default(Types.Inputs.Rbac.V1.RoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/RoleBindingList.cs b/sdk/dotnet/Rbac/V1/RoleBindingList.cs index 2dc228e5ba..c917585b5a 100755 --- a/sdk/dotnet/Rbac/V1/RoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1/RoleBindingList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// /// RoleBindingList is a collection of RoleBindings /// - public partial class RoleBindingList : Pulumi.CustomResource + public partial class RoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class RoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBindingList(string name, Types.Inputs.Rbac.V1.RoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleBindingList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.RoleBindin return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBindingList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBindingList(name, default(Types.Inputs.Rbac.V1.RoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1/RoleList.cs b/sdk/dotnet/Rbac/V1/RoleList.cs index af5cd6add8..17141db805 100755 --- a/sdk/dotnet/Rbac/V1/RoleList.cs +++ b/sdk/dotnet/Rbac/V1/RoleList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Rbac.V1 /// /// RoleList is a collection of Roles /// - public partial class RoleList : Pulumi.CustomResource + public partial class RoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -50,7 +50,12 @@ public partial class RoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleList(string name, Types.Inputs.Rbac.V1.RoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1:RoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1:RoleList", name, dictionary, options) { } @@ -62,15 +67,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1.RoleListAr return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleList resource's state with the given name and ID. /// @@ -79,10 +75,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleList(name, default(Types.Inputs.Rbac.V1.RoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/ClusterRole.cs b/sdk/dotnet/Rbac/V1Alpha1/ClusterRole.cs index 8a43137f33..3da2b6843f 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/ClusterRole.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/ClusterRole.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. /// - public partial class ClusterRole : Pulumi.CustomResource + public partial class ClusterRole : KubernetesResource { /// /// AggregationRule is an optional field that describes how to build the Rules for this @@ -60,7 +60,12 @@ public partial class ClusterRole : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRole(string name, Types.Inputs.Rbac.V1Alpha1.ClusterRoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRole", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRole", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRole(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRole", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Clus return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRole resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRole Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRole(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRole(name, default(Types.Inputs.Rbac.V1Alpha1.ClusterRoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBinding.cs b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBinding.cs index 59dcb51200..d8df14cdb1 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBinding.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBinding.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be /// served in v1.20. /// - public partial class ClusterRoleBinding : Pulumi.CustomResource + public partial class ClusterRoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class ClusterRoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBinding(string name, Types.Inputs.Rbac.V1Alpha1.ClusterRoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBinding", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Clus return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBinding resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBinding(name, default(Types.Inputs.Rbac.V1Alpha1.ClusterRoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBindingList.cs b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBindingList.cs index 0791956fb9..0d192104bb 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleBindingList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor /// of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.20. /// - public partial class ClusterRoleBindingList : Pulumi.CustomResource + public partial class ClusterRoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ClusterRoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBindingList(string name, Types.Inputs.Rbac.V1Alpha1.ClusterRoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleBindingList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Clus return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBindingList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBindingList(name, default(Types.Inputs.Rbac.V1Alpha1.ClusterRoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleList.cs b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleList.cs index 460c56de52..2600ae9358 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleList.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/ClusterRoleList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. /// - public partial class ClusterRoleList : Pulumi.CustomResource + public partial class ClusterRoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ClusterRoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleList(string name, Types.Inputs.Rbac.V1Alpha1.ClusterRoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:ClusterRoleList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Clus return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleList(name, default(Types.Inputs.Rbac.V1Alpha1.ClusterRoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/Role.cs b/sdk/dotnet/Rbac/V1Alpha1/Role.cs index 943fccf763..b159f58d66 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/Role.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/Role.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no /// longer be served in v1.20. /// - public partial class Role : Pulumi.CustomResource + public partial class Role : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class Role : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Role(string name, Types.Inputs.Rbac.V1Alpha1.RoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:Role", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:Role", name, SetAPIKindAndVersion(args), options) + { + } + + internal Role(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:Role", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Role return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Role resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Role Get(string name, Input id, CustomResourceOptions? options = null) { - return new Role(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Role(name, default(Types.Inputs.Rbac.V1Alpha1.RoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/RoleBinding.cs b/sdk/dotnet/Rbac/V1Alpha1/RoleBinding.cs index 26caf5527d..e9a910cacd 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/RoleBinding.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/RoleBinding.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// only have effect in that namespace. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. /// - public partial class RoleBinding : Pulumi.CustomResource + public partial class RoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class RoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBinding(string name, Types.Inputs.Rbac.V1Alpha1.RoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBinding", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Role return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBinding resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBinding(name, default(Types.Inputs.Rbac.V1Alpha1.RoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/RoleBindingList.cs b/sdk/dotnet/Rbac/V1Alpha1/RoleBindingList.cs index f5eaf260f9..6b31402e75 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/RoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/RoleBindingList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. /// - public partial class RoleBindingList : Pulumi.CustomResource + public partial class RoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBindingList(string name, Types.Inputs.Rbac.V1Alpha1.RoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleBindingList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Role return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBindingList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBindingList(name, default(Types.Inputs.Rbac.V1Alpha1.RoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Alpha1/RoleList.cs b/sdk/dotnet/Rbac/V1Alpha1/RoleList.cs index 980703be12..fdba13401d 100755 --- a/sdk/dotnet/Rbac/V1Alpha1/RoleList.cs +++ b/sdk/dotnet/Rbac/V1Alpha1/RoleList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Alpha1 /// RoleList is a collection of Roles. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. /// - public partial class RoleList : Pulumi.CustomResource + public partial class RoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleList(string name, Types.Inputs.Rbac.V1Alpha1.RoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1alpha1:RoleList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Alpha1.Role return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleList(name, default(Types.Inputs.Rbac.V1Alpha1.RoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/ClusterRole.cs b/sdk/dotnet/Rbac/V1Beta1/ClusterRole.cs index 9e7e42cf7f..3236786ab9 100755 --- a/sdk/dotnet/Rbac/V1Beta1/ClusterRole.cs +++ b/sdk/dotnet/Rbac/V1Beta1/ClusterRole.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.20. /// - public partial class ClusterRole : Pulumi.CustomResource + public partial class ClusterRole : KubernetesResource { /// /// AggregationRule is an optional field that describes how to build the Rules for this @@ -60,7 +60,12 @@ public partial class ClusterRole : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRole(string name, Types.Inputs.Rbac.V1Beta1.ClusterRoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRole", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRole", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRole(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRole", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.Clust return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRole resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRole Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRole(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRole(name, default(Types.Inputs.Rbac.V1Beta1.ClusterRoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBinding.cs b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBinding.cs index 41430d7c15..8b0229b6f2 100755 --- a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBinding.cs +++ b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBinding.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be /// served in v1.20. /// - public partial class ClusterRoleBinding : Pulumi.CustomResource + public partial class ClusterRoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -60,7 +60,12 @@ public partial class ClusterRoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBinding(string name, Types.Inputs.Rbac.V1Beta1.ClusterRoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBinding", name, dictionary, options) { } @@ -72,15 +77,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.Clust return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBinding resource's state with the given name and ID. /// @@ -89,10 +85,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBinding(name, default(Types.Inputs.Rbac.V1Beta1.ClusterRoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBindingList.cs b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBindingList.cs index 8722fa9c6e..f93a6588ca 100755 --- a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleBindingList.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// of rbac.authorization.k8s.io/v1 ClusterRoleBindingList, and will no longer be served in /// v1.20. /// - public partial class ClusterRoleBindingList : Pulumi.CustomResource + public partial class ClusterRoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class ClusterRoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleBindingList(string name, Types.Inputs.Rbac.V1Beta1.ClusterRoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleBindingList", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.Clust return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleBindingList resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleBindingList(name, default(Types.Inputs.Rbac.V1Beta1.ClusterRoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleList.cs b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleList.cs index cab7637d0c..89ae27c273 100755 --- a/sdk/dotnet/Rbac/V1Beta1/ClusterRoleList.cs +++ b/sdk/dotnet/Rbac/V1Beta1/ClusterRoleList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.20. /// - public partial class ClusterRoleList : Pulumi.CustomResource + public partial class ClusterRoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class ClusterRoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public ClusterRoleList(string name, Types.Inputs.Rbac.V1Beta1.ClusterRoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal ClusterRoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:ClusterRoleList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.Clust return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing ClusterRoleList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static ClusterRoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new ClusterRoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new ClusterRoleList(name, default(Types.Inputs.Rbac.V1Beta1.ClusterRoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/Role.cs b/sdk/dotnet/Rbac/V1Beta1/Role.cs index fcf172f6d6..51283b8722 100755 --- a/sdk/dotnet/Rbac/V1Beta1/Role.cs +++ b/sdk/dotnet/Rbac/V1Beta1/Role.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no /// longer be served in v1.20. /// - public partial class Role : Pulumi.CustomResource + public partial class Role : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -52,7 +52,12 @@ public partial class Role : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Role(string name, Types.Inputs.Rbac.V1Beta1.RoleArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:Role", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:Role", name, SetAPIKindAndVersion(args), options) + { + } + + internal Role(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:Role", name, dictionary, options) { } @@ -64,15 +69,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.RoleA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing Role resource's state with the given name and ID. /// @@ -81,10 +77,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static Role Get(string name, Input id, CustomResourceOptions? options = null) { - return new Role(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new Role(name, default(Types.Inputs.Rbac.V1Beta1.RoleArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/RoleBinding.cs b/sdk/dotnet/Rbac/V1Beta1/RoleBinding.cs index 5c1c011b3f..45a9d9cf0d 100755 --- a/sdk/dotnet/Rbac/V1Beta1/RoleBinding.cs +++ b/sdk/dotnet/Rbac/V1Beta1/RoleBinding.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// only have effect in that namespace. Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.20. /// - public partial class RoleBinding : Pulumi.CustomResource + public partial class RoleBinding : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class RoleBinding : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBinding(string name, Types.Inputs.Rbac.V1Beta1.RoleBindingArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBinding", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBinding", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBinding(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBinding", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.RoleB return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBinding resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBinding Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBinding(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBinding(name, default(Types.Inputs.Rbac.V1Beta1.RoleBindingArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/RoleBindingList.cs b/sdk/dotnet/Rbac/V1Beta1/RoleBindingList.cs index 0235804353..cfb0560470 100755 --- a/sdk/dotnet/Rbac/V1Beta1/RoleBindingList.cs +++ b/sdk/dotnet/Rbac/V1Beta1/RoleBindingList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.20. /// - public partial class RoleBindingList : Pulumi.CustomResource + public partial class RoleBindingList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RoleBindingList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleBindingList(string name, Types.Inputs.Rbac.V1Beta1.RoleBindingListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBindingList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBindingList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleBindingList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleBindingList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.RoleB return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleBindingList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleBindingList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleBindingList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleBindingList(name, default(Types.Inputs.Rbac.V1Beta1.RoleBindingListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Rbac/V1Beta1/RoleList.cs b/sdk/dotnet/Rbac/V1Beta1/RoleList.cs index 7349745861..fdc0ab2091 100755 --- a/sdk/dotnet/Rbac/V1Beta1/RoleList.cs +++ b/sdk/dotnet/Rbac/V1Beta1/RoleList.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Rbac.V1Beta1 /// RoleList is a collection of Roles Deprecated in v1.17 in favor of /// rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.20. /// - public partial class RoleList : Pulumi.CustomResource + public partial class RoleList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class RoleList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public RoleList(string name, Types.Inputs.Rbac.V1Beta1.RoleListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleList", name, SetAPIKindAndVersion(args), options) + { + } + + internal RoleList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:rbac.authorization.k8s.io/v1beta1:RoleList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Rbac.V1Beta1.RoleL return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing RoleList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static RoleList Get(string name, Input id, CustomResourceOptions? options = null) { - return new RoleList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new RoleList(name, default(Types.Inputs.Rbac.V1Beta1.RoleListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1/PriorityClass.cs b/sdk/dotnet/Scheduling/V1/PriorityClass.cs index 7a459bd355..38a8df5308 100755 --- a/sdk/dotnet/Scheduling/V1/PriorityClass.cs +++ b/sdk/dotnet/Scheduling/V1/PriorityClass.cs @@ -11,7 +11,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1 /// PriorityClass defines mapping from a priority class name to the priority integer value. The /// value can be any valid integer. /// - public partial class PriorityClass : Pulumi.CustomResource + public partial class PriorityClass : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -79,7 +79,12 @@ public partial class PriorityClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClass(string name, Types.Inputs.Scheduling.V1.PriorityClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1:PriorityClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1:PriorityClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1:PriorityClass", name, dictionary, options) { } @@ -91,15 +96,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1.Prio return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClass resource's state with the given name and ID. /// @@ -108,10 +104,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClass(name, default(Types.Inputs.Scheduling.V1.PriorityClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1/PriorityClassList.cs b/sdk/dotnet/Scheduling/V1/PriorityClassList.cs index ca39e8547f..12a8f139f8 100755 --- a/sdk/dotnet/Scheduling/V1/PriorityClassList.cs +++ b/sdk/dotnet/Scheduling/V1/PriorityClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1 /// /// PriorityClassList is a collection of priority classes. /// - public partial class PriorityClassList : Pulumi.CustomResource + public partial class PriorityClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PriorityClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClassList(string name, Types.Inputs.Scheduling.V1.PriorityClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1:PriorityClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1:PriorityClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1:PriorityClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1.Prio return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClassList(name, default(Types.Inputs.Scheduling.V1.PriorityClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1Alpha1/PriorityClass.cs b/sdk/dotnet/Scheduling/V1Alpha1/PriorityClass.cs index c0e9d2edc3..e89fec18ed 100755 --- a/sdk/dotnet/Scheduling/V1Alpha1/PriorityClass.cs +++ b/sdk/dotnet/Scheduling/V1Alpha1/PriorityClass.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1Alpha1 /// scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name /// to the priority integer value. The value can be any valid integer. /// - public partial class PriorityClass : Pulumi.CustomResource + public partial class PriorityClass : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -80,7 +80,12 @@ public partial class PriorityClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClass(string name, Types.Inputs.Scheduling.V1Alpha1.PriorityClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClass", name, dictionary, options) { } @@ -92,15 +97,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1Alpha return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClass resource's state with the given name and ID. /// @@ -109,10 +105,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClass(name, default(Types.Inputs.Scheduling.V1Alpha1.PriorityClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1Alpha1/PriorityClassList.cs b/sdk/dotnet/Scheduling/V1Alpha1/PriorityClassList.cs index 8f68f90158..3ee5004835 100755 --- a/sdk/dotnet/Scheduling/V1Alpha1/PriorityClassList.cs +++ b/sdk/dotnet/Scheduling/V1Alpha1/PriorityClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1Alpha1 /// /// PriorityClassList is a collection of priority classes. /// - public partial class PriorityClassList : Pulumi.CustomResource + public partial class PriorityClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PriorityClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClassList(string name, Types.Inputs.Scheduling.V1Alpha1.PriorityClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1alpha1:PriorityClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1Alpha return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClassList(name, default(Types.Inputs.Scheduling.V1Alpha1.PriorityClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1Beta1/PriorityClass.cs b/sdk/dotnet/Scheduling/V1Beta1/PriorityClass.cs index cbc7493c7c..4e7c0a5f58 100755 --- a/sdk/dotnet/Scheduling/V1Beta1/PriorityClass.cs +++ b/sdk/dotnet/Scheduling/V1Beta1/PriorityClass.cs @@ -12,7 +12,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1Beta1 /// scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name /// to the priority integer value. The value can be any valid integer. /// - public partial class PriorityClass : Pulumi.CustomResource + public partial class PriorityClass : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -80,7 +80,12 @@ public partial class PriorityClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClass(string name, Types.Inputs.Scheduling.V1Beta1.PriorityClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClass", name, dictionary, options) { } @@ -92,15 +97,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClass resource's state with the given name and ID. /// @@ -109,10 +105,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClass(name, default(Types.Inputs.Scheduling.V1Beta1.PriorityClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Scheduling/V1Beta1/PriorityClassList.cs b/sdk/dotnet/Scheduling/V1Beta1/PriorityClassList.cs index e90e6680a7..1de40ab520 100755 --- a/sdk/dotnet/Scheduling/V1Beta1/PriorityClassList.cs +++ b/sdk/dotnet/Scheduling/V1Beta1/PriorityClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Scheduling.V1Beta1 /// /// PriorityClassList is a collection of priority classes. /// - public partial class PriorityClassList : Pulumi.CustomResource + public partial class PriorityClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PriorityClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PriorityClassList(string name, Types.Inputs.Scheduling.V1Beta1.PriorityClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PriorityClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:scheduling.k8s.io/v1beta1:PriorityClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Scheduling.V1Beta1 return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PriorityClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PriorityClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PriorityClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PriorityClassList(name, default(Types.Inputs.Scheduling.V1Beta1.PriorityClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Settings/V1Alpha1/PodPreset.cs b/sdk/dotnet/Settings/V1Alpha1/PodPreset.cs index 1c79b604bb..47cf937be2 100755 --- a/sdk/dotnet/Settings/V1Alpha1/PodPreset.cs +++ b/sdk/dotnet/Settings/V1Alpha1/PodPreset.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Settings.V1Alpha1 /// /// PodPreset is a policy resource that defines additional runtime requirements for a Pod. /// - public partial class PodPreset : Pulumi.CustomResource + public partial class PodPreset : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -46,7 +46,12 @@ public partial class PodPreset : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodPreset(string name, Types.Inputs.Settings.V1Alpha1.PodPresetArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:settings.k8s.io/v1alpha1:PodPreset", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:settings.k8s.io/v1alpha1:PodPreset", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodPreset(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:settings.k8s.io/v1alpha1:PodPreset", name, dictionary, options) { } @@ -58,15 +63,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Settings.V1Alpha1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodPreset resource's state with the given name and ID. /// @@ -75,10 +71,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodPreset Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodPreset(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodPreset(name, default(Types.Inputs.Settings.V1Alpha1.PodPresetArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Settings/V1Alpha1/PodPresetList.cs b/sdk/dotnet/Settings/V1Alpha1/PodPresetList.cs index e66b633284..0a46da398e 100755 --- a/sdk/dotnet/Settings/V1Alpha1/PodPresetList.cs +++ b/sdk/dotnet/Settings/V1Alpha1/PodPresetList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Settings.V1Alpha1 /// /// PodPresetList is a list of PodPreset objects. /// - public partial class PodPresetList : Pulumi.CustomResource + public partial class PodPresetList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class PodPresetList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public PodPresetList(string name, Types.Inputs.Settings.V1Alpha1.PodPresetListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:settings.k8s.io/v1alpha1:PodPresetList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:settings.k8s.io/v1alpha1:PodPresetList", name, SetAPIKindAndVersion(args), options) + { + } + + internal PodPresetList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:settings.k8s.io/v1alpha1:PodPresetList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Settings.V1Alpha1. return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing PodPresetList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static PodPresetList Get(string name, Input id, CustomResourceOptions? options = null) { - return new PodPresetList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new PodPresetList(name, default(Types.Inputs.Settings.V1Alpha1.PodPresetListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/CSINode.cs b/sdk/dotnet/Storage/V1/CSINode.cs index 388572feab..6273c412b9 100755 --- a/sdk/dotnet/Storage/V1/CSINode.cs +++ b/sdk/dotnet/Storage/V1/CSINode.cs @@ -16,7 +16,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// version is low enough that it doesn't create this object. CSINode has an OwnerReference that /// points to the corresponding node object. /// - public partial class CSINode : Pulumi.CustomResource + public partial class CSINode : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -56,7 +56,12 @@ public partial class CSINode : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSINode(string name, Types.Inputs.Storage.V1.CSINodeArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:CSINode", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:CSINode", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSINode(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:CSINode", name, dictionary, options) { } @@ -68,15 +73,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.CSINode return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSINode resource's state with the given name and ID. /// @@ -85,10 +81,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSINode Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSINode(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSINode(name, default(Types.Inputs.Storage.V1.CSINodeArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/CSINodeList.cs b/sdk/dotnet/Storage/V1/CSINodeList.cs index bbaff0718b..2f3ec566e5 100755 --- a/sdk/dotnet/Storage/V1/CSINodeList.cs +++ b/sdk/dotnet/Storage/V1/CSINodeList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// /// CSINodeList is a collection of CSINode objects. /// - public partial class CSINodeList : Pulumi.CustomResource + public partial class CSINodeList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class CSINodeList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSINodeList(string name, Types.Inputs.Storage.V1.CSINodeListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:CSINodeList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:CSINodeList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSINodeList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:CSINodeList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.CSINode return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSINodeList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSINodeList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSINodeList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSINodeList(name, default(Types.Inputs.Storage.V1.CSINodeListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/StorageClass.cs b/sdk/dotnet/Storage/V1/StorageClass.cs index c9884349d4..ac3582fba1 100755 --- a/sdk/dotnet/Storage/V1/StorageClass.cs +++ b/sdk/dotnet/Storage/V1/StorageClass.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// StorageClasses are non-namespaced; the name of the storage class according to etcd is in /// ObjectMeta.Name. /// - public partial class StorageClass : Pulumi.CustomResource + public partial class StorageClass : KubernetesResource { /// /// AllowVolumeExpansion shows whether the storage class allow volume expand @@ -100,7 +100,12 @@ public partial class StorageClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StorageClass(string name, Types.Inputs.Storage.V1.StorageClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:StorageClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:StorageClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal StorageClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:StorageClass", name, dictionary, options) { } @@ -112,15 +117,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.Storage return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StorageClass resource's state with the given name and ID. /// @@ -129,10 +125,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StorageClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new StorageClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StorageClass(name, default(Types.Inputs.Storage.V1.StorageClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/StorageClassList.cs b/sdk/dotnet/Storage/V1/StorageClassList.cs index 7ae0eef093..4f74dcc7ea 100755 --- a/sdk/dotnet/Storage/V1/StorageClassList.cs +++ b/sdk/dotnet/Storage/V1/StorageClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// /// StorageClassList is a collection of storage classes. /// - public partial class StorageClassList : Pulumi.CustomResource + public partial class StorageClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class StorageClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StorageClassList(string name, Types.Inputs.Storage.V1.StorageClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:StorageClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:StorageClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal StorageClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:StorageClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.Storage return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StorageClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StorageClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new StorageClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StorageClassList(name, default(Types.Inputs.Storage.V1.StorageClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/VolumeAttachment.cs b/sdk/dotnet/Storage/V1/VolumeAttachment.cs index a0c5fe7269..4ae24ac4c8 100755 --- a/sdk/dotnet/Storage/V1/VolumeAttachment.cs +++ b/sdk/dotnet/Storage/V1/VolumeAttachment.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// /// VolumeAttachment objects are non-namespaced. /// - public partial class VolumeAttachment : Pulumi.CustomResource + public partial class VolumeAttachment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -62,7 +62,12 @@ public partial class VolumeAttachment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachment(string name, Types.Inputs.Storage.V1.VolumeAttachmentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:VolumeAttachment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:VolumeAttachment", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:VolumeAttachment", name, dictionary, options) { } @@ -74,15 +79,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.VolumeA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachment resource's state with the given name and ID. /// @@ -91,10 +87,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachment Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachment(name, default(Types.Inputs.Storage.V1.VolumeAttachmentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1/VolumeAttachmentList.cs b/sdk/dotnet/Storage/V1/VolumeAttachmentList.cs index 75739c964c..1f51e3cb78 100755 --- a/sdk/dotnet/Storage/V1/VolumeAttachmentList.cs +++ b/sdk/dotnet/Storage/V1/VolumeAttachmentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1 /// /// VolumeAttachmentList is a collection of VolumeAttachment objects. /// - public partial class VolumeAttachmentList : Pulumi.CustomResource + public partial class VolumeAttachmentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class VolumeAttachmentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachmentList(string name, Types.Inputs.Storage.V1.VolumeAttachmentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachmentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1:VolumeAttachmentList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1.VolumeA return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachmentList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachmentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachmentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachmentList(name, default(Types.Inputs.Storage.V1.VolumeAttachmentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Alpha1/VolumeAttachment.cs b/sdk/dotnet/Storage/V1Alpha1/VolumeAttachment.cs index 7f2123cfb3..1e123f61be 100755 --- a/sdk/dotnet/Storage/V1Alpha1/VolumeAttachment.cs +++ b/sdk/dotnet/Storage/V1Alpha1/VolumeAttachment.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Storage.V1Alpha1 /// /// VolumeAttachment objects are non-namespaced. /// - public partial class VolumeAttachment : Pulumi.CustomResource + public partial class VolumeAttachment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -62,7 +62,12 @@ public partial class VolumeAttachment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachment(string name, Types.Inputs.Storage.V1Alpha1.VolumeAttachmentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachment", name, dictionary, options) { } @@ -74,15 +79,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Alpha1.V return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachment resource's state with the given name and ID. /// @@ -91,10 +87,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachment Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachment(name, default(Types.Inputs.Storage.V1Alpha1.VolumeAttachmentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Alpha1/VolumeAttachmentList.cs b/sdk/dotnet/Storage/V1Alpha1/VolumeAttachmentList.cs index fff41fcad1..3edc3f8c96 100755 --- a/sdk/dotnet/Storage/V1Alpha1/VolumeAttachmentList.cs +++ b/sdk/dotnet/Storage/V1Alpha1/VolumeAttachmentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1Alpha1 /// /// VolumeAttachmentList is a collection of VolumeAttachment objects. /// - public partial class VolumeAttachmentList : Pulumi.CustomResource + public partial class VolumeAttachmentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class VolumeAttachmentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachmentList(string name, Types.Inputs.Storage.V1Alpha1.VolumeAttachmentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachmentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Alpha1.V return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachmentList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachmentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachmentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachmentList(name, default(Types.Inputs.Storage.V1Alpha1.VolumeAttachmentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/CSIDriver.cs b/sdk/dotnet/Storage/V1Beta1/CSIDriver.cs index ef0a1314fd..39667a888e 100755 --- a/sdk/dotnet/Storage/V1Beta1/CSIDriver.cs +++ b/sdk/dotnet/Storage/V1Beta1/CSIDriver.cs @@ -16,7 +16,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// uses this object to determine whether pod information needs to be passed on mount. CSIDriver /// objects are non-namespaced. /// - public partial class CSIDriver : Pulumi.CustomResource + public partial class CSIDriver : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -61,7 +61,12 @@ public partial class CSIDriver : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSIDriver(string name, Types.Inputs.Storage.V1Beta1.CSIDriverArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:CSIDriver", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:CSIDriver", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSIDriver(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIDriver", name, dictionary, options) { } @@ -73,15 +78,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.CS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSIDriver resource's state with the given name and ID. /// @@ -90,10 +86,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSIDriver Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSIDriver(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSIDriver(name, default(Types.Inputs.Storage.V1Beta1.CSIDriverArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/CSIDriverList.cs b/sdk/dotnet/Storage/V1Beta1/CSIDriverList.cs index f191e68f8b..680b0c5d28 100755 --- a/sdk/dotnet/Storage/V1Beta1/CSIDriverList.cs +++ b/sdk/dotnet/Storage/V1Beta1/CSIDriverList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// /// CSIDriverList is a collection of CSIDriver objects. /// - public partial class CSIDriverList : Pulumi.CustomResource + public partial class CSIDriverList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class CSIDriverList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSIDriverList(string name, Types.Inputs.Storage.V1Beta1.CSIDriverListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:CSIDriverList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:CSIDriverList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSIDriverList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSIDriverList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.CS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSIDriverList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSIDriverList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSIDriverList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSIDriverList(name, default(Types.Inputs.Storage.V1Beta1.CSIDriverListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/CSINode.cs b/sdk/dotnet/Storage/V1Beta1/CSINode.cs index b85afd4d98..3fbce420a9 100755 --- a/sdk/dotnet/Storage/V1Beta1/CSINode.cs +++ b/sdk/dotnet/Storage/V1Beta1/CSINode.cs @@ -18,7 +18,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// version is low enough that it doesn't create this object. CSINode has an OwnerReference that /// points to the corresponding node object. /// - public partial class CSINode : Pulumi.CustomResource + public partial class CSINode : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -58,7 +58,12 @@ public partial class CSINode : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSINode(string name, Types.Inputs.Storage.V1Beta1.CSINodeArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:CSINode", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:CSINode", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSINode(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSINode", name, dictionary, options) { } @@ -70,15 +75,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.CS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSINode resource's state with the given name and ID. /// @@ -87,10 +83,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSINode Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSINode(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSINode(name, default(Types.Inputs.Storage.V1Beta1.CSINodeArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/CSINodeList.cs b/sdk/dotnet/Storage/V1Beta1/CSINodeList.cs index 670c430d7a..0954ba8813 100755 --- a/sdk/dotnet/Storage/V1Beta1/CSINodeList.cs +++ b/sdk/dotnet/Storage/V1Beta1/CSINodeList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// /// CSINodeList is a collection of CSINode objects. /// - public partial class CSINodeList : Pulumi.CustomResource + public partial class CSINodeList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class CSINodeList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public CSINodeList(string name, Types.Inputs.Storage.V1Beta1.CSINodeListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:CSINodeList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:CSINodeList", name, SetAPIKindAndVersion(args), options) + { + } + + internal CSINodeList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:CSINodeList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.CS return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing CSINodeList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static CSINodeList Get(string name, Input id, CustomResourceOptions? options = null) { - return new CSINodeList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new CSINodeList(name, default(Types.Inputs.Storage.V1Beta1.CSINodeListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/StorageClass.cs b/sdk/dotnet/Storage/V1Beta1/StorageClass.cs index c0b26af6df..c690651a4d 100755 --- a/sdk/dotnet/Storage/V1Beta1/StorageClass.cs +++ b/sdk/dotnet/Storage/V1Beta1/StorageClass.cs @@ -14,7 +14,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// StorageClasses are non-namespaced; the name of the storage class according to etcd is in /// ObjectMeta.Name. /// - public partial class StorageClass : Pulumi.CustomResource + public partial class StorageClass : KubernetesResource { /// /// AllowVolumeExpansion shows whether the storage class allow volume expand @@ -100,7 +100,12 @@ public partial class StorageClass : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StorageClass(string name, Types.Inputs.Storage.V1Beta1.StorageClassArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:StorageClass", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:StorageClass", name, SetAPIKindAndVersion(args), options) + { + } + + internal StorageClass(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:StorageClass", name, dictionary, options) { } @@ -112,15 +117,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.St return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StorageClass resource's state with the given name and ID. /// @@ -129,10 +125,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StorageClass Get(string name, Input id, CustomResourceOptions? options = null) { - return new StorageClass(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StorageClass(name, default(Types.Inputs.Storage.V1Beta1.StorageClassArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/StorageClassList.cs b/sdk/dotnet/Storage/V1Beta1/StorageClassList.cs index 864b1f7282..4b7e403e2a 100755 --- a/sdk/dotnet/Storage/V1Beta1/StorageClassList.cs +++ b/sdk/dotnet/Storage/V1Beta1/StorageClassList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// /// StorageClassList is a collection of storage classes. /// - public partial class StorageClassList : Pulumi.CustomResource + public partial class StorageClassList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class StorageClassList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public StorageClassList(string name, Types.Inputs.Storage.V1Beta1.StorageClassListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:StorageClassList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:StorageClassList", name, SetAPIKindAndVersion(args), options) + { + } + + internal StorageClassList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:StorageClassList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.St return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing StorageClassList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static StorageClassList Get(string name, Input id, CustomResourceOptions? options = null) { - return new StorageClassList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new StorageClassList(name, default(Types.Inputs.Storage.V1Beta1.StorageClassListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/VolumeAttachment.cs b/sdk/dotnet/Storage/V1Beta1/VolumeAttachment.cs index 5d83da3b46..132ffa8909 100755 --- a/sdk/dotnet/Storage/V1Beta1/VolumeAttachment.cs +++ b/sdk/dotnet/Storage/V1Beta1/VolumeAttachment.cs @@ -13,7 +13,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// /// VolumeAttachment objects are non-namespaced. /// - public partial class VolumeAttachment : Pulumi.CustomResource + public partial class VolumeAttachment : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -62,7 +62,12 @@ public partial class VolumeAttachment : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachment(string name, Types.Inputs.Storage.V1Beta1.VolumeAttachmentArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachment", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachment", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachment(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachment", name, dictionary, options) { } @@ -74,15 +79,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.Vo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachment resource's state with the given name and ID. /// @@ -91,10 +87,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachment Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachment(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachment(name, default(Types.Inputs.Storage.V1Beta1.VolumeAttachmentArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Storage/V1Beta1/VolumeAttachmentList.cs b/sdk/dotnet/Storage/V1Beta1/VolumeAttachmentList.cs index a6f9328cc9..858da8669f 100755 --- a/sdk/dotnet/Storage/V1Beta1/VolumeAttachmentList.cs +++ b/sdk/dotnet/Storage/V1Beta1/VolumeAttachmentList.cs @@ -10,7 +10,7 @@ namespace Pulumi.Kubernetes.Storage.V1Beta1 /// /// VolumeAttachmentList is a collection of VolumeAttachment objects. /// - public partial class VolumeAttachmentList : Pulumi.CustomResource + public partial class VolumeAttachmentList : KubernetesResource { /// /// APIVersion defines the versioned schema of this representation of an object. Servers @@ -51,7 +51,12 @@ public partial class VolumeAttachmentList : Pulumi.CustomResource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeAttachmentList(string name, Types.Inputs.Storage.V1Beta1.VolumeAttachmentListArgs? args = null, CustomResourceOptions? options = null) - : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), MakeResourceOptions(options)) + : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachmentList", name, SetAPIKindAndVersion(args), options) + { + } + + internal VolumeAttachmentList(string name, ImmutableDictionary dictionary, CustomResourceOptions? options = null) + : base("kubernetes:storage.k8s.io/v1beta1:VolumeAttachmentList", name, dictionary, options) { } @@ -63,15 +68,6 @@ private static ResourceArgs SetAPIKindAndVersion(Types.Inputs.Storage.V1Beta1.Vo return args; } - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - }; - return CustomResourceOptions.Merge(defaultOptions, options); - } - /// /// Get an existing VolumeAttachmentList resource's state with the given name and ID. /// @@ -80,10 +76,8 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? /// A bag of options that control this resource's behavior public static VolumeAttachmentList Get(string name, Input id, CustomResourceOptions? options = null) { - return new VolumeAttachmentList(name, null, CustomResourceOptions.Merge(options, new CustomResourceOptions - { - Id = id, - })); + return new VolumeAttachmentList(name, default(Types.Inputs.Storage.V1Beta1.VolumeAttachmentListArgs), + CustomResourceOptions.Merge(options, new CustomResourceOptions {Id = id})); } } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index f3a380639b..8f52df1720 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -1,26 +1,145 @@ -// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** +// Copyright 2016-2020, Pulumi Corporation +// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; +using System.Diagnostics; using System.IO; +using System.Linq; using System.Reflection; -using Pulumi; +using System.Text; namespace Pulumi.Kubernetes { - static class Utilities + internal static class Utilities { - private readonly static string version; - public static string Version => version; + public static string Version { get; } static Utilities() { var assembly = typeof(Utilities).GetTypeInfo().Assembly; - using (var stream = assembly.GetManifestResourceStream("Pulumi.Kubernetes.version.txt")) - using (var reader = new StreamReader(stream)) + using var stream = assembly.GetManifestResourceStream("Pulumi.Kubernetes.version.txt"); + if (stream == null) + throw new Exception("Manifest file 'version.txt' not found"); + using var reader = new StreamReader(stream); + Version = reader.ReadToEnd().Trim(); + } + + public static InvokeOptions WithVersion(this InvokeOptions? options) + { + if (options?.Version != null) + { + return options; + } + return new InvokeOptions + { + Parent = options?.Parent, + Provider = options?.Provider, + Version = Version, + }; + } + + public static string ExecuteCommand(string command, string[] flags) + { + using var process = new Process + { + StartInfo = + { + FileName = command, + Arguments = EscapeArguments(flags), + RedirectStandardOutput = true, + RedirectStandardError = true + } + }; + process.Start(); + string output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + if (process.ExitCode > 0) + { + string error = process.StandardError.ReadToEnd(); + throw new Exception(error); + } + return output; + } + + /// + /// Convert an argument array to an argument string for using with Process.StartInfo.Arguments. + /// + private static string EscapeArguments(params string[] args) + => string.Join(" ", args.Select(EscapeArguments)); + + /// + /// Convert an argument array to an argument string for using with Process.StartInfo.Arguments. + /// + private static string EscapeArguments(string argument) + { + var escapedArgument = new StringBuilder(); + var backslashCount = 0; + var needsQuotes = false; + + foreach (var character in argument) + { + switch (character) + { + case '\\': + // Backslashes are simply passed through, except when they need + // to be escaped when followed by a \", e.g. the argument string + // \", which would be encoded to \\\" + backslashCount++; + escapedArgument.Append('\\'); + break; + + case '\"': + // Escape any preceding backslashes + escapedArgument.Append(new string('\\', backslashCount)); + + // Append an escaped double quote. + escapedArgument.Append("\\\""); + + // Reset the backslash counter. + backslashCount = 0; + break; + + case ' ': + case '\t': + // White spaces are escaped by surrounding the entire string with + // double quotes, which should be done at the end to prevent + // multiple wrappings. + needsQuotes = true; + + // Append the whitespace + escapedArgument.Append(character); + + // Reset the backslash counter. + backslashCount = 0; + break; + + default: + // Reset the backslash counter. + backslashCount = 0; + + // Append the current character + escapedArgument.Append(character); + break; + } + } + + // No need to wrap in quotes + if (!needsQuotes) { - version = reader.ReadToEnd().Trim(); + return escapedArgument.ToString(); } + + // Prepend the " + escapedArgument.Insert(0, '"'); + + // Escape any preceding backslashes before appending the " + escapedArgument.Append(new string('\\', backslashCount)); + + // Append the final " + escapedArgument.Append('\"'); + + return escapedArgument.ToString(); } } } diff --git a/sdk/dotnet/Yaml/ConfigFile.cs b/sdk/dotnet/Yaml/ConfigFile.cs new file mode 100644 index 0000000000..cc17f13daa --- /dev/null +++ b/sdk/dotnet/Yaml/ConfigFile.cs @@ -0,0 +1,82 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System; +using System.IO; +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Yaml +{ + /// + /// Defines a set of Kubernetes resources from a Kubernetes YAML file. + /// + public sealed class ConfigFile : CollectionComponentResource + { + /// + /// Defines a set of Kubernetes resources from a Kubernetes YAML file. + /// + /// Component name. If `args` is not specified, also treated as the file name. + /// + /// Resource arguments, including the YAML file name. + /// Resource options. + public ConfigFile(string name, ConfigFileArgs? args = null, ComponentResourceOptions? options = null) + : base("kubernetes:yaml:ConfigFile", MakeName(args, name), options) + { + name = MakeName(args, name); + options ??= new ComponentResourceOptions(); + options.Parent ??= this; + + var fileOutput = args?.File.ToOutput() ?? Output.Create(name); + var resources = fileOutput.Apply(fileId => + { + try + { + if (Parser.IsUrl(fileId)) + { + using var wc = new System.Net.WebClient(); + return wc.DownloadString(fileId); + } + + return File.ReadAllText(fileId); + } + catch (Exception e) + { + throw new ResourceException($"Error fetching YAML file '{fileId}': {e.Message}", this); + } + }).Apply(text => + Parser.ParseYamlDocument(new ParseArgs + { + Objs = Invokes.YamlDecode(new YamlDecodeArgs {Text = text}), + Transformations = args?.Transformations, + ResourcePrefix = args?.ResourcePrefix + }, options)); + + RegisterResources(resources); + } + + private static string MakeName(ConfigFileArgs? args, string name) + => args?.ResourcePrefix != null ? $"{args.ResourcePrefix}-{name}" : name; + } + + /// + /// Resource arguments for . + /// + public class ConfigFileArgs : ResourceArgs + { + /// + /// Path or a URL that uniquely identifies a file. + /// + public Input? File { get; set; } + + /// + /// A set of transformations to apply to Kubernetes resource definitions before registering + /// with engine. + /// + public TransformationAction[]? Transformations { get; set; } + + /// + /// An optional prefix for the auto-generated resource names. + /// Example: A resource created with resourcePrefix="foo" would produce a resource named "foo-resourceName". + /// + public string? ResourcePrefix { get; set; } + } +} diff --git a/sdk/dotnet/Yaml/ConfigGroup.cs b/sdk/dotnet/Yaml/ConfigGroup.cs new file mode 100644 index 0000000000..751daff6a6 --- /dev/null +++ b/sdk/dotnet/Yaml/ConfigGroup.cs @@ -0,0 +1,72 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System.Collections.Immutable; +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Yaml +{ + /// + /// Creates a set of Kubernetes resources from Kubernetes YAML text. The YAML text + /// may be supplied using any of the following : + /// 1. Using a list of filenames: `Files = new[] { "foo.yaml", "bar.yaml" }` + /// 2. Using a list of file patterns: `Files = new[] { "foo/*.yaml", "bar/*.yaml" }` + /// 3. Using literal strings containing YAML: `Yaml = new[] { "(LITERAL YAML HERE)", "(MORE YAML)" }` + /// 4. Any combination of files, patterns, or YAML strings. + /// + public sealed class ConfigGroup : CollectionComponentResource + { + public ConfigGroup(string name, ConfigGroupArgs config, ComponentResourceOptions? options = null) + : base("kubernetes:yaml:ConfigGroup", name, options) + { + options ??= new ComponentResourceOptions(); + options.Parent ??= this; + RegisterResources(Parser.Parse(config, options)); + } + } + + /// + /// Resource arguments for . + /// + public class ConfigGroupArgs : ResourceArgs + { + /// + /// Set of paths or a URLs that uniquely identify files. + /// + public string[]? Files { get; set; } + + private InputList? _yaml; + + /// + /// YAML text containing Kubernetes resource definitions. + /// + public InputList Yaml + { + get => _yaml ??= new InputList(); + set => _yaml = value; + } + + private InputList>? _objs; + + /// + /// Objects representing Kubernetes resources. + /// + public InputList> Objs + { + get => _objs ??= new InputList>(); + set => _objs = value; + } + + /// + /// A set of transformations to apply to Kubernetes resource definitions before registering + /// with engine. + /// + public TransformationAction[]? Transformations { get; set; } + + /// + /// An optional prefix for the auto-generated resource names. + /// Example: A resource created with ResourcePrefix="foo" would produce a resource named + /// "foo-resourceName". + /// + public string? ResourcePrefix { get; set; } + } +} diff --git a/sdk/dotnet/Yaml/Invokes.cs b/sdk/dotnet/Yaml/Invokes.cs new file mode 100644 index 0000000000..8849173509 --- /dev/null +++ b/sdk/dotnet/Yaml/Invokes.cs @@ -0,0 +1,41 @@ +// Copyright 2016-2020, Pulumi Corporation + +using System.Collections.Immutable; +using System.Linq; +using Pulumi.Serialization; + +namespace Pulumi.Kubernetes.Yaml +{ + internal static class Invokes + { + /// + /// Invoke the resource provider to decode a YAML string. + /// + internal static Output>> YamlDecode(YamlDecodeArgs args, + InvokeOptions? options = null) + => Output.Create(Deployment.Instance.InvokeAsync("kubernetes:yaml:decode", args, + options.WithVersion())).Apply(r => r.Result.ToImmutableArray()); + } + + internal class YamlDecodeArgs : InvokeArgs + { + [Input("text")] + public string? Text { get; set; } + + [Input("defaultNamespace")] + public string? DefaultNamespace { get; set; } + } + + [OutputType] + internal class YamlDecodeResult + { + public readonly ImmutableArray> Result; + + [OutputConstructor] + private YamlDecodeResult( + ImmutableArray> result) + { + Result = result; + } + } +} diff --git a/sdk/dotnet/Yaml/Yaml.cs b/sdk/dotnet/Yaml/Yaml.cs new file mode 100755 index 0000000000..42116504ce --- /dev/null +++ b/sdk/dotnet/Yaml/Yaml.cs @@ -0,0 +1,1697 @@ +// Copyright 2016-2020, Pulumi Corporation +// *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.IO; +using System.Linq; +using System.Text.Json; +using GlobExpressions; + +using TransformationAction = System.Func, Pulumi.CustomResourceOptions, System.Collections.Immutable.ImmutableDictionary>; + +namespace Pulumi.Kubernetes.Yaml +{ + /// + /// Base component for containers of Kubernetes resources. + /// + public abstract class CollectionComponentResource : ComponentResource + { + internal Output> Resources { get; private set; } = null!; + + protected CollectionComponentResource(string type, string name, ResourceOptions? options = null) + : base(type, name, options) + { + } + + protected void RegisterResources(Output> resources) + { + Resources = resources; + RegisterOutputs(new Dictionary { { "resources", resources } }); + } + + /// + /// Returns a resource defined by the given name. + /// + /// Resource name. + /// Optional namespace, e.g. "kube-prometheus-exporter-kubernetes". + /// The type of the resource. + public Output GetResource(string name, string? namespaceName = null) + where T : KubernetesResource + { + var type = typeof(T); + var groupVersionKind = + type == typeof(AdmissionRegistration.V1.MutatingWebhookConfiguration) ? "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration" : + type == typeof(AdmissionRegistration.V1.MutatingWebhookConfigurationList) ? "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList" : + type == typeof(AdmissionRegistration.V1.ValidatingWebhookConfiguration) ? "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration" : + type == typeof(AdmissionRegistration.V1.ValidatingWebhookConfigurationList) ? "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList" : + type == typeof(AdmissionRegistration.V1Beta1.MutatingWebhookConfiguration) ? "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration" : + type == typeof(AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationList) ? "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList" : + type == typeof(AdmissionRegistration.V1Beta1.ValidatingWebhookConfiguration) ? "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration" : + type == typeof(AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationList) ? "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList" : + type == typeof(ApiExtensions.V1.CustomResourceDefinition) ? "apiextensions.k8s.io/v1/CustomResourceDefinition" : + type == typeof(ApiExtensions.V1.CustomResourceDefinitionList) ? "apiextensions.k8s.io/v1/CustomResourceDefinitionList" : + type == typeof(ApiExtensions.V1Beta1.CustomResourceDefinition) ? "apiextensions.k8s.io/v1beta1/CustomResourceDefinition" : + type == typeof(ApiExtensions.V1Beta1.CustomResourceDefinitionList) ? "apiextensions.k8s.io/v1beta1/CustomResourceDefinitionList" : + type == typeof(ApiRegistration.V1.APIService) ? "apiregistration.k8s.io/v1/APIService" : + type == typeof(ApiRegistration.V1.APIService) ? "apiregistration/v1/APIService" : + type == typeof(ApiRegistration.V1.APIServiceList) ? "apiregistration.k8s.io/v1/APIServiceList" : + type == typeof(ApiRegistration.V1.APIServiceList) ? "apiregistration/v1/APIServiceList" : + type == typeof(ApiRegistration.V1Beta1.APIService) ? "apiregistration.k8s.io/v1beta1/APIService" : + type == typeof(ApiRegistration.V1Beta1.APIService) ? "apiregistration/v1beta1/APIService" : + type == typeof(ApiRegistration.V1Beta1.APIServiceList) ? "apiregistration.k8s.io/v1beta1/APIServiceList" : + type == typeof(ApiRegistration.V1Beta1.APIServiceList) ? "apiregistration/v1beta1/APIServiceList" : + type == typeof(Apps.V1.ControllerRevision) ? "apps/v1/ControllerRevision" : + type == typeof(Apps.V1.ControllerRevisionList) ? "apps/v1/ControllerRevisionList" : + type == typeof(Apps.V1.DaemonSet) ? "apps/v1/DaemonSet" : + type == typeof(Apps.V1.DaemonSetList) ? "apps/v1/DaemonSetList" : + type == typeof(Apps.V1.Deployment) ? "apps/v1/Deployment" : + type == typeof(Apps.V1.DeploymentList) ? "apps/v1/DeploymentList" : + type == typeof(Apps.V1.ReplicaSet) ? "apps/v1/ReplicaSet" : + type == typeof(Apps.V1.ReplicaSetList) ? "apps/v1/ReplicaSetList" : + type == typeof(Apps.V1.StatefulSet) ? "apps/v1/StatefulSet" : + type == typeof(Apps.V1.StatefulSetList) ? "apps/v1/StatefulSetList" : + type == typeof(Apps.V1Beta1.ControllerRevision) ? "apps/v1beta1/ControllerRevision" : + type == typeof(Apps.V1Beta1.ControllerRevisionList) ? "apps/v1beta1/ControllerRevisionList" : + type == typeof(Apps.V1Beta1.Deployment) ? "apps/v1beta1/Deployment" : + type == typeof(Apps.V1Beta1.DeploymentList) ? "apps/v1beta1/DeploymentList" : + type == typeof(Apps.V1Beta1.StatefulSet) ? "apps/v1beta1/StatefulSet" : + type == typeof(Apps.V1Beta1.StatefulSetList) ? "apps/v1beta1/StatefulSetList" : + type == typeof(Apps.V1Beta2.ControllerRevision) ? "apps/v1beta2/ControllerRevision" : + type == typeof(Apps.V1Beta2.ControllerRevisionList) ? "apps/v1beta2/ControllerRevisionList" : + type == typeof(Apps.V1Beta2.DaemonSet) ? "apps/v1beta2/DaemonSet" : + type == typeof(Apps.V1Beta2.DaemonSetList) ? "apps/v1beta2/DaemonSetList" : + type == typeof(Apps.V1Beta2.Deployment) ? "apps/v1beta2/Deployment" : + type == typeof(Apps.V1Beta2.DeploymentList) ? "apps/v1beta2/DeploymentList" : + type == typeof(Apps.V1Beta2.ReplicaSet) ? "apps/v1beta2/ReplicaSet" : + type == typeof(Apps.V1Beta2.ReplicaSetList) ? "apps/v1beta2/ReplicaSetList" : + type == typeof(Apps.V1Beta2.StatefulSet) ? "apps/v1beta2/StatefulSet" : + type == typeof(Apps.V1Beta2.StatefulSetList) ? "apps/v1beta2/StatefulSetList" : + type == typeof(AuditRegistraion.V1Alpha1.AuditSink) ? "auditregistration.k8s.io/v1alpha1/AuditSink" : + type == typeof(AuditRegistraion.V1Alpha1.AuditSinkList) ? "auditregistration.k8s.io/v1alpha1/AuditSinkList" : + type == typeof(Authentication.V1.TokenRequest) ? "authentication.k8s.io/v1/TokenRequest" : + type == typeof(Authentication.V1.TokenReview) ? "authentication.k8s.io/v1/TokenReview" : + type == typeof(Authentication.V1Beta1.TokenReview) ? "authentication.k8s.io/v1beta1/TokenReview" : + type == typeof(Authorization.V1.LocalSubjectAccessReview) ? "authorization.k8s.io/v1/LocalSubjectAccessReview" : + type == typeof(Authorization.V1.SelfSubjectAccessReview) ? "authorization.k8s.io/v1/SelfSubjectAccessReview" : + type == typeof(Authorization.V1.SelfSubjectRulesReview) ? "authorization.k8s.io/v1/SelfSubjectRulesReview" : + type == typeof(Authorization.V1.SubjectAccessReview) ? "authorization.k8s.io/v1/SubjectAccessReview" : + type == typeof(Authorization.V1Beta1.LocalSubjectAccessReview) ? "authorization.k8s.io/v1beta1/LocalSubjectAccessReview" : + type == typeof(Authorization.V1Beta1.SelfSubjectAccessReview) ? "authorization.k8s.io/v1beta1/SelfSubjectAccessReview" : + type == typeof(Authorization.V1Beta1.SelfSubjectRulesReview) ? "authorization.k8s.io/v1beta1/SelfSubjectRulesReview" : + type == typeof(Authorization.V1Beta1.SubjectAccessReview) ? "authorization.k8s.io/v1beta1/SubjectAccessReview" : + type == typeof(Autoscaling.V1.HorizontalPodAutoscaler) ? "autoscaling/v1/HorizontalPodAutoscaler" : + type == typeof(Autoscaling.V1.HorizontalPodAutoscalerList) ? "autoscaling/v1/HorizontalPodAutoscalerList" : + type == typeof(Autoscaling.V2Beta1.HorizontalPodAutoscaler) ? "autoscaling/v2beta1/HorizontalPodAutoscaler" : + type == typeof(Autoscaling.V2Beta1.HorizontalPodAutoscalerList) ? "autoscaling/v2beta1/HorizontalPodAutoscalerList" : + type == typeof(Autoscaling.V2Beta2.HorizontalPodAutoscaler) ? "autoscaling/v2beta2/HorizontalPodAutoscaler" : + type == typeof(Autoscaling.V2Beta2.HorizontalPodAutoscalerList) ? "autoscaling/v2beta2/HorizontalPodAutoscalerList" : + type == typeof(Batch.V1.Job) ? "batch/v1/Job" : + type == typeof(Batch.V1.JobList) ? "batch/v1/JobList" : + type == typeof(Batch.V1Beta1.CronJob) ? "batch/v1beta1/CronJob" : + type == typeof(Batch.V1Beta1.CronJobList) ? "batch/v1beta1/CronJobList" : + type == typeof(Batch.V2Alpha1.CronJob) ? "batch/v2alpha1/CronJob" : + type == typeof(Batch.V2Alpha1.CronJobList) ? "batch/v2alpha1/CronJobList" : + type == typeof(Certificates.V1Beta1.CertificateSigningRequest) ? "certificates.k8s.io/v1beta1/CertificateSigningRequest" : + type == typeof(Certificates.V1Beta1.CertificateSigningRequestList) ? "certificates.k8s.io/v1beta1/CertificateSigningRequestList" : + type == typeof(Coordination.V1.Lease) ? "coordination.k8s.io/v1/Lease" : + type == typeof(Coordination.V1.LeaseList) ? "coordination.k8s.io/v1/LeaseList" : + type == typeof(Coordination.V1Beta1.Lease) ? "coordination.k8s.io/v1beta1/Lease" : + type == typeof(Coordination.V1Beta1.LeaseList) ? "coordination.k8s.io/v1beta1/LeaseList" : + type == typeof(Core.V1.Binding) ? "v1/Binding" : + type == typeof(Core.V1.ComponentStatus) ? "v1/ComponentStatus" : + type == typeof(Core.V1.ComponentStatusList) ? "v1/ComponentStatusList" : + type == typeof(Core.V1.ConfigMap) ? "v1/ConfigMap" : + type == typeof(Core.V1.ConfigMapList) ? "v1/ConfigMapList" : + type == typeof(Core.V1.Endpoints) ? "v1/Endpoints" : + type == typeof(Core.V1.EndpointsList) ? "v1/EndpointsList" : + type == typeof(Core.V1.Event) ? "v1/Event" : + type == typeof(Core.V1.EventList) ? "v1/EventList" : + type == typeof(Core.V1.LimitRange) ? "v1/LimitRange" : + type == typeof(Core.V1.LimitRangeList) ? "v1/LimitRangeList" : + type == typeof(Core.V1.Namespace) ? "v1/Namespace" : + type == typeof(Core.V1.NamespaceList) ? "v1/NamespaceList" : + type == typeof(Core.V1.Node) ? "v1/Node" : + type == typeof(Core.V1.NodeList) ? "v1/NodeList" : + type == typeof(Core.V1.PersistentVolume) ? "v1/PersistentVolume" : + type == typeof(Core.V1.PersistentVolumeClaim) ? "v1/PersistentVolumeClaim" : + type == typeof(Core.V1.PersistentVolumeClaimList) ? "v1/PersistentVolumeClaimList" : + type == typeof(Core.V1.PersistentVolumeList) ? "v1/PersistentVolumeList" : + type == typeof(Core.V1.Pod) ? "v1/Pod" : + type == typeof(Core.V1.PodList) ? "v1/PodList" : + type == typeof(Core.V1.PodTemplate) ? "v1/PodTemplate" : + type == typeof(Core.V1.PodTemplateList) ? "v1/PodTemplateList" : + type == typeof(Core.V1.ReplicationController) ? "v1/ReplicationController" : + type == typeof(Core.V1.ReplicationControllerList) ? "v1/ReplicationControllerList" : + type == typeof(Core.V1.ResourceQuota) ? "v1/ResourceQuota" : + type == typeof(Core.V1.ResourceQuotaList) ? "v1/ResourceQuotaList" : + type == typeof(Core.V1.Secret) ? "v1/Secret" : + type == typeof(Core.V1.SecretList) ? "v1/SecretList" : + type == typeof(Core.V1.Service) ? "v1/Service" : + type == typeof(Core.V1.ServiceAccount) ? "v1/ServiceAccount" : + type == typeof(Core.V1.ServiceAccountList) ? "v1/ServiceAccountList" : + type == typeof(Core.V1.ServiceList) ? "v1/ServiceList" : + type == typeof(Discovery.V1Beta1.EndpointSlice) ? "discovery.k8s.io/v1beta1/EndpointSlice" : + type == typeof(Discovery.V1Beta1.EndpointSliceList) ? "discovery.k8s.io/v1beta1/EndpointSliceList" : + type == typeof(Events.V1Beta1.Event) ? "events.k8s.io/v1beta1/Event" : + type == typeof(Events.V1Beta1.EventList) ? "events.k8s.io/v1beta1/EventList" : + type == typeof(Extensions.V1Beta1.DaemonSet) ? "extensions/v1beta1/DaemonSet" : + type == typeof(Extensions.V1Beta1.DaemonSetList) ? "extensions/v1beta1/DaemonSetList" : + type == typeof(Extensions.V1Beta1.Deployment) ? "extensions/v1beta1/Deployment" : + type == typeof(Extensions.V1Beta1.DeploymentList) ? "extensions/v1beta1/DeploymentList" : + type == typeof(Extensions.V1Beta1.Ingress) ? "extensions/v1beta1/Ingress" : + type == typeof(Extensions.V1Beta1.IngressList) ? "extensions/v1beta1/IngressList" : + type == typeof(Extensions.V1Beta1.NetworkPolicy) ? "extensions/v1beta1/NetworkPolicy" : + type == typeof(Extensions.V1Beta1.NetworkPolicyList) ? "extensions/v1beta1/NetworkPolicyList" : + type == typeof(Extensions.V1Beta1.PodSecurityPolicy) ? "extensions/v1beta1/PodSecurityPolicy" : + type == typeof(Extensions.V1Beta1.PodSecurityPolicyList) ? "extensions/v1beta1/PodSecurityPolicyList" : + type == typeof(Extensions.V1Beta1.ReplicaSet) ? "extensions/v1beta1/ReplicaSet" : + type == typeof(Extensions.V1Beta1.ReplicaSetList) ? "extensions/v1beta1/ReplicaSetList" : + type == typeof(FlowControl.V1Alpha1.FlowSchema) ? "flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchema" : + type == typeof(FlowControl.V1Alpha1.FlowSchemaList) ? "flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchemaList" : + type == typeof(FlowControl.V1Alpha1.PriorityLevelConfiguration) ? "flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfiguration" : + type == typeof(FlowControl.V1Alpha1.PriorityLevelConfigurationList) ? "flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfigurationList" : + type == typeof(Meta.V1.Status) ? "v1/Status" : + type == typeof(Networking.V1.NetworkPolicy) ? "networking.k8s.io/v1/NetworkPolicy" : + type == typeof(Networking.V1.NetworkPolicyList) ? "networking.k8s.io/v1/NetworkPolicyList" : + type == typeof(Networking.V1Beta1.Ingress) ? "networking.k8s.io/v1beta1/Ingress" : + type == typeof(Networking.V1Beta1.IngressList) ? "networking.k8s.io/v1beta1/IngressList" : + type == typeof(Node.V1Alpha1.RuntimeClass) ? "node.k8s.io/v1alpha1/RuntimeClass" : + type == typeof(Node.V1Alpha1.RuntimeClassList) ? "node.k8s.io/v1alpha1/RuntimeClassList" : + type == typeof(Node.V1Beta1.RuntimeClass) ? "node.k8s.io/v1beta1/RuntimeClass" : + type == typeof(Node.V1Beta1.RuntimeClassList) ? "node.k8s.io/v1beta1/RuntimeClassList" : + type == typeof(Policy.V1Beta1.PodDisruptionBudget) ? "policy/v1beta1/PodDisruptionBudget" : + type == typeof(Policy.V1Beta1.PodDisruptionBudgetList) ? "policy/v1beta1/PodDisruptionBudgetList" : + type == typeof(Policy.V1Beta1.PodSecurityPolicy) ? "policy/v1beta1/PodSecurityPolicy" : + type == typeof(Policy.V1Beta1.PodSecurityPolicyList) ? "policy/v1beta1/PodSecurityPolicyList" : + type == typeof(Rbac.V1.ClusterRole) ? "rbac.authorization.k8s.io/v1/ClusterRole" : + type == typeof(Rbac.V1.ClusterRoleBinding) ? "rbac.authorization.k8s.io/v1/ClusterRoleBinding" : + type == typeof(Rbac.V1.ClusterRoleBindingList) ? "rbac.authorization.k8s.io/v1/ClusterRoleBindingList" : + type == typeof(Rbac.V1.ClusterRoleList) ? "rbac.authorization.k8s.io/v1/ClusterRoleList" : + type == typeof(Rbac.V1.Role) ? "rbac.authorization.k8s.io/v1/Role" : + type == typeof(Rbac.V1.RoleBinding) ? "rbac.authorization.k8s.io/v1/RoleBinding" : + type == typeof(Rbac.V1.RoleBindingList) ? "rbac.authorization.k8s.io/v1/RoleBindingList" : + type == typeof(Rbac.V1.RoleList) ? "rbac.authorization.k8s.io/v1/RoleList" : + type == typeof(Rbac.V1Alpha1.ClusterRole) ? "rbac.authorization.k8s.io/v1alpha1/ClusterRole" : + type == typeof(Rbac.V1Alpha1.ClusterRoleBinding) ? "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBinding" : + type == typeof(Rbac.V1Alpha1.ClusterRoleBindingList) ? "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBindingList" : + type == typeof(Rbac.V1Alpha1.ClusterRoleList) ? "rbac.authorization.k8s.io/v1alpha1/ClusterRoleList" : + type == typeof(Rbac.V1Alpha1.Role) ? "rbac.authorization.k8s.io/v1alpha1/Role" : + type == typeof(Rbac.V1Alpha1.RoleBinding) ? "rbac.authorization.k8s.io/v1alpha1/RoleBinding" : + type == typeof(Rbac.V1Alpha1.RoleBindingList) ? "rbac.authorization.k8s.io/v1alpha1/RoleBindingList" : + type == typeof(Rbac.V1Alpha1.RoleList) ? "rbac.authorization.k8s.io/v1alpha1/RoleList" : + type == typeof(Rbac.V1Beta1.ClusterRole) ? "rbac.authorization.k8s.io/v1beta1/ClusterRole" : + type == typeof(Rbac.V1Beta1.ClusterRoleBinding) ? "rbac.authorization.k8s.io/v1beta1/ClusterRoleBinding" : + type == typeof(Rbac.V1Beta1.ClusterRoleBindingList) ? "rbac.authorization.k8s.io/v1beta1/ClusterRoleBindingList" : + type == typeof(Rbac.V1Beta1.ClusterRoleList) ? "rbac.authorization.k8s.io/v1beta1/ClusterRoleList" : + type == typeof(Rbac.V1Beta1.Role) ? "rbac.authorization.k8s.io/v1beta1/Role" : + type == typeof(Rbac.V1Beta1.RoleBinding) ? "rbac.authorization.k8s.io/v1beta1/RoleBinding" : + type == typeof(Rbac.V1Beta1.RoleBindingList) ? "rbac.authorization.k8s.io/v1beta1/RoleBindingList" : + type == typeof(Rbac.V1Beta1.RoleList) ? "rbac.authorization.k8s.io/v1beta1/RoleList" : + type == typeof(Scheduling.V1.PriorityClass) ? "scheduling.k8s.io/v1/PriorityClass" : + type == typeof(Scheduling.V1.PriorityClassList) ? "scheduling.k8s.io/v1/PriorityClassList" : + type == typeof(Scheduling.V1Alpha1.PriorityClass) ? "scheduling.k8s.io/v1alpha1/PriorityClass" : + type == typeof(Scheduling.V1Alpha1.PriorityClassList) ? "scheduling.k8s.io/v1alpha1/PriorityClassList" : + type == typeof(Scheduling.V1Beta1.PriorityClass) ? "scheduling.k8s.io/v1beta1/PriorityClass" : + type == typeof(Scheduling.V1Beta1.PriorityClassList) ? "scheduling.k8s.io/v1beta1/PriorityClassList" : + type == typeof(Settings.V1Alpha1.PodPreset) ? "settings.k8s.io/v1alpha1/PodPreset" : + type == typeof(Settings.V1Alpha1.PodPresetList) ? "settings.k8s.io/v1alpha1/PodPresetList" : + type == typeof(Storage.V1.CSINode) ? "storage.k8s.io/v1/CSINode" : + type == typeof(Storage.V1.CSINodeList) ? "storage.k8s.io/v1/CSINodeList" : + type == typeof(Storage.V1.StorageClass) ? "storage.k8s.io/v1/StorageClass" : + type == typeof(Storage.V1.StorageClassList) ? "storage.k8s.io/v1/StorageClassList" : + type == typeof(Storage.V1.VolumeAttachment) ? "storage.k8s.io/v1/VolumeAttachment" : + type == typeof(Storage.V1.VolumeAttachmentList) ? "storage.k8s.io/v1/VolumeAttachmentList" : + type == typeof(Storage.V1Alpha1.VolumeAttachment) ? "storage.k8s.io/v1alpha1/VolumeAttachment" : + type == typeof(Storage.V1Alpha1.VolumeAttachmentList) ? "storage.k8s.io/v1alpha1/VolumeAttachmentList" : + type == typeof(Storage.V1Beta1.CSIDriver) ? "storage.k8s.io/v1beta1/CSIDriver" : + type == typeof(Storage.V1Beta1.CSIDriverList) ? "storage.k8s.io/v1beta1/CSIDriverList" : + type == typeof(Storage.V1Beta1.CSINode) ? "storage.k8s.io/v1beta1/CSINode" : + type == typeof(Storage.V1Beta1.CSINodeList) ? "storage.k8s.io/v1beta1/CSINodeList" : + type == typeof(Storage.V1Beta1.StorageClass) ? "storage.k8s.io/v1beta1/StorageClass" : + type == typeof(Storage.V1Beta1.StorageClassList) ? "storage.k8s.io/v1beta1/StorageClassList" : + type == typeof(Storage.V1Beta1.VolumeAttachment) ? "storage.k8s.io/v1beta1/VolumeAttachment" : + type == typeof(Storage.V1Beta1.VolumeAttachmentList) ? "storage.k8s.io/v1beta1/VolumeAttachmentList" : + throw new ArgumentException($"Unknown resource type {typeof(T).FullName}"); + var id = namespaceName != null ? $"{namespaceName}/{name}" : name; + return Resources.Apply(r => + { + if (!r.TryGetValue($"{groupVersionKind}::{id}", out var value)) + { + var existingKeys = string.Join(", ", r.Keys); + throw new ArgumentException($"Resource {groupVersionKind}::{id} of type {type.FullName} and id {id} is not found, existing resources are {existingKeys}"); + } + + return (T) value; + }); + } + + /// + /// Returns a custom resource defined by the given group/version/kind and name. + /// + /// Group/version/kind, e.g. "monitoring.coreos.com/v1/ServiceMonitor". + /// + /// Resource name. + /// Optional namespace, e.g. "kube-prometheus-exporter-kubernetes". + public Output GetCustomResource(string groupVersionKind, string name, string? namespaceName = null) + { + var id = namespaceName != null ? $"{namespaceName}/{name}" : name; + return Resources.Apply(r => (CustomResource)r[$"{groupVersionKind}::{id}"]); + } + } + + internal static class Parser + { + public static Output> Parse(ConfigGroupArgs config, ComponentResourceOptions? options) + { + var resources = Output.Create(ImmutableDictionary.Create()); + + if (config.Files != null) + { + var files = new List(); + foreach (var file in config.Files) + { + if (IsUrl(file)) + files.Add(file); + else + files.AddRange(Glob.Files(Directory.GetCurrentDirectory(), file)); + } + + foreach (var file in files) + { + var cf = new ConfigFile( + file, + new ConfigFileArgs + { + File = file, + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, + options); + resources = Output.Tuple(resources, cf.Resources).Apply(vs => vs.Item1.AddRange(vs.Item2)); + } + } + + if (config.Yaml != null) + { + var yamlResources = config.Yaml.ToOutput().Apply(texts => + { + var yamls = texts + .Select(text => + ParseYamlDocument(new ParseArgs + { + Objs = Invokes.YamlDecode(new YamlDecodeArgs { Text = text }), + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, options)) + .Select(output => (Input>)output) + .ToImmutableArray(); + return Output.All(yamls); + }); + + resources = Output.Tuple(resources, yamlResources).Apply(vs => + { + var builder = ImmutableDictionary.CreateBuilder(); + builder.AddRange(vs.Item1); + foreach (var bs in vs.Item2) + builder.AddRange(bs); + return builder.ToImmutable(); + }); + } + + if (config.Objs != null) + { + var docResources = ParseYamlDocument(new ParseArgs + { + Objs = config.Objs, + Transformations = config.Transformations, + ResourcePrefix = config.ResourcePrefix + }, options); + resources = Output.Tuple(resources, docResources).Apply(vs => vs.Item1.AddRange(vs.Item2)); + } + + return resources; + + } + + internal static bool IsUrl(string s) => s.StartsWith("http://") || s.StartsWith("https://"); + + internal static Output> ParseYamlDocument(ParseArgs config, + ComponentResourceOptions? options = null) + { + return config.Objs.ToOutput().Apply(objs => + { + + var inputs = objs + .SelectMany(obj => ParseYamlObject(obj, config.Transformations, config.ResourcePrefix, options)) + .Select(output => (Input<(string, KubernetesResource)>) output) + .ToImmutableArray(); + + return Output.All(inputs) + .Apply(items => + items.Select(obj => new KeyValuePair(obj.Item1, obj.Item2)) + .ToImmutableDictionary()); + }); + } + + private static Output<(string, KubernetesResource)>[] ParseYamlObject(ImmutableDictionary obj, + TransformationAction[]? transformations, string? resourcePrefix, ComponentResourceOptions? options = null) + { + if (obj == null || obj.Count == 0) + return new Output<(string, KubernetesResource)>[0]; + + // Create custom resource options based on component resource options. + var opts = new CustomResourceOptions + { + Parent = options?.Parent, + DependsOn = options?.DependsOn ?? new InputList(), + IgnoreChanges = options?.IgnoreChanges ?? new List(), + Version = options?.Version, + Provider = options?.Provider, + CustomTimeouts = options?.CustomTimeouts + }; + + // Allow users to change API objects before any validation. + if (transformations != null) + { + foreach (var transform in transformations) + obj = transform(obj, opts); + } + + if (!(obj.ContainsKey("kind") && obj.ContainsKey("apiVersion"))) + { + var serialized = JsonSerializer.Serialize(obj); + throw new FormatException($"Kubernetes resources require a kind and apiVersion: {serialized}"); + } + + var kind = (string)obj["kind"]; + var apiVersion = (string)obj["apiVersion"]; + + // Recursively traverse built-in Kubernetes list types into a single set of "naked" resource + // definitions that we can register with the Pulumi engine. + // + // Kubernetes does not instantiate list types like `v1.List`. When the API server receives + // a list, it will recursively traverse it and perform the necessary operations on the + // each "instantiable" resource it finds. For example, `kubectl apply` on a + // `v1.ConfigMapList` will cause the API server to traverse the list, and `apply` each + // `v1.ConfigMap` it finds. + // + // Since Kubernetes does not instantiate list types directly, Pulumi also traverses lists + // for resource definitions that can be managed by Kubernetes, and registers those with the + // engine instead. + if ( + apiVersion == "v1" && kind == "List" + || apiVersion == "admissionregistration.k8s.io/v1" && kind == "MutatingWebhookConfigurationList" + || apiVersion == "admissionregistration.k8s.io/v1" && kind == "ValidatingWebhookConfigurationList" + || apiVersion == "admissionregistration.k8s.io/v1beta1" && kind == "MutatingWebhookConfigurationList" + || apiVersion == "admissionregistration.k8s.io/v1beta1" && kind == "ValidatingWebhookConfigurationList" + || apiVersion == "apiextensions.k8s.io/v1" && kind == "CustomResourceDefinitionList" + || apiVersion == "apiextensions.k8s.io/v1beta1" && kind == "CustomResourceDefinitionList" + || apiVersion == "apiregistration.k8s.io/v1" && kind == "APIServiceList" + || apiVersion == "apiregistration/v1" && kind == "APIServiceList" + || apiVersion == "apiregistration.k8s.io/v1beta1" && kind == "APIServiceList" + || apiVersion == "apiregistration/v1beta1" && kind == "APIServiceList" + || apiVersion == "apps/v1" && kind == "ControllerRevisionList" + || apiVersion == "apps/v1" && kind == "DaemonSetList" + || apiVersion == "apps/v1" && kind == "DeploymentList" + || apiVersion == "apps/v1" && kind == "ReplicaSetList" + || apiVersion == "apps/v1" && kind == "StatefulSetList" + || apiVersion == "apps/v1beta1" && kind == "ControllerRevisionList" + || apiVersion == "apps/v1beta1" && kind == "DeploymentList" + || apiVersion == "apps/v1beta1" && kind == "StatefulSetList" + || apiVersion == "apps/v1beta2" && kind == "ControllerRevisionList" + || apiVersion == "apps/v1beta2" && kind == "DaemonSetList" + || apiVersion == "apps/v1beta2" && kind == "DeploymentList" + || apiVersion == "apps/v1beta2" && kind == "ReplicaSetList" + || apiVersion == "apps/v1beta2" && kind == "StatefulSetList" + || apiVersion == "auditregistration.k8s.io/v1alpha1" && kind == "AuditSinkList" + || apiVersion == "autoscaling/v1" && kind == "HorizontalPodAutoscalerList" + || apiVersion == "autoscaling/v2beta1" && kind == "HorizontalPodAutoscalerList" + || apiVersion == "autoscaling/v2beta2" && kind == "HorizontalPodAutoscalerList" + || apiVersion == "batch/v1" && kind == "JobList" + || apiVersion == "batch/v1beta1" && kind == "CronJobList" + || apiVersion == "batch/v2alpha1" && kind == "CronJobList" + || apiVersion == "certificates.k8s.io/v1beta1" && kind == "CertificateSigningRequestList" + || apiVersion == "coordination.k8s.io/v1" && kind == "LeaseList" + || apiVersion == "coordination.k8s.io/v1beta1" && kind == "LeaseList" + || apiVersion == "v1" && kind == "ComponentStatusList" + || apiVersion == "v1" && kind == "ConfigMapList" + || apiVersion == "v1" && kind == "EndpointsList" + || apiVersion == "v1" && kind == "EventList" + || apiVersion == "v1" && kind == "LimitRangeList" + || apiVersion == "v1" && kind == "NamespaceList" + || apiVersion == "v1" && kind == "NodeList" + || apiVersion == "v1" && kind == "PersistentVolumeClaimList" + || apiVersion == "v1" && kind == "PersistentVolumeList" + || apiVersion == "v1" && kind == "PodList" + || apiVersion == "v1" && kind == "PodTemplateList" + || apiVersion == "v1" && kind == "ReplicationControllerList" + || apiVersion == "v1" && kind == "ResourceQuotaList" + || apiVersion == "v1" && kind == "SecretList" + || apiVersion == "v1" && kind == "ServiceAccountList" + || apiVersion == "v1" && kind == "ServiceList" + || apiVersion == "discovery.k8s.io/v1beta1" && kind == "EndpointSliceList" + || apiVersion == "events.k8s.io/v1beta1" && kind == "EventList" + || apiVersion == "extensions/v1beta1" && kind == "DaemonSetList" + || apiVersion == "extensions/v1beta1" && kind == "DeploymentList" + || apiVersion == "extensions/v1beta1" && kind == "IngressList" + || apiVersion == "extensions/v1beta1" && kind == "NetworkPolicyList" + || apiVersion == "extensions/v1beta1" && kind == "PodSecurityPolicyList" + || apiVersion == "extensions/v1beta1" && kind == "ReplicaSetList" + || apiVersion == "flowcontrol.apiserver.k8s.io/v1alpha1" && kind == "FlowSchemaList" + || apiVersion == "flowcontrol.apiserver.k8s.io/v1alpha1" && kind == "PriorityLevelConfigurationList" + || apiVersion == "networking.k8s.io/v1" && kind == "NetworkPolicyList" + || apiVersion == "networking.k8s.io/v1beta1" && kind == "IngressList" + || apiVersion == "node.k8s.io/v1alpha1" && kind == "RuntimeClassList" + || apiVersion == "node.k8s.io/v1beta1" && kind == "RuntimeClassList" + || apiVersion == "policy/v1beta1" && kind == "PodDisruptionBudgetList" + || apiVersion == "policy/v1beta1" && kind == "PodSecurityPolicyList" + || apiVersion == "rbac.authorization.k8s.io/v1" && kind == "ClusterRoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1" && kind == "ClusterRoleList" + || apiVersion == "rbac.authorization.k8s.io/v1" && kind == "RoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1" && kind == "RoleList" + || apiVersion == "rbac.authorization.k8s.io/v1alpha1" && kind == "ClusterRoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1alpha1" && kind == "ClusterRoleList" + || apiVersion == "rbac.authorization.k8s.io/v1alpha1" && kind == "RoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1alpha1" && kind == "RoleList" + || apiVersion == "rbac.authorization.k8s.io/v1beta1" && kind == "ClusterRoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1beta1" && kind == "ClusterRoleList" + || apiVersion == "rbac.authorization.k8s.io/v1beta1" && kind == "RoleBindingList" + || apiVersion == "rbac.authorization.k8s.io/v1beta1" && kind == "RoleList" + || apiVersion == "scheduling.k8s.io/v1" && kind == "PriorityClassList" + || apiVersion == "scheduling.k8s.io/v1alpha1" && kind == "PriorityClassList" + || apiVersion == "scheduling.k8s.io/v1beta1" && kind == "PriorityClassList" + || apiVersion == "settings.k8s.io/v1alpha1" && kind == "PodPresetList" + || apiVersion == "storage.k8s.io/v1" && kind == "CSINodeList" + || apiVersion == "storage.k8s.io/v1" && kind == "StorageClassList" + || apiVersion == "storage.k8s.io/v1" && kind == "VolumeAttachmentList" + || apiVersion == "storage.k8s.io/v1alpha1" && kind == "VolumeAttachmentList" + || apiVersion == "storage.k8s.io/v1beta1" && kind == "CSIDriverList" + || apiVersion == "storage.k8s.io/v1beta1" && kind == "CSINodeList" + || apiVersion == "storage.k8s.io/v1beta1" && kind == "StorageClassList" + || apiVersion == "storage.k8s.io/v1beta1" && kind == "VolumeAttachmentList" + ) + { + var objs = new List>(); + if (obj["items"] is IEnumerable> items) + { + foreach (var item in items) + objs.AddRange(Parser.ParseYamlObject(item, transformations, resourcePrefix)); + } + return objs.ToArray(); + } + + if (!obj.ContainsKey("metadata") || !(obj["metadata"] is ImmutableDictionary metadata) + || !metadata.ContainsKey("name")) + { + var serialized = obj.TryGetValue("metadata", out var m) ? JsonSerializer.Serialize(m) : ""; + throw new FormatException($"YAML object does not have a .metadata.name: {apiVersion}/{kind} {serialized}"); + } + + var meta = (ImmutableDictionary)obj["metadata"]; + var id = Output.Create((string)meta["name"]); + if (meta.TryGetValue("namespace", out object ns)) + id = Output.Format($"{ns}/{id}"); + if (resourcePrefix != null) + id = Output.Format($"{resourcePrefix}-{id}"); + + switch ($"{apiVersion}/{kind}") + { + case "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1/MutatingWebhookConfiguration::{id}", + new AdmissionRegistration.V1.MutatingWebhookConfiguration(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList::{id}", + new AdmissionRegistration.V1.MutatingWebhookConfigurationList(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration::{id}", + new AdmissionRegistration.V1.ValidatingWebhookConfiguration(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList::{id}", + new AdmissionRegistration.V1.ValidatingWebhookConfigurationList(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration::{id}", + new AdmissionRegistration.V1Beta1.MutatingWebhookConfiguration(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList::{id}", + new AdmissionRegistration.V1Beta1.MutatingWebhookConfigurationList(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration::{id}", + new AdmissionRegistration.V1Beta1.ValidatingWebhookConfiguration(id, obj!, opts) as KubernetesResource)) + }; + case "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList": + return new[] + { + id.Apply(id => ($"admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList::{id}", + new AdmissionRegistration.V1Beta1.ValidatingWebhookConfigurationList(id, obj!, opts) as KubernetesResource)) + }; + case "apiextensions.k8s.io/v1/CustomResourceDefinition": + return new[] + { + id.Apply(id => ($"apiextensions.k8s.io/v1/CustomResourceDefinition::{id}", + new ApiExtensions.V1.CustomResourceDefinition(id, obj!, opts) as KubernetesResource)) + }; + case "apiextensions.k8s.io/v1/CustomResourceDefinitionList": + return new[] + { + id.Apply(id => ($"apiextensions.k8s.io/v1/CustomResourceDefinitionList::{id}", + new ApiExtensions.V1.CustomResourceDefinitionList(id, obj!, opts) as KubernetesResource)) + }; + case "apiextensions.k8s.io/v1beta1/CustomResourceDefinition": + return new[] + { + id.Apply(id => ($"apiextensions.k8s.io/v1beta1/CustomResourceDefinition::{id}", + new ApiExtensions.V1Beta1.CustomResourceDefinition(id, obj!, opts) as KubernetesResource)) + }; + case "apiextensions.k8s.io/v1beta1/CustomResourceDefinitionList": + return new[] + { + id.Apply(id => ($"apiextensions.k8s.io/v1beta1/CustomResourceDefinitionList::{id}", + new ApiExtensions.V1Beta1.CustomResourceDefinitionList(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration.k8s.io/v1/APIService": + return new[] + { + id.Apply(id => ($"apiregistration.k8s.io/v1/APIService::{id}", + new ApiRegistration.V1.APIService(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration/v1/APIService": + return new[] + { + id.Apply(id => ($"apiregistration/v1/APIService::{id}", + new ApiRegistration.V1.APIService(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration.k8s.io/v1/APIServiceList": + return new[] + { + id.Apply(id => ($"apiregistration.k8s.io/v1/APIServiceList::{id}", + new ApiRegistration.V1.APIServiceList(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration/v1/APIServiceList": + return new[] + { + id.Apply(id => ($"apiregistration/v1/APIServiceList::{id}", + new ApiRegistration.V1.APIServiceList(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration.k8s.io/v1beta1/APIService": + return new[] + { + id.Apply(id => ($"apiregistration.k8s.io/v1beta1/APIService::{id}", + new ApiRegistration.V1Beta1.APIService(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration/v1beta1/APIService": + return new[] + { + id.Apply(id => ($"apiregistration/v1beta1/APIService::{id}", + new ApiRegistration.V1Beta1.APIService(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration.k8s.io/v1beta1/APIServiceList": + return new[] + { + id.Apply(id => ($"apiregistration.k8s.io/v1beta1/APIServiceList::{id}", + new ApiRegistration.V1Beta1.APIServiceList(id, obj!, opts) as KubernetesResource)) + }; + case "apiregistration/v1beta1/APIServiceList": + return new[] + { + id.Apply(id => ($"apiregistration/v1beta1/APIServiceList::{id}", + new ApiRegistration.V1Beta1.APIServiceList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/ControllerRevision": + return new[] + { + id.Apply(id => ($"apps/v1/ControllerRevision::{id}", + new Apps.V1.ControllerRevision(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/ControllerRevisionList": + return new[] + { + id.Apply(id => ($"apps/v1/ControllerRevisionList::{id}", + new Apps.V1.ControllerRevisionList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/DaemonSet": + return new[] + { + id.Apply(id => ($"apps/v1/DaemonSet::{id}", + new Apps.V1.DaemonSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/DaemonSetList": + return new[] + { + id.Apply(id => ($"apps/v1/DaemonSetList::{id}", + new Apps.V1.DaemonSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/Deployment": + return new[] + { + id.Apply(id => ($"apps/v1/Deployment::{id}", + new Apps.V1.Deployment(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/DeploymentList": + return new[] + { + id.Apply(id => ($"apps/v1/DeploymentList::{id}", + new Apps.V1.DeploymentList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/ReplicaSet": + return new[] + { + id.Apply(id => ($"apps/v1/ReplicaSet::{id}", + new Apps.V1.ReplicaSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/ReplicaSetList": + return new[] + { + id.Apply(id => ($"apps/v1/ReplicaSetList::{id}", + new Apps.V1.ReplicaSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/StatefulSet": + return new[] + { + id.Apply(id => ($"apps/v1/StatefulSet::{id}", + new Apps.V1.StatefulSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1/StatefulSetList": + return new[] + { + id.Apply(id => ($"apps/v1/StatefulSetList::{id}", + new Apps.V1.StatefulSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/ControllerRevision": + return new[] + { + id.Apply(id => ($"apps/v1beta1/ControllerRevision::{id}", + new Apps.V1Beta1.ControllerRevision(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/ControllerRevisionList": + return new[] + { + id.Apply(id => ($"apps/v1beta1/ControllerRevisionList::{id}", + new Apps.V1Beta1.ControllerRevisionList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/Deployment": + return new[] + { + id.Apply(id => ($"apps/v1beta1/Deployment::{id}", + new Apps.V1Beta1.Deployment(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/DeploymentList": + return new[] + { + id.Apply(id => ($"apps/v1beta1/DeploymentList::{id}", + new Apps.V1Beta1.DeploymentList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/StatefulSet": + return new[] + { + id.Apply(id => ($"apps/v1beta1/StatefulSet::{id}", + new Apps.V1Beta1.StatefulSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta1/StatefulSetList": + return new[] + { + id.Apply(id => ($"apps/v1beta1/StatefulSetList::{id}", + new Apps.V1Beta1.StatefulSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/ControllerRevision": + return new[] + { + id.Apply(id => ($"apps/v1beta2/ControllerRevision::{id}", + new Apps.V1Beta2.ControllerRevision(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/ControllerRevisionList": + return new[] + { + id.Apply(id => ($"apps/v1beta2/ControllerRevisionList::{id}", + new Apps.V1Beta2.ControllerRevisionList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/DaemonSet": + return new[] + { + id.Apply(id => ($"apps/v1beta2/DaemonSet::{id}", + new Apps.V1Beta2.DaemonSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/DaemonSetList": + return new[] + { + id.Apply(id => ($"apps/v1beta2/DaemonSetList::{id}", + new Apps.V1Beta2.DaemonSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/Deployment": + return new[] + { + id.Apply(id => ($"apps/v1beta2/Deployment::{id}", + new Apps.V1Beta2.Deployment(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/DeploymentList": + return new[] + { + id.Apply(id => ($"apps/v1beta2/DeploymentList::{id}", + new Apps.V1Beta2.DeploymentList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/ReplicaSet": + return new[] + { + id.Apply(id => ($"apps/v1beta2/ReplicaSet::{id}", + new Apps.V1Beta2.ReplicaSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/ReplicaSetList": + return new[] + { + id.Apply(id => ($"apps/v1beta2/ReplicaSetList::{id}", + new Apps.V1Beta2.ReplicaSetList(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/StatefulSet": + return new[] + { + id.Apply(id => ($"apps/v1beta2/StatefulSet::{id}", + new Apps.V1Beta2.StatefulSet(id, obj!, opts) as KubernetesResource)) + }; + case "apps/v1beta2/StatefulSetList": + return new[] + { + id.Apply(id => ($"apps/v1beta2/StatefulSetList::{id}", + new Apps.V1Beta2.StatefulSetList(id, obj!, opts) as KubernetesResource)) + }; + case "auditregistration.k8s.io/v1alpha1/AuditSink": + return new[] + { + id.Apply(id => ($"auditregistration.k8s.io/v1alpha1/AuditSink::{id}", + new AuditRegistraion.V1Alpha1.AuditSink(id, obj!, opts) as KubernetesResource)) + }; + case "auditregistration.k8s.io/v1alpha1/AuditSinkList": + return new[] + { + id.Apply(id => ($"auditregistration.k8s.io/v1alpha1/AuditSinkList::{id}", + new AuditRegistraion.V1Alpha1.AuditSinkList(id, obj!, opts) as KubernetesResource)) + }; + case "authentication.k8s.io/v1/TokenRequest": + return new[] + { + id.Apply(id => ($"authentication.k8s.io/v1/TokenRequest::{id}", + new Authentication.V1.TokenRequest(id, obj!, opts) as KubernetesResource)) + }; + case "authentication.k8s.io/v1/TokenReview": + return new[] + { + id.Apply(id => ($"authentication.k8s.io/v1/TokenReview::{id}", + new Authentication.V1.TokenReview(id, obj!, opts) as KubernetesResource)) + }; + case "authentication.k8s.io/v1beta1/TokenReview": + return new[] + { + id.Apply(id => ($"authentication.k8s.io/v1beta1/TokenReview::{id}", + new Authentication.V1Beta1.TokenReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1/LocalSubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1/LocalSubjectAccessReview::{id}", + new Authorization.V1.LocalSubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1/SelfSubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1/SelfSubjectAccessReview::{id}", + new Authorization.V1.SelfSubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1/SelfSubjectRulesReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1/SelfSubjectRulesReview::{id}", + new Authorization.V1.SelfSubjectRulesReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1/SubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1/SubjectAccessReview::{id}", + new Authorization.V1.SubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1beta1/LocalSubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1beta1/LocalSubjectAccessReview::{id}", + new Authorization.V1Beta1.LocalSubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1beta1/SelfSubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1beta1/SelfSubjectAccessReview::{id}", + new Authorization.V1Beta1.SelfSubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1beta1/SelfSubjectRulesReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1beta1/SelfSubjectRulesReview::{id}", + new Authorization.V1Beta1.SelfSubjectRulesReview(id, obj!, opts) as KubernetesResource)) + }; + case "authorization.k8s.io/v1beta1/SubjectAccessReview": + return new[] + { + id.Apply(id => ($"authorization.k8s.io/v1beta1/SubjectAccessReview::{id}", + new Authorization.V1Beta1.SubjectAccessReview(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v1/HorizontalPodAutoscaler": + return new[] + { + id.Apply(id => ($"autoscaling/v1/HorizontalPodAutoscaler::{id}", + new Autoscaling.V1.HorizontalPodAutoscaler(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v1/HorizontalPodAutoscalerList": + return new[] + { + id.Apply(id => ($"autoscaling/v1/HorizontalPodAutoscalerList::{id}", + new Autoscaling.V1.HorizontalPodAutoscalerList(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v2beta1/HorizontalPodAutoscaler": + return new[] + { + id.Apply(id => ($"autoscaling/v2beta1/HorizontalPodAutoscaler::{id}", + new Autoscaling.V2Beta1.HorizontalPodAutoscaler(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v2beta1/HorizontalPodAutoscalerList": + return new[] + { + id.Apply(id => ($"autoscaling/v2beta1/HorizontalPodAutoscalerList::{id}", + new Autoscaling.V2Beta1.HorizontalPodAutoscalerList(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v2beta2/HorizontalPodAutoscaler": + return new[] + { + id.Apply(id => ($"autoscaling/v2beta2/HorizontalPodAutoscaler::{id}", + new Autoscaling.V2Beta2.HorizontalPodAutoscaler(id, obj!, opts) as KubernetesResource)) + }; + case "autoscaling/v2beta2/HorizontalPodAutoscalerList": + return new[] + { + id.Apply(id => ($"autoscaling/v2beta2/HorizontalPodAutoscalerList::{id}", + new Autoscaling.V2Beta2.HorizontalPodAutoscalerList(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v1/Job": + return new[] + { + id.Apply(id => ($"batch/v1/Job::{id}", + new Batch.V1.Job(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v1/JobList": + return new[] + { + id.Apply(id => ($"batch/v1/JobList::{id}", + new Batch.V1.JobList(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v1beta1/CronJob": + return new[] + { + id.Apply(id => ($"batch/v1beta1/CronJob::{id}", + new Batch.V1Beta1.CronJob(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v1beta1/CronJobList": + return new[] + { + id.Apply(id => ($"batch/v1beta1/CronJobList::{id}", + new Batch.V1Beta1.CronJobList(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v2alpha1/CronJob": + return new[] + { + id.Apply(id => ($"batch/v2alpha1/CronJob::{id}", + new Batch.V2Alpha1.CronJob(id, obj!, opts) as KubernetesResource)) + }; + case "batch/v2alpha1/CronJobList": + return new[] + { + id.Apply(id => ($"batch/v2alpha1/CronJobList::{id}", + new Batch.V2Alpha1.CronJobList(id, obj!, opts) as KubernetesResource)) + }; + case "certificates.k8s.io/v1beta1/CertificateSigningRequest": + return new[] + { + id.Apply(id => ($"certificates.k8s.io/v1beta1/CertificateSigningRequest::{id}", + new Certificates.V1Beta1.CertificateSigningRequest(id, obj!, opts) as KubernetesResource)) + }; + case "certificates.k8s.io/v1beta1/CertificateSigningRequestList": + return new[] + { + id.Apply(id => ($"certificates.k8s.io/v1beta1/CertificateSigningRequestList::{id}", + new Certificates.V1Beta1.CertificateSigningRequestList(id, obj!, opts) as KubernetesResource)) + }; + case "coordination.k8s.io/v1/Lease": + return new[] + { + id.Apply(id => ($"coordination.k8s.io/v1/Lease::{id}", + new Coordination.V1.Lease(id, obj!, opts) as KubernetesResource)) + }; + case "coordination.k8s.io/v1/LeaseList": + return new[] + { + id.Apply(id => ($"coordination.k8s.io/v1/LeaseList::{id}", + new Coordination.V1.LeaseList(id, obj!, opts) as KubernetesResource)) + }; + case "coordination.k8s.io/v1beta1/Lease": + return new[] + { + id.Apply(id => ($"coordination.k8s.io/v1beta1/Lease::{id}", + new Coordination.V1Beta1.Lease(id, obj!, opts) as KubernetesResource)) + }; + case "coordination.k8s.io/v1beta1/LeaseList": + return new[] + { + id.Apply(id => ($"coordination.k8s.io/v1beta1/LeaseList::{id}", + new Coordination.V1Beta1.LeaseList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Binding": + return new[] + { + id.Apply(id => ($"v1/Binding::{id}", + new Core.V1.Binding(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ComponentStatus": + return new[] + { + id.Apply(id => ($"v1/ComponentStatus::{id}", + new Core.V1.ComponentStatus(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ComponentStatusList": + return new[] + { + id.Apply(id => ($"v1/ComponentStatusList::{id}", + new Core.V1.ComponentStatusList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ConfigMap": + return new[] + { + id.Apply(id => ($"v1/ConfigMap::{id}", + new Core.V1.ConfigMap(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ConfigMapList": + return new[] + { + id.Apply(id => ($"v1/ConfigMapList::{id}", + new Core.V1.ConfigMapList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Endpoints": + return new[] + { + id.Apply(id => ($"v1/Endpoints::{id}", + new Core.V1.Endpoints(id, obj!, opts) as KubernetesResource)) + }; + case "v1/EndpointsList": + return new[] + { + id.Apply(id => ($"v1/EndpointsList::{id}", + new Core.V1.EndpointsList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Event": + return new[] + { + id.Apply(id => ($"v1/Event::{id}", + new Core.V1.Event(id, obj!, opts) as KubernetesResource)) + }; + case "v1/EventList": + return new[] + { + id.Apply(id => ($"v1/EventList::{id}", + new Core.V1.EventList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/LimitRange": + return new[] + { + id.Apply(id => ($"v1/LimitRange::{id}", + new Core.V1.LimitRange(id, obj!, opts) as KubernetesResource)) + }; + case "v1/LimitRangeList": + return new[] + { + id.Apply(id => ($"v1/LimitRangeList::{id}", + new Core.V1.LimitRangeList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Namespace": + return new[] + { + id.Apply(id => ($"v1/Namespace::{id}", + new Core.V1.Namespace(id, obj!, opts) as KubernetesResource)) + }; + case "v1/NamespaceList": + return new[] + { + id.Apply(id => ($"v1/NamespaceList::{id}", + new Core.V1.NamespaceList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Node": + return new[] + { + id.Apply(id => ($"v1/Node::{id}", + new Core.V1.Node(id, obj!, opts) as KubernetesResource)) + }; + case "v1/NodeList": + return new[] + { + id.Apply(id => ($"v1/NodeList::{id}", + new Core.V1.NodeList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PersistentVolume": + return new[] + { + id.Apply(id => ($"v1/PersistentVolume::{id}", + new Core.V1.PersistentVolume(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PersistentVolumeClaim": + return new[] + { + id.Apply(id => ($"v1/PersistentVolumeClaim::{id}", + new Core.V1.PersistentVolumeClaim(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PersistentVolumeClaimList": + return new[] + { + id.Apply(id => ($"v1/PersistentVolumeClaimList::{id}", + new Core.V1.PersistentVolumeClaimList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PersistentVolumeList": + return new[] + { + id.Apply(id => ($"v1/PersistentVolumeList::{id}", + new Core.V1.PersistentVolumeList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Pod": + return new[] + { + id.Apply(id => ($"v1/Pod::{id}", + new Core.V1.Pod(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PodList": + return new[] + { + id.Apply(id => ($"v1/PodList::{id}", + new Core.V1.PodList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PodTemplate": + return new[] + { + id.Apply(id => ($"v1/PodTemplate::{id}", + new Core.V1.PodTemplate(id, obj!, opts) as KubernetesResource)) + }; + case "v1/PodTemplateList": + return new[] + { + id.Apply(id => ($"v1/PodTemplateList::{id}", + new Core.V1.PodTemplateList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ReplicationController": + return new[] + { + id.Apply(id => ($"v1/ReplicationController::{id}", + new Core.V1.ReplicationController(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ReplicationControllerList": + return new[] + { + id.Apply(id => ($"v1/ReplicationControllerList::{id}", + new Core.V1.ReplicationControllerList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ResourceQuota": + return new[] + { + id.Apply(id => ($"v1/ResourceQuota::{id}", + new Core.V1.ResourceQuota(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ResourceQuotaList": + return new[] + { + id.Apply(id => ($"v1/ResourceQuotaList::{id}", + new Core.V1.ResourceQuotaList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Secret": + return new[] + { + id.Apply(id => ($"v1/Secret::{id}", + new Core.V1.Secret(id, obj!, opts) as KubernetesResource)) + }; + case "v1/SecretList": + return new[] + { + id.Apply(id => ($"v1/SecretList::{id}", + new Core.V1.SecretList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Service": + return new[] + { + id.Apply(id => ($"v1/Service::{id}", + new Core.V1.Service(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ServiceAccount": + return new[] + { + id.Apply(id => ($"v1/ServiceAccount::{id}", + new Core.V1.ServiceAccount(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ServiceAccountList": + return new[] + { + id.Apply(id => ($"v1/ServiceAccountList::{id}", + new Core.V1.ServiceAccountList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/ServiceList": + return new[] + { + id.Apply(id => ($"v1/ServiceList::{id}", + new Core.V1.ServiceList(id, obj!, opts) as KubernetesResource)) + }; + case "discovery.k8s.io/v1beta1/EndpointSlice": + return new[] + { + id.Apply(id => ($"discovery.k8s.io/v1beta1/EndpointSlice::{id}", + new Discovery.V1Beta1.EndpointSlice(id, obj!, opts) as KubernetesResource)) + }; + case "discovery.k8s.io/v1beta1/EndpointSliceList": + return new[] + { + id.Apply(id => ($"discovery.k8s.io/v1beta1/EndpointSliceList::{id}", + new Discovery.V1Beta1.EndpointSliceList(id, obj!, opts) as KubernetesResource)) + }; + case "events.k8s.io/v1beta1/Event": + return new[] + { + id.Apply(id => ($"events.k8s.io/v1beta1/Event::{id}", + new Events.V1Beta1.Event(id, obj!, opts) as KubernetesResource)) + }; + case "events.k8s.io/v1beta1/EventList": + return new[] + { + id.Apply(id => ($"events.k8s.io/v1beta1/EventList::{id}", + new Events.V1Beta1.EventList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/DaemonSet": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/DaemonSet::{id}", + new Extensions.V1Beta1.DaemonSet(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/DaemonSetList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/DaemonSetList::{id}", + new Extensions.V1Beta1.DaemonSetList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/Deployment": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/Deployment::{id}", + new Extensions.V1Beta1.Deployment(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/DeploymentList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/DeploymentList::{id}", + new Extensions.V1Beta1.DeploymentList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/Ingress": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/Ingress::{id}", + new Extensions.V1Beta1.Ingress(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/IngressList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/IngressList::{id}", + new Extensions.V1Beta1.IngressList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/NetworkPolicy": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/NetworkPolicy::{id}", + new Extensions.V1Beta1.NetworkPolicy(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/NetworkPolicyList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/NetworkPolicyList::{id}", + new Extensions.V1Beta1.NetworkPolicyList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/PodSecurityPolicy": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/PodSecurityPolicy::{id}", + new Extensions.V1Beta1.PodSecurityPolicy(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/PodSecurityPolicyList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/PodSecurityPolicyList::{id}", + new Extensions.V1Beta1.PodSecurityPolicyList(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/ReplicaSet": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/ReplicaSet::{id}", + new Extensions.V1Beta1.ReplicaSet(id, obj!, opts) as KubernetesResource)) + }; + case "extensions/v1beta1/ReplicaSetList": + return new[] + { + id.Apply(id => ($"extensions/v1beta1/ReplicaSetList::{id}", + new Extensions.V1Beta1.ReplicaSetList(id, obj!, opts) as KubernetesResource)) + }; + case "flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchema": + return new[] + { + id.Apply(id => ($"flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchema::{id}", + new FlowControl.V1Alpha1.FlowSchema(id, obj!, opts) as KubernetesResource)) + }; + case "flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchemaList": + return new[] + { + id.Apply(id => ($"flowcontrol.apiserver.k8s.io/v1alpha1/FlowSchemaList::{id}", + new FlowControl.V1Alpha1.FlowSchemaList(id, obj!, opts) as KubernetesResource)) + }; + case "flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfiguration": + return new[] + { + id.Apply(id => ($"flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfiguration::{id}", + new FlowControl.V1Alpha1.PriorityLevelConfiguration(id, obj!, opts) as KubernetesResource)) + }; + case "flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfigurationList": + return new[] + { + id.Apply(id => ($"flowcontrol.apiserver.k8s.io/v1alpha1/PriorityLevelConfigurationList::{id}", + new FlowControl.V1Alpha1.PriorityLevelConfigurationList(id, obj!, opts) as KubernetesResource)) + }; + case "v1/Status": + return new[] + { + id.Apply(id => ($"v1/Status::{id}", + new Meta.V1.Status(id, obj!, opts) as KubernetesResource)) + }; + case "networking.k8s.io/v1/NetworkPolicy": + return new[] + { + id.Apply(id => ($"networking.k8s.io/v1/NetworkPolicy::{id}", + new Networking.V1.NetworkPolicy(id, obj!, opts) as KubernetesResource)) + }; + case "networking.k8s.io/v1/NetworkPolicyList": + return new[] + { + id.Apply(id => ($"networking.k8s.io/v1/NetworkPolicyList::{id}", + new Networking.V1.NetworkPolicyList(id, obj!, opts) as KubernetesResource)) + }; + case "networking.k8s.io/v1beta1/Ingress": + return new[] + { + id.Apply(id => ($"networking.k8s.io/v1beta1/Ingress::{id}", + new Networking.V1Beta1.Ingress(id, obj!, opts) as KubernetesResource)) + }; + case "networking.k8s.io/v1beta1/IngressList": + return new[] + { + id.Apply(id => ($"networking.k8s.io/v1beta1/IngressList::{id}", + new Networking.V1Beta1.IngressList(id, obj!, opts) as KubernetesResource)) + }; + case "node.k8s.io/v1alpha1/RuntimeClass": + return new[] + { + id.Apply(id => ($"node.k8s.io/v1alpha1/RuntimeClass::{id}", + new Node.V1Alpha1.RuntimeClass(id, obj!, opts) as KubernetesResource)) + }; + case "node.k8s.io/v1alpha1/RuntimeClassList": + return new[] + { + id.Apply(id => ($"node.k8s.io/v1alpha1/RuntimeClassList::{id}", + new Node.V1Alpha1.RuntimeClassList(id, obj!, opts) as KubernetesResource)) + }; + case "node.k8s.io/v1beta1/RuntimeClass": + return new[] + { + id.Apply(id => ($"node.k8s.io/v1beta1/RuntimeClass::{id}", + new Node.V1Beta1.RuntimeClass(id, obj!, opts) as KubernetesResource)) + }; + case "node.k8s.io/v1beta1/RuntimeClassList": + return new[] + { + id.Apply(id => ($"node.k8s.io/v1beta1/RuntimeClassList::{id}", + new Node.V1Beta1.RuntimeClassList(id, obj!, opts) as KubernetesResource)) + }; + case "policy/v1beta1/PodDisruptionBudget": + return new[] + { + id.Apply(id => ($"policy/v1beta1/PodDisruptionBudget::{id}", + new Policy.V1Beta1.PodDisruptionBudget(id, obj!, opts) as KubernetesResource)) + }; + case "policy/v1beta1/PodDisruptionBudgetList": + return new[] + { + id.Apply(id => ($"policy/v1beta1/PodDisruptionBudgetList::{id}", + new Policy.V1Beta1.PodDisruptionBudgetList(id, obj!, opts) as KubernetesResource)) + }; + case "policy/v1beta1/PodSecurityPolicy": + return new[] + { + id.Apply(id => ($"policy/v1beta1/PodSecurityPolicy::{id}", + new Policy.V1Beta1.PodSecurityPolicy(id, obj!, opts) as KubernetesResource)) + }; + case "policy/v1beta1/PodSecurityPolicyList": + return new[] + { + id.Apply(id => ($"policy/v1beta1/PodSecurityPolicyList::{id}", + new Policy.V1Beta1.PodSecurityPolicyList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/ClusterRole": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/ClusterRole::{id}", + new Rbac.V1.ClusterRole(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/ClusterRoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/ClusterRoleBinding::{id}", + new Rbac.V1.ClusterRoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/ClusterRoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/ClusterRoleBindingList::{id}", + new Rbac.V1.ClusterRoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/ClusterRoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/ClusterRoleList::{id}", + new Rbac.V1.ClusterRoleList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/Role": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/Role::{id}", + new Rbac.V1.Role(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/RoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/RoleBinding::{id}", + new Rbac.V1.RoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/RoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/RoleBindingList::{id}", + new Rbac.V1.RoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1/RoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1/RoleList::{id}", + new Rbac.V1.RoleList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/ClusterRole": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/ClusterRole::{id}", + new Rbac.V1Alpha1.ClusterRole(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/ClusterRoleBinding::{id}", + new Rbac.V1Alpha1.ClusterRoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/ClusterRoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/ClusterRoleBindingList::{id}", + new Rbac.V1Alpha1.ClusterRoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/ClusterRoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/ClusterRoleList::{id}", + new Rbac.V1Alpha1.ClusterRoleList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/Role": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/Role::{id}", + new Rbac.V1Alpha1.Role(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/RoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/RoleBinding::{id}", + new Rbac.V1Alpha1.RoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/RoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/RoleBindingList::{id}", + new Rbac.V1Alpha1.RoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1alpha1/RoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1alpha1/RoleList::{id}", + new Rbac.V1Alpha1.RoleList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/ClusterRole": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/ClusterRole::{id}", + new Rbac.V1Beta1.ClusterRole(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/ClusterRoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/ClusterRoleBinding::{id}", + new Rbac.V1Beta1.ClusterRoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/ClusterRoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/ClusterRoleBindingList::{id}", + new Rbac.V1Beta1.ClusterRoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/ClusterRoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/ClusterRoleList::{id}", + new Rbac.V1Beta1.ClusterRoleList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/Role": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/Role::{id}", + new Rbac.V1Beta1.Role(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/RoleBinding": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/RoleBinding::{id}", + new Rbac.V1Beta1.RoleBinding(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/RoleBindingList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/RoleBindingList::{id}", + new Rbac.V1Beta1.RoleBindingList(id, obj!, opts) as KubernetesResource)) + }; + case "rbac.authorization.k8s.io/v1beta1/RoleList": + return new[] + { + id.Apply(id => ($"rbac.authorization.k8s.io/v1beta1/RoleList::{id}", + new Rbac.V1Beta1.RoleList(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1/PriorityClass": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1/PriorityClass::{id}", + new Scheduling.V1.PriorityClass(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1/PriorityClassList": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1/PriorityClassList::{id}", + new Scheduling.V1.PriorityClassList(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1alpha1/PriorityClass": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1alpha1/PriorityClass::{id}", + new Scheduling.V1Alpha1.PriorityClass(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1alpha1/PriorityClassList": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1alpha1/PriorityClassList::{id}", + new Scheduling.V1Alpha1.PriorityClassList(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1beta1/PriorityClass": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1beta1/PriorityClass::{id}", + new Scheduling.V1Beta1.PriorityClass(id, obj!, opts) as KubernetesResource)) + }; + case "scheduling.k8s.io/v1beta1/PriorityClassList": + return new[] + { + id.Apply(id => ($"scheduling.k8s.io/v1beta1/PriorityClassList::{id}", + new Scheduling.V1Beta1.PriorityClassList(id, obj!, opts) as KubernetesResource)) + }; + case "settings.k8s.io/v1alpha1/PodPreset": + return new[] + { + id.Apply(id => ($"settings.k8s.io/v1alpha1/PodPreset::{id}", + new Settings.V1Alpha1.PodPreset(id, obj!, opts) as KubernetesResource)) + }; + case "settings.k8s.io/v1alpha1/PodPresetList": + return new[] + { + id.Apply(id => ($"settings.k8s.io/v1alpha1/PodPresetList::{id}", + new Settings.V1Alpha1.PodPresetList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/CSINode": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/CSINode::{id}", + new Storage.V1.CSINode(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/CSINodeList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/CSINodeList::{id}", + new Storage.V1.CSINodeList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/StorageClass": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/StorageClass::{id}", + new Storage.V1.StorageClass(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/StorageClassList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/StorageClassList::{id}", + new Storage.V1.StorageClassList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/VolumeAttachment": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/VolumeAttachment::{id}", + new Storage.V1.VolumeAttachment(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1/VolumeAttachmentList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1/VolumeAttachmentList::{id}", + new Storage.V1.VolumeAttachmentList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1alpha1/VolumeAttachment": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1alpha1/VolumeAttachment::{id}", + new Storage.V1Alpha1.VolumeAttachment(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1alpha1/VolumeAttachmentList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1alpha1/VolumeAttachmentList::{id}", + new Storage.V1Alpha1.VolumeAttachmentList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/CSIDriver": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/CSIDriver::{id}", + new Storage.V1Beta1.CSIDriver(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/CSIDriverList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/CSIDriverList::{id}", + new Storage.V1Beta1.CSIDriverList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/CSINode": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/CSINode::{id}", + new Storage.V1Beta1.CSINode(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/CSINodeList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/CSINodeList::{id}", + new Storage.V1Beta1.CSINodeList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/StorageClass": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/StorageClass::{id}", + new Storage.V1Beta1.StorageClass(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/StorageClassList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/StorageClassList::{id}", + new Storage.V1Beta1.StorageClassList(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/VolumeAttachment": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/VolumeAttachment::{id}", + new Storage.V1Beta1.VolumeAttachment(id, obj!, opts) as KubernetesResource)) + }; + case "storage.k8s.io/v1beta1/VolumeAttachmentList": + return new[] + { + id.Apply(id => ($"storage.k8s.io/v1beta1/VolumeAttachmentList::{id}", + new Storage.V1Beta1.VolumeAttachmentList(id, obj!, opts) as KubernetesResource)) + }; + default: + return new[] + { + id.Apply(id => ($"{apiVersion}/{kind}::{id}", + new ApiExtensions.V1.CustomResourceDefinition(id, obj!, opts) as KubernetesResource)) + }; + } + } + } + + internal class ParseArgs + { + /// + /// Objects representing Kubernetes resources. + /// + public InputList> Objs { get; set; } = null!; + + /// + /// A set of transformations to apply to Kubernetes resource definitions before registering + /// with engine. + /// + public TransformationAction[]? Transformations { get; set; } + + /// + /// An optional prefix for the auto-generated resource names. + /// Example: A resource created with resourcePrefix="foo" would produce a resource named "foo-resourceName". + /// + public string? ResourcePrefix { get; set; } + } +} diff --git a/tests/integration/dotnet/.gitignore b/tests/integration/dotnet/.gitignore new file mode 100644 index 0000000000..4b66e04a29 --- /dev/null +++ b/tests/integration/dotnet/.gitignore @@ -0,0 +1,2 @@ +/basic/obj +/bin diff --git a/tests/integration/dotnet/basic/.gitignore b/tests/integration/dotnet/basic/.gitignore deleted file mode 100644 index 545e45f28a..0000000000 --- a/tests/integration/dotnet/basic/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/obj -/bin \ No newline at end of file diff --git a/tests/integration/dotnet/basic/Basic.csproj b/tests/integration/dotnet/basic/Basic.csproj index 61be784037..9acff6d2af 100644 --- a/tests/integration/dotnet/basic/Basic.csproj +++ b/tests/integration/dotnet/basic/Basic.csproj @@ -2,11 +2,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 - - - - diff --git a/tests/integration/dotnet/dotnet_test.go b/tests/integration/dotnet/dotnet_test.go index d841baefec..a74ba74f3f 100644 --- a/tests/integration/dotnet/dotnet_test.go +++ b/tests/integration/dotnet/dotnet_test.go @@ -15,6 +15,9 @@ package ints import ( + "github.com/pulumi/pulumi/pkg/resource" + "github.com/pulumi/pulumi/pkg/tokens" + "github.com/stretchr/testify/assert" "os" "testing" @@ -50,3 +53,107 @@ func TestDotnet_Guestbook(t *testing.T) { Quick: true, }) } + +func TestDotnet_YamlUrl(t *testing.T) { + kubectx := os.Getenv("KUBERNETES_CONTEXT") + + if kubectx == "" { + t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable") + } + + integration.ProgramTest(t, &integration.ProgramTestOptions{ + Dir: "yaml-url", + Dependencies: []string{"Pulumi.Kubernetes"}, + Quick: true, + ExtraRuntimeValidation: func( + t *testing.T, stackInfo integration.RuntimeValidationStackInfo, + ) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 18, len(stackInfo.Deployment.Resources)) + }, + }) +} + +func TestDotnet_YamlLocal(t *testing.T) { + kubectx := os.Getenv("KUBERNETES_CONTEXT") + + if kubectx == "" { + t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable") + } + + integration.ProgramTest(t, &integration.ProgramTestOptions{ + Dir: "yaml-local", + Dependencies: []string{"Pulumi.Kubernetes"}, + Quick: true, + ExtraRuntimeValidation: func( + t *testing.T, stackInfo integration.RuntimeValidationStackInfo, + ) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 7, len(stackInfo.Deployment.Resources)) + }, + }) +} + +func TestDotnet_Helm(t *testing.T) { + kubectx := os.Getenv("KUBERNETES_CONTEXT") + + if kubectx == "" { + t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable") + } + + integration.ProgramTest(t, &integration.ProgramTestOptions{ + Dir: "helm", + Dependencies: []string{"Pulumi.Kubernetes"}, + Quick: true, + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + // Ensure that all `Services` have `status` marked as a `Secret` + for _, res := range stackInfo.Deployment.Resources { + if res.Type == tokens.Type("kubernetes:core/v1:Service") { + spec, has := res.Outputs["status"] + assert.True(t, has) + specMap, is := spec.(map[string]interface{}) + assert.True(t, is) + sigKey, has := specMap[resource.SigKey] + assert.True(t, has) + assert.Equal(t, resource.SecretSig, sigKey) + } + } + }, + }) +} + +func TestDotnet_HelmLocal(t *testing.T) { + kubectx := os.Getenv("KUBERNETES_CONTEXT") + + if kubectx == "" { + t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable") + } + + integration.ProgramTest(t, &integration.ProgramTestOptions{ + Dir: "helm-local", + Dependencies: []string{"Pulumi.Kubernetes"}, + Quick: true, + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 15, len(stackInfo.Deployment.Resources)) + }, + }) +} + +func TestDotnet_HelmApiVersions(t *testing.T) { + kubectx := os.Getenv("KUBERNETES_CONTEXT") + + if kubectx == "" { + t.Skipf("Skipping test due to missing KUBERNETES_CONTEXT variable") + } + + integration.ProgramTest(t, &integration.ProgramTestOptions{ + Dir: "helm-api-versions", + Dependencies: []string{"Pulumi.Kubernetes"}, + Quick: true, + ExtraRuntimeValidation: func(t *testing.T, stackInfo integration.RuntimeValidationStackInfo) { + assert.NotNil(t, stackInfo.Deployment) + assert.Equal(t, 6, len(stackInfo.Deployment.Resources)) + }, + }) +} diff --git a/tests/integration/dotnet/guestbook/.gitignore b/tests/integration/dotnet/guestbook/.gitignore deleted file mode 100644 index 545e45f28a..0000000000 --- a/tests/integration/dotnet/guestbook/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/obj -/bin \ No newline at end of file diff --git a/tests/integration/dotnet/guestbook/Guestbook.csproj b/tests/integration/dotnet/guestbook/Guestbook.csproj index f6d3f14430..9acff6d2af 100644 --- a/tests/integration/dotnet/guestbook/Guestbook.csproj +++ b/tests/integration/dotnet/guestbook/Guestbook.csproj @@ -2,11 +2,7 @@ Exe - netcoreapp3.0 + netcoreapp3.1 - - - - diff --git a/tests/integration/dotnet/helm-api-versions/HelmApiVersions.csproj b/tests/integration/dotnet/helm-api-versions/HelmApiVersions.csproj new file mode 100644 index 0000000000..9acff6d2af --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/HelmApiVersions.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/tests/integration/dotnet/helm-api-versions/Program.cs b/tests/integration/dotnet/helm-api-versions/Program.cs new file mode 100644 index 0000000000..9ca0e90b18 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/Program.cs @@ -0,0 +1,41 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Core.V1; +using Pulumi.Kubernetes.Helm; +using Pulumi.Kubernetes.Helm.V2; +using Pulumi.Kubernetes.Types.Inputs.Core.V1; +using Pulumi.Kubernetes.Yaml; +using Pulumi.Serialization; + +class HelmStack : Stack +{ + public HelmStack() + { + var namespaceTest = new Namespace("test"); + var namespaceName = namespaceTest.Metadata.Apply(n => n.Name); + + new Chart("api-versions", new LocalChartArgs + { + ApiVersions = { "foo", "bar" }, + Namespace = namespaceName, + Path = "helm-api-versions" + }); + + new Chart("single-api-version", new LocalChartArgs + { + ApiVersions = { "foo" }, + Namespace = namespaceName, + Path = "helm-single-api-version" + }); + } +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/integration/dotnet/helm-api-versions/Pulumi.yaml b/tests/integration/dotnet/helm-api-versions/Pulumi.yaml new file mode 100644 index 0000000000..511e05bb09 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-apiversions +description: Deploys a simple Helm chart with .Capabilities.ApiVersions conditional +runtime: dotnet diff --git a/tests/integration/dotnet/helm-api-versions/helm-api-versions/.helmignore b/tests/integration/dotnet/helm-api-versions/helm-api-versions/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-api-versions/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/integration/dotnet/helm-api-versions/helm-api-versions/Chart.yaml b/tests/integration/dotnet/helm-api-versions/helm-api-versions/Chart.yaml new file mode 100755 index 0000000000..f76f922aa7 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-api-versions/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test .Capabilities.APIVersions +name: apiversions-test +version: 0.0.1 diff --git a/tests/integration/dotnet/helm-api-versions/helm-api-versions/templates/test-pod.yaml b/tests/integration/dotnet/helm-api-versions/helm-api-versions/templates/test-pod.yaml new file mode 100755 index 0000000000..ab1da69a75 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-api-versions/templates/test-pod.yaml @@ -0,0 +1,11 @@ +{{- if and ( .Capabilities.APIVersions.Has "foo" ) ( .Capabilities.APIVersions.Has "bar") }} +apiVersion: v1 +kind: Pod +metadata: + name: api-versions-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: api-versions-test + image: nginx +{{- end }} diff --git a/tests/integration/dotnet/helm-api-versions/helm-api-versions/values.yaml b/tests/integration/dotnet/helm-api-versions/helm-api-versions/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/integration/dotnet/helm-api-versions/helm-single-api-version/.helmignore b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/integration/dotnet/helm-api-versions/helm-single-api-version/Chart.yaml b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/Chart.yaml new file mode 100755 index 0000000000..f76f922aa7 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/Chart.yaml @@ -0,0 +1,4 @@ +deprecated: true +description: Chart to test .Capabilities.APIVersions +name: apiversions-test +version: 0.0.1 diff --git a/tests/integration/dotnet/helm-api-versions/helm-single-api-version/templates/test-pod.yaml b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/templates/test-pod.yaml new file mode 100755 index 0000000000..220f9be9e6 --- /dev/null +++ b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/templates/test-pod.yaml @@ -0,0 +1,11 @@ +{{- if and ( .Capabilities.APIVersions.Has "foo" ) }} +apiVersion: v1 +kind: Pod +metadata: + name: single-api-version-test + namespace: {{ .Release.Namespace }} +spec: + containers: + - name: single-api-version-test + image: nginx +{{- end }} diff --git a/tests/integration/dotnet/helm-api-versions/helm-single-api-version/values.yaml b/tests/integration/dotnet/helm-api-versions/helm-single-api-version/values.yaml new file mode 100755 index 0000000000..e69de29bb2 diff --git a/tests/integration/dotnet/helm-local/HelmLocal.csproj b/tests/integration/dotnet/helm-local/HelmLocal.csproj new file mode 100644 index 0000000000..ec09cd7805 --- /dev/null +++ b/tests/integration/dotnet/helm-local/HelmLocal.csproj @@ -0,0 +1,9 @@ + + + + Exe + netcoreapp3.1 + HelmLocal + + + diff --git a/tests/integration/dotnet/helm-local/Program.cs b/tests/integration/dotnet/helm-local/Program.cs new file mode 100644 index 0000000000..a40719a539 --- /dev/null +++ b/tests/integration/dotnet/helm-local/Program.cs @@ -0,0 +1,93 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Core.V1; +using Pulumi.Kubernetes.Helm; +using Pulumi.Kubernetes.Helm.V2; +using Pulumi.Kubernetes.Types.Inputs.Core.V1; +using Pulumi.Kubernetes.Yaml; +using Pulumi.Serialization; + +class HelmStack : Stack +{ + public HelmStack() + { + var namespaceTest = new Namespace("test"); + var namespaceName = namespaceTest.Metadata.Apply(n => n.Name); + + var nginx = CreateChart(namespaceName); + + // Export the (cluster-private) IP address of the Guestbook frontend. + var frontendServiceSpec = namespaceName.Apply(nsName => + nginx.GetResource("simple-nginx-nginx-lego", nsName).Apply(s => s.Spec)); + this.FrontendServiceIP = frontendServiceSpec.Apply(p => p.ClusterIP); + + // Deploy a duplicate chart with a different resource prefix to verify that multiple instances of the Chart + // can be managed in the same stack. + CreateChart(namespaceName, "dup"); + } + + private static Chart CreateChart(Output namespaceName, string? resourcePrefix = null) + { + return new Chart("simple-nginx", new LocalChartArgs + { + Path = "nginx-lego", + Namespace = namespaceName, + ResourcePrefix = resourcePrefix, + Values = + { + // Override for the Chart's `values.yml` file. Use `null` to zero out resource requests so it + // can be scheduled on our (wimpy) CI cluster. (Setting these values to `null` is the "normal" + // way to delete values.) + { "nginx", new { resources = (Array)null } }, + { "default", new { resources = (Array)null } }, + { "lego", new { resources = (Array)null } } + }, + Transformations = new Func, CustomResourceOptions, ImmutableDictionary>[] + { + LoadBalancerToClusterIP, + StatusToSecret + } + }); + + // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of + // LoadBalancer. + ImmutableDictionary LoadBalancerToClusterIP(ImmutableDictionary obj, CustomResourceOptions opts) + { + if ((string)obj["kind"] == "Service" && (string)obj["apiVersion"] == "v1") + { + var spec = (ImmutableDictionary) obj["spec"]; + if (spec != null && (string) spec["type"] == "LoadBalancer") + { + return obj.SetItem("spec", spec.SetItem("type", "ClusterIP")); + } + } + + return obj; + } + + // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of + // LoadBalancer. + ImmutableDictionary StatusToSecret(ImmutableDictionary obj, CustomResourceOptions opts) + { + if ((string)obj["kind"] == "Service" && (string)obj["apiVersion"] == "v1") + { + opts.AdditionalSecretOutputs = new List { "status" }; + } + + return obj; + } + } + + [Output] + public Output FrontendServiceIP { get; set; } +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/integration/dotnet/helm-local/Pulumi.yaml b/tests/integration/dotnet/helm-local/Pulumi.yaml new file mode 100644 index 0000000000..d2c3e8da14 --- /dev/null +++ b/tests/integration/dotnet/helm-local/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet-helm-local +description: Deploys a simple Helm chart to Kubernetes, from local disk. +runtime: dotnet diff --git a/tests/integration/dotnet/helm-local/nginx-lego/.helmignore b/tests/integration/dotnet/helm-local/nginx-lego/.helmignore new file mode 100755 index 0000000000..f0c1319444 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/tests/integration/dotnet/helm-local/nginx-lego/Chart.yaml b/tests/integration/dotnet/helm-local/nginx-lego/Chart.yaml new file mode 100755 index 0000000000..04d6690afa --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/Chart.yaml @@ -0,0 +1,16 @@ +deprecated: true +description: Chart for nginx-ingress-controller and kube-lego +engine: gotpl +keywords: +- kube-lego +- nginx-ingress-controller +- nginx +- letsencrypt +maintainers: +- email: jack.zampolin@gmail.com + name: Jack Zampolin +name: nginx-lego +sources: +- https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx +- https://github.com/jetstack/kube-lego/tree/master/examples/nginx +version: 0.3.1 diff --git a/tests/integration/dotnet/helm-local/nginx-lego/README.md b/tests/integration/dotnet/helm-local/nginx-lego/README.md new file mode 100755 index 0000000000..e8e3429190 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/README.md @@ -0,0 +1,82 @@ +# nginx-lego + +**This chart has been deprecated as of version 0.2.1 and will not be updated. Please use the nginx-ingress and (optional) kube-lego charts instead.** + +[nginx-lego](https://github.com/jetstack/kube-lego/tree/master/examples/nginx) is a chart for an [`nginx` ingress](https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx) with optional support for automatically generating `SSL` cert for the managed routes. + +To use this ingress contoller add the following annotations to the `ingress` resources you would like to route through it: + +```yaml +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + namespace: foo + annotations: + # Add to route through the nginx service + kubernetes.io/ingress.class: nginx + # Add to generate certificates for this ingress + kubernetes.io/tls-acme: "true" +spec: + tls: + # With this configuration kube-lego will generate a secret in namespace foo called `example-tls` + # for the URL `www.example.com` + - hosts: + - "www.example.com" + secretName: example-tls +``` + +## TL;DR; + +```bash +$ helm install stable/kube-lego +``` + +## Introduction + +This chart bootstraps an nginx-lego deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +## Prerequisites + +- Kubernetes 1.4+ with Beta APIs enabled + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```bash +$ helm install --name my-release stable/nginx-lego +``` + +The command deploys nginx-lego on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. + +> **Tip**: List all releases using `helm list` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```bash +$ helm delete my-release +``` + +The command removes all the Kubernetes components associated with the chart and deletes the release. + +## Configuration + +See `values.yaml` for configuration notes. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```bash +$ helm install --name my-release \ + --set lego.enabled=false \ + stable/nginx-lego +``` + +Installs the chart without kube-lego and the ability to generate certs. + +Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, + +```bash +$ helm install --name my-release -f values.yaml stable/nginx-lego +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/NOTES.txt b/tests/integration/dotnet/helm-local/nginx-lego/templates/NOTES.txt new file mode 100755 index 0000000000..3b57244996 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/NOTES.txt @@ -0,0 +1,37 @@ +################################################################################ +#### This chart has been deprecated as of version 0.2.1 and will not be updated. +#### Please use the nginx-ingress and (optional) kube-lego charts instead. +################################################################################ + +This chart runs an nginx-ingress-controller {{- if .Values.lego.enabled }} and kube-lego {{- end }} adding the ability to use ingress resources to route in your cluster {{- if .Values.lego.enabled -}} as well as optionally generating SSL certs for you {{- end -}}. + +EXAMPLE INGRESS YAML: + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + namespace: foo + annotations: + # Add to route through the nginx service + kubernetes.io/ingress.class: nginx +{{- if .Values.lego.enabled }} + # Add to generate certificates for this ingress + kubernetes.io/tls-acme: "true" +{{- end }} +spec: + rules: + - host: www.example.com + http: + paths: + - backend: + serviceName: exampleService + servicePort: 80 + path: / +{{- if .Values.lego.enabled }} + tls: + # With this configuration kube-lego will generate a secret in namespace foo called `example-tls` + # for the URL `www.example.com` + - hosts: + - "www.example.com" + secretName: example-tls +{{- end }} diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/_helpers.tpl b/tests/integration/dotnet/helm-local/nginx-lego/templates/_helpers.tpl new file mode 100755 index 0000000000..895e6444d6 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/_helpers.tpl @@ -0,0 +1,16 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "nginx-lego.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 24 -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "nginx-lego.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 24 -}} +{{- end -}} diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/default-deployment.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/default-deployment.yaml new file mode 100755 index 0000000000..e09c011391 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/default-deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "nginx-lego.fullname" . }}-default-backend + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + replicas: {{ .Values.default.replicaCount }} + template: + metadata: + labels: + app: {{ template "nginx-lego.fullname" . }}-default-backend + spec: + containers: + - name: {{ template "nginx-lego.fullname" . }}-default-backend + image: "{{ .Values.default.image.repository }}:{{ .Values.default.image.tag }}" + imagePullPolicy: {{ .Values.default.image.pullPolicy | quote }} + ports: + - containerPort: 8080 + resources: +{{ toYaml .Values.default.resources | indent 10 }} \ No newline at end of file diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/default-service.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/default-service.yaml new file mode 100755 index 0000000000..890d7a51d4 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/default-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "nginx-lego.fullname" . }}-default-backend + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 8080 + selector: + app: {{ template "nginx-lego.fullname" . }}-default-backend diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-configmap.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-configmap.yaml new file mode 100755 index 0000000000..98d336c3e8 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-configmap.yaml @@ -0,0 +1,11 @@ +{{- if .Values.lego.enabled }} +apiVersion: v1 +metadata: + name: {{ template "nginx-lego.fullname" . }}-lego +data: + # modify this to specify your address + lego.email: {{ .Values.lego.configmap.email | quote }} + # configure letencrypt's production api + lego.url: {{ .Values.lego.configmap.url | quote }} +kind: ConfigMap +{{- end }} diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-deployment.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-deployment.yaml new file mode 100755 index 0000000000..987360d9bf --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/lego-deployment.yaml @@ -0,0 +1,40 @@ +{{- if .Values.lego.enabled }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "nginx-lego.fullname" . }}-lego +spec: + replicas: {{ .Values.lego.replicaCount }} + template: + metadata: + labels: + app: kube-lego + spec: + containers: + - name: {{ .Chart.Name }}-lego + image: "{{ .Values.lego.image.repository }}:{{ .Values.lego.image.tag }}" + imagePullPolicy: {{ .Values.lego.image.pullPolicy }} + ports: + - containerPort: 8080 + env: + - name: LEGO_EMAIL + valueFrom: + configMapKeyRef: + name: {{ template "nginx-lego.fullname" . }}-lego + key: lego.email + - name: LEGO_URL + valueFrom: + configMapKeyRef: + name: {{ template "nginx-lego.fullname" . }}-lego + key: lego.url + - name: LEGO_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: LEGO_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + resources: +{{ toYaml .Values.nginx.resources | indent 10 }} +{{- end }} diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-configmap.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-configmap.yaml new file mode 100755 index 0000000000..e0af8c0262 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-configmap.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +data: + proxy-connect-timeout: {{ .Values.nginx.configmap.proxy_connect_timeout | quote }} + proxy-read-timeout: {{ .Values.nginx.configmap.proxy_read_timeout | quote }} + proxy-send-imeout: {{ .Values.nginx.configmap.proxy_send_imeout | quote }} + hsts-include-subdomains: {{ .Values.nginx.configmap.hsts_include_subdomains | quote }} + body-size: {{ .Values.nginx.configmap.body_size | quote }} + server-name-hash-bucket-size: {{ .Values.nginx.configmap.server_name_hash_bucket_size | quote }} + enable-vts-status: {{ .Values.nginx.configmap.enable_vts_status | quote }} +kind: ConfigMap +metadata: + name: {{ template "nginx-lego.fullname" . }} diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-deployment.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-deployment.yaml new file mode 100755 index 0000000000..e673940dd7 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "nginx-lego.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + replicas: {{ .Values.nginx.replicaCount }} + template: + metadata: + labels: + app: {{ template "nginx-lego.fullname" . }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.nginx.image.repository }}:{{ .Values.nginx.image.tag }}" + imagePullPolicy: {{ .Values.nginx.image.pullPolicy }} + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + ports: + - containerPort: 80 + - containerPort: 443 +{{- if .Values.nginx.monitoring }} + - containerPort: 8080 +{{- end }} + resources: +{{ toYaml .Values.nginx.resources | indent 10 }} + args: + - /nginx-ingress-controller + - --default-backend-service={{ .Release.Namespace }}/{{ template "nginx-lego.fullname" . }}-default-backend + - --nginx-configmap={{ .Release.Namespace }}/{{ template "nginx-lego.fullname" . }} \ No newline at end of file diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-monitoring.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-monitoring.yaml new file mode 100755 index 0000000000..2d6b40cb90 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-monitoring.yaml @@ -0,0 +1,15 @@ +{{- if .Values.nginx.monitoring }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "nginx-lego.fullname" . }}-monitoring + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + type: ClusterIP + ports: + - port: 18080 + name: vts-stats + selector: + app: {{ template "nginx-lego.fullname" . }} +{{- end }} \ No newline at end of file diff --git a/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-service.yaml b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-service.yaml new file mode 100755 index 0000000000..07850cd0a9 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/templates/nginx-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "nginx-lego.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + type: {{ .Values.nginx.service.type | quote }} + ports: + - port: 80 + name: http + - port: 443 + name: https + selector: + app: {{ template "nginx-lego.fullname" . }} \ No newline at end of file diff --git a/tests/integration/dotnet/helm-local/nginx-lego/values.yaml b/tests/integration/dotnet/helm-local/nginx-lego/values.yaml new file mode 100755 index 0000000000..5aebcbf527 --- /dev/null +++ b/tests/integration/dotnet/helm-local/nginx-lego/values.yaml @@ -0,0 +1,73 @@ +## nginx-lego spins up a scalable ingress provider that can also provision SSL certs +## See https://github.com/jetstack/kube-lego/tree/master/examples/nginx for more information on implementation + +## Nginx configuration +## ref: https://github.com/kubernetes/contrib/tree/master/ingress/controllers/nginx#automated-certificate-management-with-kube-lego +## +nginx: + replicaCount: 1 + image: + repository: k8s.gcr.io/nginx-ingress-controller + tag: "0.8.3" + pullPolicy: IfNotPresent + service: + type: LoadBalancer + monitoring: false + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 128Mi + configmap: + proxy_connect_timeout: "30" + proxy_read_timeout: "600" + proxy_send_imeout: "600" + hsts_include_subdomains: "false" + body_size: "64m" + server_name_hash_bucket_size: "256" + # TODO: figure out how to expose `{nginx_addr}:8080/nginx_status`, on existing service or create new one? + enable_vts_status: "false" + +## Default Backend configuration +## To run a different 404 page for the managed domains please see the documentation below +## ref: https://github.com/kubernetes/contrib/tree/master/404-server +## +default: + replicaCount: 1 + image: + repository: k8s.gcr.io/defaultbackend + tag: "1.0" + pullPolicy: IfNotPresent + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 128Mi + +## kube-lego configuration +## ref: https://github.com/jetstack/kube-lego +## +lego: + enabled: false + replicaCount: 1 + image: + repository: jetstack/kube-lego + tag: "0.1.3" + pullPolicy: IfNotPresent + configmap: + email: "my@email.tld" + # Production Let's Encrypt server + # url: "https://acme-v01.api.letsencrypt.org/directory" + # Test Let's Encrypt server + url: "https://acme-staging.api.letsencrypt.org/directory " + resources: + limits: + cpu: 1 + memory: 2Gi + requests: + cpu: 1 + memory: 128Mi diff --git a/tests/integration/dotnet/helm/Helm.csproj b/tests/integration/dotnet/helm/Helm.csproj new file mode 100644 index 0000000000..9acff6d2af --- /dev/null +++ b/tests/integration/dotnet/helm/Helm.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/tests/integration/dotnet/helm/Program.cs b/tests/integration/dotnet/helm/Program.cs new file mode 100644 index 0000000000..fd93fbaf7d --- /dev/null +++ b/tests/integration/dotnet/helm/Program.cs @@ -0,0 +1,111 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Core.V1; +using Pulumi.Kubernetes.Helm; +using Pulumi.Kubernetes.Helm.V2; +using Pulumi.Kubernetes.Types.Inputs.Core.V1; +using Pulumi.Kubernetes.Yaml; +using Pulumi.Serialization; + +class HelmStack : Stack +{ + public HelmStack() + { + var namespaceTest = new Namespace("test"); + var namespaceName = namespaceTest.Metadata.Apply(n => n.Name); + + var nginx = new Chart("simple-nginx", new ChartArgs + { + // Represents chart `stable/nginx-lego@v0.3.1`. + Repo = "stable", + Chart = "nginx-lego", + Version = "0.3.1", + Namespace = namespaceName, + Values = + { + // Override for the Chart's `values.yml` file. Use `null` to zero out resource requests so it + // can be scheduled on our (wimpy) CI cluster. (Setting these values to `null` is the "normal" + // way to delete values.) + { "nginx", new { resources = (Array)null } }, + { "default", new { resources = (Array)null } }, + { "lego", new { resources = (Array)null } } + }, + Transformations = new Func, CustomResourceOptions, ImmutableDictionary>[] + { + LoadBalancerToClusterIP, + StatusToSecret + } + }); + + // Export the (cluster-private) IP address of the Guestbook frontend. + var frontendServiceSpec = namespaceName.Apply(nsName => + nginx.GetResource("simple-nginx-nginx-lego", nsName).Apply(s => s.Spec)); + this.FrontendServiceIP = frontendServiceSpec.Apply(p => p.ClusterIP); + + // Test a variety of other inputs on a chart that creates no resources. + var empty1 = new Chart("empty1", new ChartArgs + { + Chart = "https://kubernetes-charts-incubator.storage.googleapis.com/raw-0.1.0.tgz" + }); + + var empty2 = new Chart("empty2", new ChartArgs + { + Chart = "raw", + Version = "0.1.0", + FetchOptions = new ChartFetchArgs + { + Repo = "https://kubernetes-charts-incubator.storage.googleapis.com/" + } + }); + + var empty3 = new Chart("empty3", new ChartArgs + { + Chart = "raw", + FetchOptions = new ChartFetchArgs + { + Repo = "https://kubernetes-charts-incubator.storage.googleapis.com/" + } + }); + + // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of + // LoadBalancer. + ImmutableDictionary LoadBalancerToClusterIP(ImmutableDictionary obj, CustomResourceOptions opts) + { + if ((string)obj["kind"] == "Service" && (string)obj["apiVersion"] == "v1") + { + var spec = (ImmutableDictionary) obj["spec"]; + if (spec != null && (string) spec["type"] == "LoadBalancer") + { + return obj.SetItem("spec", spec.SetItem("type", "ClusterIP")); + } + } + + return obj; + } + + // Make every service private to the cluster, i.e., turn all services into ClusterIP instead of + // LoadBalancer. + ImmutableDictionary StatusToSecret(ImmutableDictionary obj, CustomResourceOptions opts) + { + if ((string)obj["kind"] == "Service" && (string)obj["apiVersion"] == "v1") + { + opts.AdditionalSecretOutputs = new List { "status" }; + } + + return obj; + } + } + + [Output] + public Output FrontendServiceIP { get; set; } +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/integration/dotnet/helm/Pulumi.yaml b/tests/integration/dotnet/helm/Pulumi.yaml new file mode 100644 index 0000000000..9f1597114f --- /dev/null +++ b/tests/integration/dotnet/helm/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet_helm +description: A test of a Helm charts in .NET. +runtime: dotnet diff --git a/tests/integration/dotnet/yaml-local/Program.cs b/tests/integration/dotnet/yaml-local/Program.cs new file mode 100644 index 0000000000..854de9979f --- /dev/null +++ b/tests/integration/dotnet/yaml-local/Program.cs @@ -0,0 +1,23 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Yaml; + +class YamlStack : Stack +{ + public YamlStack() + { + var files = new ConfigGroup("files", new ConfigGroupArgs + { + Files = new[] {"app-*.yaml"} + }); + } + +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/integration/dotnet/yaml-local/Pulumi.yaml b/tests/integration/dotnet/yaml-local/Pulumi.yaml new file mode 100644 index 0000000000..d5773bfbc6 --- /dev/null +++ b/tests/integration/dotnet/yaml-local/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet_yaml_local +description: A test of ConfigGroup parsing YAML files. +runtime: dotnet diff --git a/tests/integration/dotnet/yaml-local/YamlLocal.csproj b/tests/integration/dotnet/yaml-local/YamlLocal.csproj new file mode 100644 index 0000000000..9acff6d2af --- /dev/null +++ b/tests/integration/dotnet/yaml-local/YamlLocal.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/tests/integration/dotnet/yaml-local/app-frontend.yaml b/tests/integration/dotnet/yaml-local/app-frontend.yaml new file mode 100644 index 0000000000..e3e3468ec4 --- /dev/null +++ b/tests/integration/dotnet/yaml-local/app-frontend.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Pod +metadata: + name: rss-site + labels: + app: web +spec: + containers: + - name: front-end + image: nginx + ports: + - containerPort: 80 diff --git a/tests/integration/dotnet/yaml-local/app-redis.yaml b/tests/integration/dotnet/yaml-local/app-redis.yaml new file mode 100644 index 0000000000..7444e06887 --- /dev/null +++ b/tests/integration/dotnet/yaml-local/app-redis.yaml @@ -0,0 +1,27 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis-master +spec: + selector: + matchLabels: + app: redis + role: master + tier: backend + replicas: 1 + template: + metadata: + labels: + app: redis + role: master + tier: backend + spec: + containers: + - name: master + image: redis + resources: + requests: + cpu: 100m + memory: 100Mi + ports: + - containerPort: 6379 diff --git a/tests/integration/dotnet/yaml-url/Program.cs b/tests/integration/dotnet/yaml-url/Program.cs new file mode 100644 index 0000000000..3709fbf7f6 --- /dev/null +++ b/tests/integration/dotnet/yaml-url/Program.cs @@ -0,0 +1,50 @@ +// Copyright 2016-2020, Pulumi Corporation. All rights reserved. + +using System; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi; +using Pulumi.Kubernetes.Core.V1; +using Pulumi.Kubernetes.Types.Inputs.Core.V1; +using Pulumi.Kubernetes.Yaml; + +class YamlStack : Stack +{ + public YamlStack() + { + // Create two test namespaces to allow test parallelism. + var namespace1 = new Namespace("test-namespace", new NamespaceArgs()); + var namespace2 = new Namespace("test-namespace2", new NamespaceArgs()); + + // Create resources from standard Kubernetes guestbook YAML example in the first test namespace. + namespace1.Metadata.Apply(m => m.Name).Apply(ns => MakeConfigFile("guestbook", ns)); + + // Create resources from standard Kubernetes guestbook YAML example in the second test namespace. + // Disambiguate resource names with a specified prefix. + namespace2.Metadata.Apply(m => m.Name).Apply(ns => MakeConfigFile("guestbook", ns, "dup")); + } + + private ConfigFile MakeConfigFile(string name, string namespaceName, string? resourcePrefix = null) + { + return new ConfigFile(name, new ConfigFileArgs + { + File = "https://raw.githubusercontent.com/pulumi/pulumi-kubernetes/master/tests/examples/yaml-guestbook/yaml/guestbook.yaml", + ResourcePrefix = resourcePrefix, + Transformations = new Func, CustomResourceOptions, ImmutableDictionary>[] { AddNamespace } + }); + + ImmutableDictionary AddNamespace(ImmutableDictionary obj, CustomResourceOptions opts) + { + var result = obj ?? ImmutableDictionary.Empty; + var meta = (obj["metadata"] as ImmutableDictionary) ?? + ImmutableDictionary.Empty; + var newMeta = meta.SetItem("namespace", namespaceName); + return result.SetItem("metadata", newMeta); + } + } +} + +class Program +{ + static Task Main(string[] args) => Deployment.RunAsync(); +} diff --git a/tests/integration/dotnet/yaml-url/Pulumi.yaml b/tests/integration/dotnet/yaml-url/Pulumi.yaml new file mode 100644 index 0000000000..692bfbdbe8 --- /dev/null +++ b/tests/integration/dotnet/yaml-url/Pulumi.yaml @@ -0,0 +1,3 @@ +name: dotnet_yaml_url +description: A test of a ConfigFile parsing YAML from a URL. +runtime: dotnet diff --git a/tests/integration/dotnet/yaml-url/YamlUrl.csproj b/tests/integration/dotnet/yaml-url/YamlUrl.csproj new file mode 100644 index 0000000000..5635c9dce4 --- /dev/null +++ b/tests/integration/dotnet/yaml-url/YamlUrl.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.0 + + +