Package com.pulumi.aws.organizations
Class Organization
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.organizations.Organization
-
public class Organization extends com.pulumi.resources.CustomResourceProvides a resource to create an organization. > **WARNING:** When migrating from a `featureSet` of `CONSOLIDATED_BILLING` to `ALL`, the Organization account owner will received an email stating the following: "You started the process to enable all features for your AWS organization. As part of that process, all member accounts that joined your organization by invitation must approve the change. You don’t need approval from member accounts that you directly created from within your AWS organization." After all member accounts have accepted the invitation, the Organization account owner must then finalize the changes via the [AWS Console](https://console.aws.amazon.com/organizations/home#/organization/settings/migration-progress). Until these steps are performed, the provider will perpetually show a difference, and the `DescribeOrganization` API will continue to show the `FeatureSet` as `CONSOLIDATED_BILLING`. See the [AWS Organizations documentation](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html) for more information. > **WARNING:** [Warning from the AWS Docs](https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html): "We recommend that you enable integration between AWS Organizations and the specified AWS service by using the console or commands that are provided by the specified service. Doing so ensures that the service is aware that it can create the resources that are required for the integration. How the service creates those resources in the organization's accounts depends on that service. For more information, see the documentation for the other AWS service." ## Example Usage
## Import ### Identity Schema #### Required * `id` (String) ID of the AWS Organizations organization. #### Optional * `accountId` (String) AWS Account where this resource is managed. Using `pulumi import`, import the AWS organization using the `id`. For example: ```sh $ pulumi import aws:organizations/organization:Organization example o-1234567 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.organizations.Organization; import com.pulumi.aws.organizations.OrganizationArgs; import java.util.ArrayList; import java.util.Arrays; 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) { var org = new Organization("org", OrganizationArgs.builder() .awsServiceAccessPrincipals( "cloudtrail.amazonaws.com", "config.amazonaws.com") .featureSet("ALL") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Organization(java.lang.String name)Organization(java.lang.String name, OrganizationArgs args)Organization(java.lang.String name, OrganizationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.List<OrganizationAccount>>accounts()com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>awsServiceAccessPrincipals()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>enabledPolicyTypes()com.pulumi.core.Output<java.util.Optional<java.lang.String>>featureSet()static Organizationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, OrganizationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>masterAccountArn()com.pulumi.core.Output<java.lang.String>masterAccountEmail()com.pulumi.core.Output<java.lang.String>masterAccountId()com.pulumi.core.Output<java.lang.String>masterAccountName()com.pulumi.core.Output<java.util.List<OrganizationNonMasterAccount>>nonMasterAccounts()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>returnOrganizationOnly()com.pulumi.core.Output<java.util.List<OrganizationRoot>>roots()
-
-
-
Constructor Detail
-
Organization
public Organization(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Organization
public Organization(java.lang.String name, @Nullable OrganizationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Organization
public Organization(java.lang.String name, @Nullable OrganizationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accounts
public com.pulumi.core.Output<java.util.List<OrganizationAccount>> accounts()
- Returns:
- List of organization accounts including the master account. For a list excluding the master account, see the `nonMasterAccounts` attribute. All elements have these attributes:
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the root.
-
awsServiceAccessPrincipals
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> awsServiceAccessPrincipals()
- Returns:
- List of AWS service principal names for which you want to enable integration with your organization. This is typically in the form of a URL, such as service-abbreviation.amazonaws.com. Organization must have `featureSet` set to `ALL`. Some services do not support enablement via this endpoint, see [warning in aws docs](https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
-
enabledPolicyTypes
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> enabledPolicyTypes()
- Returns:
- List of Organizations policy types to enable in the Organization Root. Organization must have `featureSet` set to `ALL`. For additional information about valid policy types (e.g., `AISERVICES_OPT_OUT_POLICY`, `BACKUP_POLICY`, `BEDROCK_POLICY`, `CHATBOT_POLICY`, `DECLARATIVE_POLICY_EC2`, `INSPECTOR_POLICY`, `RESOURCE_CONTROL_POLICY`, `S3_POLICY`, `SECURITYHUB_POLICY`, `SERVICE_CONTROL_POLICY`, `TAG_POLICY` and `UPGRADE_ROLLOUT_POLICY`), see the [AWS Organizations API Reference](https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnablePolicyType.html). To enable `INSPECTOR_POLICY`, `awsServiceAccessPrincipals` must include `inspector2.amazonaws.com`. To enable `SECURITYHUB_POLICY`, `awsServiceAccessPrincipals` must include `securityhub.amazonaws.com`.
-
featureSet
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> featureSet()
- Returns:
- Specify `ALL` (default) or `CONSOLIDATED_BILLING`.
-
masterAccountArn
public com.pulumi.core.Output<java.lang.String> masterAccountArn()
- Returns:
- ARN of the master account.
-
masterAccountEmail
public com.pulumi.core.Output<java.lang.String> masterAccountEmail()
- Returns:
- Email address of the master account.
-
masterAccountId
public com.pulumi.core.Output<java.lang.String> masterAccountId()
- Returns:
- Identifier of the master account.
-
masterAccountName
public com.pulumi.core.Output<java.lang.String> masterAccountName()
- Returns:
- Name of the master account.
-
nonMasterAccounts
public com.pulumi.core.Output<java.util.List<OrganizationNonMasterAccount>> nonMasterAccounts()
- Returns:
- List of organization accounts excluding the master account. For a list including the master account, see the `accounts` attribute. All elements have these attributes:
-
returnOrganizationOnly
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> returnOrganizationOnly()
- Returns:
- 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`.
-
roots
public com.pulumi.core.Output<java.util.List<OrganizationRoot>> roots()
- Returns:
- List of organization roots. All elements have these attributes:
-
get
public static Organization get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable OrganizationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-