AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
aws.organizations.getPolicies
Start a Neo task
Explain and create an aws.organizations.getPolicies resource
Data source for managing an AWS Organizations Policies.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as std from "@pulumi/std";
const example = aws.organizations.getPolicies({
filter: "SERVICE_CONTROL_POLICY",
});
const exampleGetPolicy = example.then(example => std.toset({
input: example.ids,
})).then(invoke => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: aws.organizations.getPolicy({
policyId: __value,
}) })));
import pulumi
import pulumi_aws as aws
import pulumi_std as std
example = aws.organizations.get_policies(filter="SERVICE_CONTROL_POLICY")
example_get_policy = {__key: aws.organizations.get_policy(policy_id=__value) for __key, __value in std.toset(input=example.ids).result}
Example coming soon!
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = Aws.Organizations.GetPolicies.Invoke(new()
{
Filter = "SERVICE_CONTROL_POLICY",
});
var exampleGetPolicy = Std.Toset.Invoke(new()
{
Input = example.Apply(getPoliciesResult => getPoliciesResult.Ids),
}).Apply(invoke => );
});
Example coming soon!
Example coming soon!
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>def get_policies(filter: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
def get_policies_output(filter: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput> 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)
}public static CompletableFuture<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
public static Output<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
fn::invoke:
function: aws:organizations/getPolicies:getPolicies
arguments:
# arguments dictionaryThe following arguments are supported:
- Filter string
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
- Filter string
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
- filter String
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
- filter string
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
- filter str
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
- filter String
- The type of policies to be returned in the response. Valid values are
AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY
getPolicies Result
The following output properties are available:
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
