@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
93 lines (92 loc) • 3.87 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Data source for managing an AWS Organizations Policies For Target.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as std from "@pulumi/std";
*
* const example = aws.organizations.getOrganization({});
* const exampleGetPoliciesForTarget = example.then(example => aws.organizations.getPoliciesForTarget({
* targetId: example.roots?.[0]?.id,
* filter: "SERVICE_CONTROL_POLICY",
* }));
* const exampleGetPolicy = exampleGetPoliciesForTarget.then(exampleGetPoliciesForTarget => std.toset({
* input: exampleGetPoliciesForTarget.ids,
* })).then(invoke => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: aws.organizations.getPolicy({
* policyId: __value,
* }) })));
* ```
*/
export declare function getPoliciesForTarget(args: GetPoliciesForTargetArgs, opts?: pulumi.InvokeOptions): Promise<GetPoliciesForTargetResult>;
/**
* A collection of arguments for invoking getPoliciesForTarget.
*/
export interface GetPoliciesForTargetArgs {
/**
* Must supply one of the 7 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
*/
filter: string;
/**
* The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
*/
targetId: string;
}
/**
* A collection of values returned by getPoliciesForTarget.
*/
export interface GetPoliciesForTargetResult {
readonly filter: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* List of all the policy ids found.
*/
readonly ids: string[];
readonly targetId: string;
}
/**
* Data source for managing an AWS Organizations Policies For Target.
*
* ## Example Usage
*
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* import * as std from "@pulumi/std";
*
* const example = aws.organizations.getOrganization({});
* const exampleGetPoliciesForTarget = example.then(example => aws.organizations.getPoliciesForTarget({
* targetId: example.roots?.[0]?.id,
* filter: "SERVICE_CONTROL_POLICY",
* }));
* const exampleGetPolicy = exampleGetPoliciesForTarget.then(exampleGetPoliciesForTarget => std.toset({
* input: exampleGetPoliciesForTarget.ids,
* })).then(invoke => .reduce((__obj, [__key, __value]) => ({ ...__obj, [__key]: aws.organizations.getPolicy({
* policyId: __value,
* }) })));
* ```
*/
export declare function getPoliciesForTargetOutput(args: GetPoliciesForTargetOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPoliciesForTargetResult>;
/**
* A collection of arguments for invoking getPoliciesForTarget.
*/
export interface GetPoliciesForTargetOutputArgs {
/**
* Must supply one of the 7 different policy filters for a target (AISERVICES_OPT_OUT_POLICY | BACKUP_POLICY | CHATBOT_POLICY | DECLARATIVE_POLICY_EC2 | RESOURCE_CONTROL_POLICY | SERVICE_CONTROL_POLICY | TAG_POLICY)
*/
filter: pulumi.Input<string>;
/**
* The root (string that begins with "r-" followed by 4-32 lowercase letters or digits), account (12 digit string), or Organizational Unit (string starting with "ou-" followed by 4-32 lowercase letters or digits. This string is followed by a second "-" dash and from 8-32 additional lowercase letters or digits.)
*/
targetId: pulumi.Input<string>;
}