import * as pulumi from "@pulumi/pulumi"; import * as outputs from "../types/output"; /** * Get information about the organization that the users account belongs to. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.organizations.getOrganization({}); * export const accountIds = example.then(example => example.accounts.map(__item => __item.id)); * ``` * * ### Limit SNS Topic Access to an Organization * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.organizations.getOrganization({}); * const snsTopic = new aws.sns.Topic("sns_topic", {name: "my-sns-topic"}); * const snsTopicPolicy = aws.iam.getPolicyDocumentOutput({ * statements: [{ * conditions: [{ * test: "StringEquals", * variable: "aws:PrincipalOrgID", * values: [example.then(example => example.id)], * }], * principals: [{ * type: "AWS", * identifiers: ["*"], * }], * effect: "Allow", * actions: [ * "SNS:Subscribe", * "SNS:Publish", * ], * resources: [snsTopic.arn], * }], * }); * const snsTopicPolicyTopicPolicy = new aws.sns.TopicPolicy("sns_topic_policy", { * arn: snsTopic.arn, * policy: snsTopicPolicy.json, * }); * ``` */ export declare function getOrganization(args?: GetOrganizationArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getOrganization. */ export interface GetOrganizationArgs { /** * Return (as attributes) only the results of the [`DescribeOrganization`](https://docs.aws.amazon.com/organizations/latest/APIReference/API_DescribeOrganization.html) API to avoid [API limits](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#throttling-limits). When configured to `true` only the `arn`, `featureSet`, `masterAccountArn`, `masterAccountEmail` and `masterAccountId` attributes will be returned. All others will be empty. Default: `false`. */ returnOrganizationOnly?: boolean; } /** * A collection of values returned by getOrganization. */ export interface GetOrganizationResult { /** * List of organization accounts including the master account. For a list excluding the master account, see the `nonMasterAccounts` attribute. All elements have these attributes: */ readonly accounts: outputs.organizations.GetOrganizationAccount[]; /** * ARN of the root. */ readonly arn: string; /** * A list of AWS service principal names that have integration enabled with your organization. Organization must have `featureSet` set to `ALL`. For additional information, see the [AWS Organizations User Guide](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html). */ readonly awsServiceAccessPrincipals: string[]; /** * A list of Organizations policy types that are enabled in the Organization Root. Organization must have `featureSet` set to `ALL`. For additional information about valid policy types (e.g., `SERVICE_CONTROL_POLICY`), see the [AWS Organizations API Reference](https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnablePolicyType.html). */ readonly enabledPolicyTypes: string[]; /** * FeatureSet of the organization. */ readonly featureSet: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * ARN of the account that is designated as the master account for the organization. */ readonly masterAccountArn: string; /** * The email address that is associated with the AWS account that is designated as the master account for the organization. */ readonly masterAccountEmail: string; /** * Unique identifier (ID) of the master account of an organization. */ readonly masterAccountId: string; /** * Name of the master account of an organization. */ readonly masterAccountName: string; /** * List of organization accounts excluding the master account. For a list including the master account, see the `accounts` attribute. All elements have these attributes: */ readonly nonMasterAccounts: outputs.organizations.GetOrganizationNonMasterAccount[]; readonly returnOrganizationOnly?: boolean; /** * List of organization roots. All elements have these attributes: */ readonly roots: outputs.organizations.GetOrganizationRoot[]; } /** * Get information about the organization that the users account belongs to. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.organizations.getOrganization({}); * export const accountIds = example.then(example => example.accounts.map(__item => __item.id)); * ``` * * ### Limit SNS Topic Access to an Organization * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.organizations.getOrganization({}); * const snsTopic = new aws.sns.Topic("sns_topic", {name: "my-sns-topic"}); * const snsTopicPolicy = aws.iam.getPolicyDocumentOutput({ * statements: [{ * conditions: [{ * test: "StringEquals", * variable: "aws:PrincipalOrgID", * values: [example.then(example => example.id)], * }], * principals: [{ * type: "AWS", * identifiers: ["*"], * }], * effect: "Allow", * actions: [ * "SNS:Subscribe", * "SNS:Publish", * ], * resources: [snsTopic.arn], * }], * }); * const snsTopicPolicyTopicPolicy = new aws.sns.TopicPolicy("sns_topic_policy", { * arn: snsTopic.arn, * policy: snsTopicPolicy.json, * }); * ``` */ export declare function getOrganizationOutput(args?: GetOrganizationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getOrganization. */ export interface GetOrganizationOutputArgs { /** * Return (as attributes) only the results of the [`DescribeOrganization`](https://docs.aws.amazon.com/organizations/latest/APIReference/API_DescribeOrganization.html) API to avoid [API limits](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#throttling-limits). When configured to `true` only the `arn`, `featureSet`, `masterAccountArn`, `masterAccountEmail` and `masterAccountId` attributes will be returned. All others will be empty. Default: `false`. */ returnOrganizationOnly?: pulumi.Input; } //# sourceMappingURL=getOrganization.d.ts.map