Package com.pulumi.aws.rolesanywhere
Class Profile
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.rolesanywhere.Profile
-
public class Profile extends com.pulumi.resources.CustomResource
Resource for managing a Roles Anywhere Profile. ## Example Usage <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.iam.Role; import com.pulumi.aws.iam.RoleArgs; import com.pulumi.aws.rolesanywhere.Profile; import com.pulumi.aws.rolesanywhere.ProfileArgs; import static com.pulumi.codegen.internal.Serialization.*; 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 test = new Role("test", RoleArgs.builder() .name("test") .path("/") .assumeRolePolicy(serializeJson( jsonObject( jsonProperty("version", "2012-10-17"), jsonProperty("statement", jsonArray(jsonObject( jsonProperty("action", jsonArray( "sts:AssumeRole", "sts:TagSession", "sts:SetSourceIdentity" )), jsonProperty("principal", jsonObject( jsonProperty("service", "rolesanywhere.amazonaws.com") )), jsonProperty("effect", "Allow"), jsonProperty("sid", "") ))) ))) .build()); var testProfile = new Profile("testProfile", ProfileArgs.builder() .name("example") .roleArns(test.arn()) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import `aws_rolesanywhere_profile` using its `id`. For example: ```sh $ pulumi import aws:rolesanywhere/profile:Profile example db138a85-8925-4f9f-a409-08231233cacf ```
-
-
Constructor Summary
Constructors Constructor Description Profile(java.lang.String name)
Profile(java.lang.String name, ProfileArgs args)
Profile(java.lang.String name, ProfileArgs 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.lang.String>
arn()
com.pulumi.core.Output<java.lang.Integer>
durationSeconds()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
enabled()
static Profile
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ProfileState 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.util.Optional<java.util.List<java.lang.String>>>
managedPolicyArns()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
requireInstanceProperties()
com.pulumi.core.Output<java.util.List<java.lang.String>>
roleArns()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
sessionPolicy()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
-
-
-
Constructor Detail
-
Profile
public Profile(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Profile
public Profile(java.lang.String name, ProfileArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Profile
public Profile(java.lang.String name, ProfileArgs 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
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- Amazon Resource Name (ARN) of the Profile
-
durationSeconds
public com.pulumi.core.Output<java.lang.Integer> durationSeconds()
- Returns:
- The number of seconds the vended session credentials are valid for. Defaults to 3600.
-
enabled
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enabled()
- Returns:
- Whether or not the Profile is enabled.
-
managedPolicyArns
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> managedPolicyArns()
- Returns:
- A list of managed policy ARNs that apply to the vended session credentials.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the Profile.
-
requireInstanceProperties
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> requireInstanceProperties()
- Returns:
- Specifies whether instance properties are required in [CreateSession](https://docs.aws.amazon.com/rolesanywhere/latest/APIReference/API_CreateSession.html) requests with this profile.
-
roleArns
public com.pulumi.core.Output<java.util.List<java.lang.String>> roleArns()
- Returns:
- A list of IAM roles that this profile can assume
-
sessionPolicy
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> sessionPolicy()
- Returns:
- A session policy that applies to the trust boundary of the vended session credentials.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
get
public static Profile get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ProfileState 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.
-
-