diff --git a/sdk/dotnet/GetSensorUpdatePolicyBuilds.cs b/sdk/dotnet/GetSensorUpdatePolicyBuilds.cs index 4f0c2ec..2d98e66 100644 --- a/sdk/dotnet/GetSensorUpdatePolicyBuilds.cs +++ b/sdk/dotnet/GetSensorUpdatePolicyBuilds.cs @@ -81,6 +81,41 @@ public static Task InvokeAsync(InvokeOptions? /// public static Output Invoke(InvokeOptions? options = null) => global::Pulumi.Deployment.Instance.Invoke("crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds", InvokeArgs.Empty, options.WithDefaults()); + + /// + /// This data source provides information about the latest sensor builds for each platform. + /// + /// ## API Scopes + /// + /// The following API scopes are required: + /// + /// - Sensor update policies | Write + /// + /// + /// ## Example Usage + /// + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Crowdstrike = Pulumi.Crowdstrike; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var builds = Crowdstrike.GetSensorUpdatePolicyBuilds.Invoke(); + /// + /// return new Dictionary<string, object?> + /// { + /// ["latestWindowsBuild"] = builds.Apply(getSensorUpdatePolicyBuildsResult => getSensorUpdatePolicyBuildsResult.Windows?.Latest), + /// ["n1LinuxBuild"] = builds.Apply(getSensorUpdatePolicyBuildsResult => getSensorUpdatePolicyBuildsResult.Linux?.N1), + /// ["n2MacBuild"] = builds.Apply(getSensorUpdatePolicyBuildsResult => getSensorUpdatePolicyBuildsResult.Mac?.N2), + /// ["latestLinuxArm64Build"] = builds.Apply(getSensorUpdatePolicyBuildsResult => getSensorUpdatePolicyBuildsResult.LinuxArm64?.Latest), + /// }; + /// }); + /// ``` + /// + public static Output Invoke(InvokeOutputOptions options) + => global::Pulumi.Deployment.Instance.Invoke("crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds", InvokeArgs.Empty, options.WithDefaults()); } diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index b567132..da22f5e 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -57,6 +57,14 @@ static class Utilities return dst; } + public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src) + { + var dst = src ?? new global::Pulumi.InvokeOutputOptions{}; + dst.Version = src?.Version ?? Version; + dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github://api.github.com/crowdstrike/pulumi-crowdstrike"; + return dst; + } + private readonly static string version; public static string Version => version; diff --git a/sdk/dotnet/logo.png b/sdk/dotnet/logo.png index fcf097c..3ef837e 100644 Binary files a/sdk/dotnet/logo.png and b/sdk/dotnet/logo.png differ diff --git a/sdk/go/crowdstrike/getSensorUpdatePolicyBuilds.go b/sdk/go/crowdstrike/getSensorUpdatePolicyBuilds.go index 4725638..9c22c29 100644 --- a/sdk/go/crowdstrike/getSensorUpdatePolicyBuilds.go +++ b/sdk/go/crowdstrike/getSensorUpdatePolicyBuilds.go @@ -72,18 +72,8 @@ type GetSensorUpdatePolicyBuildsResult struct { func GetSensorUpdatePolicyBuildsOutput(ctx *pulumi.Context, opts ...pulumi.InvokeOption) GetSensorUpdatePolicyBuildsResultOutput { return pulumi.ToOutput(0).ApplyT(func(int) (GetSensorUpdatePolicyBuildsResultOutput, error) { - opts = internal.PkgInvokeDefaultOpts(opts) - var rv GetSensorUpdatePolicyBuildsResult - secret, err := ctx.InvokePackageRaw("crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds", nil, &rv, "", opts...) - if err != nil { - return GetSensorUpdatePolicyBuildsResultOutput{}, err - } - - output := pulumi.ToOutput(rv).(GetSensorUpdatePolicyBuildsResultOutput) - if secret { - return pulumi.ToSecret(output).(GetSensorUpdatePolicyBuildsResultOutput), nil - } - return output, nil + options := pulumi.InvokeOutputOptions{InvokeOptions: internal.PkgInvokeDefaultOpts(opts)} + return ctx.InvokeOutput("crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds", nil, GetSensorUpdatePolicyBuildsResultOutput{}, options).(GetSensorUpdatePolicyBuildsResultOutput), nil }).(GetSensorUpdatePolicyBuildsResultOutput) } diff --git a/sdk/nodejs/getSensorUpdatePolicyBuilds.ts b/sdk/nodejs/getSensorUpdatePolicyBuilds.ts index 58810b4..260707d 100644 --- a/sdk/nodejs/getSensorUpdatePolicyBuilds.ts +++ b/sdk/nodejs/getSensorUpdatePolicyBuilds.ts @@ -81,7 +81,7 @@ export interface GetSensorUpdatePolicyBuildsResult { * export const latestLinuxArm64Build = builds.then(builds => builds.linuxArm64?.latest); * ``` */ -export function getSensorUpdatePolicyBuildsOutput(opts?: pulumi.InvokeOptions): pulumi.Output { +export function getSensorUpdatePolicyBuildsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds", { }, opts); diff --git a/sdk/python/crowdstrike_pulumi/get_sensor_update_policy_builds.py b/sdk/python/crowdstrike_pulumi/get_sensor_update_policy_builds.py index 9d8008f..392954d 100644 --- a/sdk/python/crowdstrike_pulumi/get_sensor_update_policy_builds.py +++ b/sdk/python/crowdstrike_pulumi/get_sensor_update_policy_builds.py @@ -131,7 +131,7 @@ def get_sensor_update_policy_builds(opts: Optional[pulumi.InvokeOptions] = None) linux_arm64=pulumi.get(__ret__, 'linux_arm64'), mac=pulumi.get(__ret__, 'mac'), windows=pulumi.get(__ret__, 'windows')) -def get_sensor_update_policy_builds_output(opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSensorUpdatePolicyBuildsResult]: +def get_sensor_update_policy_builds_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSensorUpdatePolicyBuildsResult]: """ This data source provides information about the latest sensor builds for each platform. @@ -155,7 +155,7 @@ def get_sensor_update_policy_builds_output(opts: Optional[pulumi.InvokeOptions] ``` """ __args__ = dict() - opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts) + opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts) __ret__ = pulumi.runtime.invoke_output('crowdstrike:index/getSensorUpdatePolicyBuilds:getSensorUpdatePolicyBuilds', __args__, opts=opts, typ=GetSensorUpdatePolicyBuildsResult) return __ret__.apply(lambda __response__: GetSensorUpdatePolicyBuildsResult( id=pulumi.get(__response__, 'id'), diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 777b258..b9d9469 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -18,7 +18,7 @@ def readme(): setup(name='crowdstrike_pulumi', - python_requires='>=3.8', + python_requires='>=3.9', version=VERSION, description="A Pulumi package for creating and managing CrowdStrike resources", long_description=readme(),