Viewing docs for Scaleway v1.44.1
published on Monday, Mar 9, 2026 by pulumiverse
published on Monday, Mar 9, 2026 by pulumiverse
Viewing docs for Scaleway v1.44.1
published on Monday, Mar 9, 2026 by pulumiverse
published on Monday, Mar 9, 2026 by pulumiverse
Gets information about an Autoscaling Instance policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
// Get info by name (instance_group_id is required when using name)
const byName = scaleway.autoscaling.getInstancePolicy({
name: "my-instance-policy",
instanceGroupId: main.id,
});
// Get info by ID
const byId = scaleway.autoscaling.getInstancePolicy({
instancePolicyId: "11111111-1111-1111-1111-111111111111",
});
import pulumi
import pulumi_scaleway as scaleway
# Get info by name (instance_group_id is required when using name)
by_name = scaleway.autoscaling.get_instance_policy(name="my-instance-policy",
instance_group_id=main["id"])
# Get info by ID
by_id = scaleway.autoscaling.get_instance_policy(instance_policy_id="11111111-1111-1111-1111-111111111111")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/autoscaling"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Get info by name (instance_group_id is required when using name)
_, err := autoscaling.LookupInstancePolicy(ctx, &autoscaling.LookupInstancePolicyArgs{
Name: pulumi.StringRef("my-instance-policy"),
InstanceGroupId: pulumi.StringRef(main.Id),
}, nil)
if err != nil {
return err
}
// Get info by ID
_, err = autoscaling.LookupInstancePolicy(ctx, &autoscaling.LookupInstancePolicyArgs{
InstancePolicyId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
// Get info by name (instance_group_id is required when using name)
var byName = Scaleway.Autoscaling.GetInstancePolicy.Invoke(new()
{
Name = "my-instance-policy",
InstanceGroupId = main.Id,
});
// Get info by ID
var byId = Scaleway.Autoscaling.GetInstancePolicy.Invoke(new()
{
InstancePolicyId = "11111111-1111-1111-1111-111111111111",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.autoscaling.AutoscalingFunctions;
import com.pulumi.scaleway.autoscaling.inputs.GetInstancePolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Get info by name (instance_group_id is required when using name)
final var byName = AutoscalingFunctions.getInstancePolicy(GetInstancePolicyArgs.builder()
.name("my-instance-policy")
.instanceGroupId(main.id())
.build());
// Get info by ID
final var byId = AutoscalingFunctions.getInstancePolicy(GetInstancePolicyArgs.builder()
.instancePolicyId("11111111-1111-1111-1111-111111111111")
.build());
}
}
variables:
# Get info by name (instance_group_id is required when using name)
byName:
fn::invoke:
function: scaleway:autoscaling:getInstancePolicy
arguments:
name: my-instance-policy
instanceGroupId: ${main.id}
# Get info by ID
byId:
fn::invoke:
function: scaleway:autoscaling:getInstancePolicy
arguments:
instancePolicyId: 11111111-1111-1111-1111-111111111111
Using getInstancePolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getInstancePolicy(args: GetInstancePolicyArgs, opts?: InvokeOptions): Promise<GetInstancePolicyResult>
function getInstancePolicyOutput(args: GetInstancePolicyOutputArgs, opts?: InvokeOptions): Output<GetInstancePolicyResult>def get_instance_policy(instance_group_id: Optional[str] = None,
instance_policy_id: Optional[str] = None,
name: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancePolicyResult
def get_instance_policy_output(instance_group_id: Optional[pulumi.Input[str]] = None,
instance_policy_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancePolicyResult]func LookupInstancePolicy(ctx *Context, args *LookupInstancePolicyArgs, opts ...InvokeOption) (*LookupInstancePolicyResult, error)
func LookupInstancePolicyOutput(ctx *Context, args *LookupInstancePolicyOutputArgs, opts ...InvokeOption) LookupInstancePolicyResultOutput> Note: This function is named LookupInstancePolicy in the Go SDK.
public static class GetInstancePolicy
{
public static Task<GetInstancePolicyResult> InvokeAsync(GetInstancePolicyArgs args, InvokeOptions? opts = null)
public static Output<GetInstancePolicyResult> Invoke(GetInstancePolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstancePolicyResult> getInstancePolicy(GetInstancePolicyArgs args, InvokeOptions options)
public static Output<GetInstancePolicyResult> getInstancePolicy(GetInstancePolicyArgs args, InvokeOptions options)
fn::invoke:
function: scaleway:autoscaling/getInstancePolicy:getInstancePolicy
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Group stringId - The ID of the Instance group the policy belongs to. Required when looking up by
name. - Instance
Policy stringId - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - Name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - Zone string
zone) The zone in which the Instance policy exists.
- Instance
Group stringId - The ID of the Instance group the policy belongs to. Required when looking up by
name. - Instance
Policy stringId - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - Name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - Zone string
zone) The zone in which the Instance policy exists.
- instance
Group StringId - The ID of the Instance group the policy belongs to. Required when looking up by
name. - instance
Policy StringId - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - name String
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - zone String
zone) The zone in which the Instance policy exists.
- instance
Group stringId - The ID of the Instance group the policy belongs to. Required when looking up by
name. - instance
Policy stringId - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - zone string
zone) The zone in which the Instance policy exists.
- instance_
group_ strid - The ID of the Instance group the policy belongs to. Required when looking up by
name. - instance_
policy_ strid - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - name str
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - zone str
zone) The zone in which the Instance policy exists.
- instance
Group StringId - The ID of the Instance group the policy belongs to. Required when looking up by
name. - instance
Policy StringId - The ID of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. - name String
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - zone String
zone) The zone in which the Instance policy exists.
getInstancePolicy Result
The following output properties are available:
- Action string
- Id string
- The provider-assigned unique ID for this managed resource.
- Metrics
List<Pulumiverse.
Scaleway. Autoscaling. Outputs. Get Instance Policy Metric> - Priority int
- Project
Id string - Type string
- Value int
- Instance
Group stringId - Instance
Policy stringId - Name string
- Zone string
- Action string
- Id string
- The provider-assigned unique ID for this managed resource.
- Metrics
[]Get
Instance Policy Metric - Priority int
- Project
Id string - Type string
- Value int
- Instance
Group stringId - Instance
Policy stringId - Name string
- Zone string
- action String
- id String
- The provider-assigned unique ID for this managed resource.
- metrics
List<Get
Instance Policy Metric> - priority Integer
- project
Id String - type String
- value Integer
- instance
Group StringId - instance
Policy StringId - name String
- zone String
- action string
- id string
- The provider-assigned unique ID for this managed resource.
- metrics
Get
Instance Policy Metric[] - priority number
- project
Id string - type string
- value number
- instance
Group stringId - instance
Policy stringId - name string
- zone string
- action str
- id str
- The provider-assigned unique ID for this managed resource.
- metrics
Sequence[Get
Instance Policy Metric] - priority int
- project_
id str - type str
- value int
- instance_
group_ strid - instance_
policy_ strid - name str
- zone str
- action String
- id String
- The provider-assigned unique ID for this managed resource.
- metrics List<Property Map>
- priority Number
- project
Id String - type String
- value Number
- instance
Group StringId - instance
Policy StringId - name String
- zone String
Supporting Types
GetInstancePolicyMetric
- Aggregate string
- How the values sampled for the
metricshould be aggregated - Cockpit
Metric stringName - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- Managed
Metric string - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - Name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - Operator string
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - Sampling
Range intMin - Interval of time, in minutes, during which metric is sampled
- Threshold int
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
- Aggregate string
- How the values sampled for the
metricshould be aggregated - Cockpit
Metric stringName - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- Managed
Metric string - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - Name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - Operator string
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - Sampling
Range intMin - Interval of time, in minutes, during which metric is sampled
- Threshold int
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
- aggregate String
- How the values sampled for the
metricshould be aggregated - cockpit
Metric StringName - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- managed
Metric String - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - name String
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - operator String
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - sampling
Range IntegerMin - Interval of time, in minutes, during which metric is sampled
- threshold Integer
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
- aggregate string
- How the values sampled for the
metricshould be aggregated - cockpit
Metric stringName - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- managed
Metric string - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - name string
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - operator string
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - sampling
Range numberMin - Interval of time, in minutes, during which metric is sampled
- threshold number
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
- aggregate str
- How the values sampled for the
metricshould be aggregated - cockpit_
metric_ strname - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- managed_
metric str - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - name str
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - operator str
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - sampling_
range_ intmin - Interval of time, in minutes, during which metric is sampled
- threshold int
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
- aggregate String
- How the values sampled for the
metricshould be aggregated - cockpit
Metric StringName - Custom metric to use for this policy. This must be stored in Scaleway Cockpit. The metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered
- managed
Metric String - Managed metric to use for this policy. These are available by default in Cockpit without any configuration or
node_exporter. The chosen metric forms the basis of the condition that will be checked to determine whether a scaling action should be triggered - name String
- The name of the Instance policy. Only one of
nameandinstance_policy_idshould be specified. When usingname,instance_group_idis required. - operator String
- Operator used when comparing the threshold value of the chosen
metricto the actual sampled and aggregated value - sampling
Range NumberMin - Interval of time, in minutes, during which metric is sampled
- threshold Number
- Threshold value to measure the aggregated sampled
metricvalue against. Combined with theoperatorfield, determines whether a scaling action should be triggered
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.
Viewing docs for Scaleway v1.44.1
published on Monday, Mar 9, 2026 by pulumiverse
published on Monday, Mar 9, 2026 by pulumiverse
