All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.grafana.RoleAssociation Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.60.0-alpha.1731982519
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.grafana;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.grafana.RoleAssociationArgs;
import com.pulumi.aws.grafana.inputs.RoleAssociationState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Provides an Amazon Managed Grafana workspace role association resource.
 * 
 * ## Example Usage
 * 
 * ### Basic configuration
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.grafana.Workspace;
 * import com.pulumi.aws.grafana.WorkspaceArgs;
 * import com.pulumi.aws.grafana.RoleAssociation;
 * import com.pulumi.aws.grafana.RoleAssociationArgs;
 * 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 assume = new Role("assume", RoleArgs.builder()
 *             .name("grafana-assume")
 *             .assumeRolePolicy(serializeJson(
 *                 jsonObject(
 *                     jsonProperty("Version", "2012-10-17"),
 *                     jsonProperty("Statement", jsonArray(jsonObject(
 *                         jsonProperty("Action", "sts:AssumeRole"),
 *                         jsonProperty("Effect", "Allow"),
 *                         jsonProperty("Sid", ""),
 *                         jsonProperty("Principal", jsonObject(
 *                             jsonProperty("Service", "grafana.amazonaws.com")
 *                         ))
 *                     )))
 *                 )))
 *             .build());
 * 
 *         var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
 *             .accountAccessType("CURRENT_ACCOUNT")
 *             .authenticationProviders("SAML")
 *             .permissionType("SERVICE_MANAGED")
 *             .roleArn(assume.arn())
 *             .build());
 * 
 *         var example = new RoleAssociation("example", RoleAssociationArgs.builder()
 *             .role("ADMIN")
 *             .userIds(            
 *                 "USER_ID_1",
 *                 "USER_ID_2")
 *             .workspaceId(exampleWorkspace.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * */ @ResourceType(type="aws:grafana/roleAssociation:RoleAssociation") public class RoleAssociation extends com.pulumi.resources.CustomResource { /** * The AWS SSO group ids to be assigned the role given in `role`. * */ @Export(name="groupIds", refs={List.class,String.class}, tree="[0,1]") private Output> groupIds; /** * @return The AWS SSO group ids to be assigned the role given in `role`. * */ public Output>> groupIds() { return Codegen.optional(this.groupIds); } /** * The grafana role. Valid values can be found [here](https://docs.aws.amazon.com/grafana/latest/APIReference/API_UpdateInstruction.html#ManagedGrafana-Type-UpdateInstruction-role). * */ @Export(name="role", refs={String.class}, tree="[0]") private Output role; /** * @return The grafana role. Valid values can be found [here](https://docs.aws.amazon.com/grafana/latest/APIReference/API_UpdateInstruction.html#ManagedGrafana-Type-UpdateInstruction-role). * */ public Output role() { return this.role; } /** * The AWS SSO user ids to be assigned the role given in `role`. * */ @Export(name="userIds", refs={List.class,String.class}, tree="[0,1]") private Output> userIds; /** * @return The AWS SSO user ids to be assigned the role given in `role`. * */ public Output>> userIds() { return Codegen.optional(this.userIds); } /** * The workspace id. * * The following arguments are optional: * */ @Export(name="workspaceId", refs={String.class}, tree="[0]") private Output workspaceId; /** * @return The workspace id. * * The following arguments are optional: * */ public Output workspaceId() { return this.workspaceId; } /** * * @param name The _unique_ name of the resulting resource. */ public RoleAssociation(java.lang.String name) { this(name, RoleAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public RoleAssociation(java.lang.String name, RoleAssociationArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public RoleAssociation(java.lang.String name, RoleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:grafana/roleAssociation:RoleAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private RoleAssociation(java.lang.String name, Output id, @Nullable RoleAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:grafana/roleAssociation:RoleAssociation", name, state, makeResourceOptions(options, id), false); } private static RoleAssociationArgs makeArgs(RoleAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? RoleAssociationArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static RoleAssociation get(java.lang.String name, Output id, @Nullable RoleAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new RoleAssociation(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy