1. Packages
  2. AWS
  3. API Docs
  4. iam
  5. OrganizationsFeatures
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.iam.OrganizationsFeatures

Explore with Pulumi AI

Manages centralized root access features across AWS member accounts managed using AWS Organizations. More information about managing root access in IAM can be found in the Centralize root access for member accounts.

NOTE: The AWS account utilizing this resource must be an Organizations management account. Also, you must enable trusted access for AWS Identity and Access Management in AWS Organizations.

Example Usage

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

const example = new aws.organizations.Organization("example", {
    awsServiceAccessPrincipals: ["iam.amazonaws.com"],
    featureSet: "ALL",
});
const exampleOrganizationsFeatures = new aws.iam.OrganizationsFeatures("example", {enabledFeatures: [
    "RootCredentialsManagement",
    "RootSessions",
]});
Copy
import pulumi
import pulumi_aws as aws

example = aws.organizations.Organization("example",
    aws_service_access_principals=["iam.amazonaws.com"],
    feature_set="ALL")
example_organizations_features = aws.iam.OrganizationsFeatures("example", enabled_features=[
    "RootCredentialsManagement",
    "RootSessions",
])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := organizations.NewOrganization(ctx, "example", &organizations.OrganizationArgs{
			AwsServiceAccessPrincipals: pulumi.StringArray{
				pulumi.String("iam.amazonaws.com"),
			},
			FeatureSet: pulumi.String("ALL"),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewOrganizationsFeatures(ctx, "example", &iam.OrganizationsFeaturesArgs{
			EnabledFeatures: pulumi.StringArray{
				pulumi.String("RootCredentialsManagement"),
				pulumi.String("RootSessions"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.Organizations.Organization("example", new()
    {
        AwsServiceAccessPrincipals = new[]
        {
            "iam.amazonaws.com",
        },
        FeatureSet = "ALL",
    });

    var exampleOrganizationsFeatures = new Aws.Iam.OrganizationsFeatures("example", new()
    {
        EnabledFeatures = new[]
        {
            "RootCredentialsManagement",
            "RootSessions",
        },
    });

});
Copy
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 com.pulumi.aws.iam.OrganizationsFeatures;
import com.pulumi.aws.iam.OrganizationsFeaturesArgs;
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) {
        var example = new Organization("example", OrganizationArgs.builder()
            .awsServiceAccessPrincipals("iam.amazonaws.com")
            .featureSet("ALL")
            .build());

        var exampleOrganizationsFeatures = new OrganizationsFeatures("exampleOrganizationsFeatures", OrganizationsFeaturesArgs.builder()
            .enabledFeatures(            
                "RootCredentialsManagement",
                "RootSessions")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:organizations:Organization
    properties:
      awsServiceAccessPrincipals:
        - iam.amazonaws.com
      featureSet: ALL
  exampleOrganizationsFeatures:
    type: aws:iam:OrganizationsFeatures
    name: example
    properties:
      enabledFeatures:
        - RootCredentialsManagement
        - RootSessions
Copy

Create OrganizationsFeatures Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new OrganizationsFeatures(name: string, args: OrganizationsFeaturesArgs, opts?: CustomResourceOptions);
@overload
def OrganizationsFeatures(resource_name: str,
                          args: OrganizationsFeaturesArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def OrganizationsFeatures(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          enabled_features: Optional[Sequence[str]] = None)
func NewOrganizationsFeatures(ctx *Context, name string, args OrganizationsFeaturesArgs, opts ...ResourceOption) (*OrganizationsFeatures, error)
public OrganizationsFeatures(string name, OrganizationsFeaturesArgs args, CustomResourceOptions? opts = null)
public OrganizationsFeatures(String name, OrganizationsFeaturesArgs args)
public OrganizationsFeatures(String name, OrganizationsFeaturesArgs args, CustomResourceOptions options)
type: aws:iam:OrganizationsFeatures
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OrganizationsFeaturesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OrganizationsFeaturesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OrganizationsFeaturesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OrganizationsFeaturesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OrganizationsFeaturesArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var organizationsFeaturesResource = new Aws.Iam.OrganizationsFeatures("organizationsFeaturesResource", new()
{
    EnabledFeatures = new[]
    {
        "string",
    },
});
Copy
example, err := iam.NewOrganizationsFeatures(ctx, "organizationsFeaturesResource", &iam.OrganizationsFeaturesArgs{
	EnabledFeatures: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var organizationsFeaturesResource = new OrganizationsFeatures("organizationsFeaturesResource", OrganizationsFeaturesArgs.builder()
    .enabledFeatures("string")
    .build());
Copy
organizations_features_resource = aws.iam.OrganizationsFeatures("organizationsFeaturesResource", enabled_features=["string"])
Copy
const organizationsFeaturesResource = new aws.iam.OrganizationsFeatures("organizationsFeaturesResource", {enabledFeatures: ["string"]});
Copy
type: aws:iam:OrganizationsFeatures
properties:
    enabledFeatures:
        - string
Copy

OrganizationsFeatures Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The OrganizationsFeatures resource accepts the following input properties:

EnabledFeatures This property is required. List<string>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
EnabledFeatures This property is required. []string
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures This property is required. List<String>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures This property is required. string[]
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabled_features This property is required. Sequence[str]
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures This property is required. List<String>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.

Outputs

All input properties are implicitly available as output properties. Additionally, the OrganizationsFeatures resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing OrganizationsFeatures Resource

Get an existing OrganizationsFeatures resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: OrganizationsFeaturesState, opts?: CustomResourceOptions): OrganizationsFeatures
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled_features: Optional[Sequence[str]] = None) -> OrganizationsFeatures
func GetOrganizationsFeatures(ctx *Context, name string, id IDInput, state *OrganizationsFeaturesState, opts ...ResourceOption) (*OrganizationsFeatures, error)
public static OrganizationsFeatures Get(string name, Input<string> id, OrganizationsFeaturesState? state, CustomResourceOptions? opts = null)
public static OrganizationsFeatures get(String name, Output<String> id, OrganizationsFeaturesState state, CustomResourceOptions options)
resources:  _:    type: aws:iam:OrganizationsFeatures    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
EnabledFeatures List<string>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
EnabledFeatures []string
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures List<String>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures string[]
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabled_features Sequence[str]
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.
enabledFeatures List<String>
List of IAM features to enable. Valid values are RootCredentialsManagement and RootSessions.

Import

Using pulumi import, import root access features using the id. For example:

$ pulumi import aws:iam/organizationsFeatures:OrganizationsFeatures example o-1234567
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.