1. Packages
  2. Outscale Provider
  3. API Docs
  4. getPolicies
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getPolicies

Explore with Pulumi AI

Provides information about policies.

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const userPolicies = outscale.getPolicies({
    filters: [
        {
            name: "only_linked",
            values: ["true"],
        },
        {
            name: "path_prefix",
            values: ["/"],
        },
        {
            name: "scope",
            values: ["LOCAL"],
        },
    ],
});
Copy
import pulumi
import pulumi_outscale as outscale

user_policies = outscale.get_policies(filters=[
    {
        "name": "only_linked",
        "values": ["true"],
    },
    {
        "name": "path_prefix",
        "values": ["/"],
    },
    {
        "name": "scope",
        "values": ["LOCAL"],
    },
])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.GetPolicies(ctx, &outscale.GetPoliciesArgs{
			Filters: []outscale.GetPoliciesFilter{
				{
					Name: "only_linked",
					Values: []string{
						"true",
					},
				},
				{
					Name: "path_prefix",
					Values: []string{
						"/",
					},
				},
				{
					Name: "scope",
					Values: []string{
						"LOCAL",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var userPolicies = Outscale.GetPolicies.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetPoliciesFilterInputArgs
            {
                Name = "only_linked",
                Values = new[]
                {
                    "true",
                },
            },
            new Outscale.Inputs.GetPoliciesFilterInputArgs
            {
                Name = "path_prefix",
                Values = new[]
                {
                    "/",
                },
            },
            new Outscale.Inputs.GetPoliciesFilterInputArgs
            {
                Name = "scope",
                Values = new[]
                {
                    "LOCAL",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetPoliciesArgs;
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) {
        final var userPolicies = OutscaleFunctions.getPolicies(GetPoliciesArgs.builder()
            .filters(            
                GetPoliciesFilterArgs.builder()
                    .name("only_linked")
                    .values(true)
                    .build(),
                GetPoliciesFilterArgs.builder()
                    .name("path_prefix")
                    .values("/")
                    .build(),
                GetPoliciesFilterArgs.builder()
                    .name("scope")
                    .values("LOCAL")
                    .build())
            .build());

    }
}
Copy
variables:
  userPolicies:
    fn::invoke:
      function: outscale:getPolicies
      arguments:
        filters:
          - name: only_linked
            values:
              - true
          - name: path_prefix
            values:
              - /
          - name: scope
            values:
              - LOCAL
Copy

Using getPolicies

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 getPolicies(args: GetPoliciesArgs, opts?: InvokeOptions): Promise<GetPoliciesResult>
function getPoliciesOutput(args: GetPoliciesOutputArgs, opts?: InvokeOptions): Output<GetPoliciesResult>
Copy
def get_policies(filters: Optional[Sequence[GetPoliciesFilter]] = None,
                 id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
def get_policies_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetPoliciesFilterArgs]]]] = None,
                 id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]
Copy
func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput
Copy

> Note: This function is named GetPolicies in the Go SDK.

public static class GetPolicies 
{
    public static Task<GetPoliciesResult> InvokeAsync(GetPoliciesArgs args, InvokeOptions? opts = null)
    public static Output<GetPoliciesResult> Invoke(GetPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
public static Output<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getPolicies:getPolicies
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

getPolicies Result

The following output properties are available:

Id string
Policies List<GetPoliciesPolicy>
Information about one or more policies.
Filters List<GetPoliciesFilter>
Id string
Policies []GetPoliciesPolicy
Information about one or more policies.
Filters []GetPoliciesFilter
id String
policies List<GetPoliciesPolicy>
Information about one or more policies.
filters List<GetPoliciesFilter>
id string
policies GetPoliciesPolicy[]
Information about one or more policies.
filters GetPoliciesFilter[]
id String
policies List<Property Map>
Information about one or more policies.
filters List<Property Map>

Supporting Types

GetPoliciesFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetPoliciesPolicy

CreationDate This property is required. string
The date and time (UTC) at which the policy was created.
Description This property is required. string
A friendly name for the policy (between 0 and 1000 characters).
IsLinkable This property is required. bool
Indicates whether the policy can be linked to a group or an EIM user.
LastModificationDate This property is required. string
The date and time (UTC) at which the policy was last modified.
Orn This property is required. string
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
Path This property is required. string
The path to the policy.
PolicyDefaultVersionId This property is required. string
The ID of the policy default version.
PolicyId This property is required. string
The ID of the policy.
PolicyName This property is required. string
The name of the policy.
ResourcesCount This property is required. double
The number of resources attached to the policy.
CreationDate This property is required. string
The date and time (UTC) at which the policy was created.
Description This property is required. string
A friendly name for the policy (between 0 and 1000 characters).
IsLinkable This property is required. bool
Indicates whether the policy can be linked to a group or an EIM user.
LastModificationDate This property is required. string
The date and time (UTC) at which the policy was last modified.
Orn This property is required. string
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
Path This property is required. string
The path to the policy.
PolicyDefaultVersionId This property is required. string
The ID of the policy default version.
PolicyId This property is required. string
The ID of the policy.
PolicyName This property is required. string
The name of the policy.
ResourcesCount This property is required. float64
The number of resources attached to the policy.
creationDate This property is required. String
The date and time (UTC) at which the policy was created.
description This property is required. String
A friendly name for the policy (between 0 and 1000 characters).
isLinkable This property is required. Boolean
Indicates whether the policy can be linked to a group or an EIM user.
lastModificationDate This property is required. String
The date and time (UTC) at which the policy was last modified.
orn This property is required. String
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
path This property is required. String
The path to the policy.
policyDefaultVersionId This property is required. String
The ID of the policy default version.
policyId This property is required. String
The ID of the policy.
policyName This property is required. String
The name of the policy.
resourcesCount This property is required. Double
The number of resources attached to the policy.
creationDate This property is required. string
The date and time (UTC) at which the policy was created.
description This property is required. string
A friendly name for the policy (between 0 and 1000 characters).
isLinkable This property is required. boolean
Indicates whether the policy can be linked to a group or an EIM user.
lastModificationDate This property is required. string
The date and time (UTC) at which the policy was last modified.
orn This property is required. string
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
path This property is required. string
The path to the policy.
policyDefaultVersionId This property is required. string
The ID of the policy default version.
policyId This property is required. string
The ID of the policy.
policyName This property is required. string
The name of the policy.
resourcesCount This property is required. number
The number of resources attached to the policy.
creation_date This property is required. str
The date and time (UTC) at which the policy was created.
description This property is required. str
A friendly name for the policy (between 0 and 1000 characters).
is_linkable This property is required. bool
Indicates whether the policy can be linked to a group or an EIM user.
last_modification_date This property is required. str
The date and time (UTC) at which the policy was last modified.
orn This property is required. str
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
path This property is required. str
The path to the policy.
policy_default_version_id This property is required. str
The ID of the policy default version.
policy_id This property is required. str
The ID of the policy.
policy_name This property is required. str
The name of the policy.
resources_count This property is required. float
The number of resources attached to the policy.
creationDate This property is required. String
The date and time (UTC) at which the policy was created.
description This property is required. String
A friendly name for the policy (between 0 and 1000 characters).
isLinkable This property is required. Boolean
Indicates whether the policy can be linked to a group or an EIM user.
lastModificationDate This property is required. String
The date and time (UTC) at which the policy was last modified.
orn This property is required. String
The OUTSCALE Resource Name (ORN) of the policy. For more information, see Resource Identifiers.
path This property is required. String
The path to the policy.
policyDefaultVersionId This property is required. String
The ID of the policy default version.
policyId This property is required. String
The ID of the policy.
policyName This property is required. String
The name of the policy.
resourcesCount This property is required. Number
The number of resources attached to the policy.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.