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

com.pulumi.aws.eks.AccessPolicyAssociation 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.eks;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.eks.AccessPolicyAssociationArgs;
import com.pulumi.aws.eks.inputs.AccessPolicyAssociationState;
import com.pulumi.aws.eks.outputs.AccessPolicyAssociationAccessScope;
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 javax.annotation.Nullable;

/**
 * Access Entry Policy Association for an EKS Cluster.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.eks.AccessPolicyAssociation;
 * import com.pulumi.aws.eks.AccessPolicyAssociationArgs;
 * import com.pulumi.aws.eks.inputs.AccessPolicyAssociationAccessScopeArgs;
 * 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 AccessPolicyAssociation("example", AccessPolicyAssociationArgs.builder()
 *             .clusterName(exampleAwsEksCluster.name())
 *             .policyArn("arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy")
 *             .principalArn(exampleAwsIamUser.arn())
 *             .accessScope(AccessPolicyAssociationAccessScopeArgs.builder()
 *                 .type("namespace")
 *                 .namespaces("example-namespace")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import EKS access entry using the `cluster_name` `principal_arn` and `policy_arn` separated by an octothorp (`#`). For example: * * ```sh * $ pulumi import aws:eks/accessPolicyAssociation:AccessPolicyAssociation my_eks_access_entry my_cluster_name#my_principal_arn#my_policy_arn * ``` * */ @ResourceType(type="aws:eks/accessPolicyAssociation:AccessPolicyAssociation") public class AccessPolicyAssociation extends com.pulumi.resources.CustomResource { /** * The configuration block to determine the scope of the access. See `access_scope` Block below. * */ @Export(name="accessScope", refs={AccessPolicyAssociationAccessScope.class}, tree="[0]") private Output accessScope; /** * @return The configuration block to determine the scope of the access. See `access_scope` Block below. * */ public Output accessScope() { return this.accessScope; } /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the policy was associated. * */ @Export(name="associatedAt", refs={String.class}, tree="[0]") private Output associatedAt; /** * @return Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the policy was associated. * */ public Output associatedAt() { return this.associatedAt; } /** * Name of the EKS Cluster. * */ @Export(name="clusterName", refs={String.class}, tree="[0]") private Output clusterName; /** * @return Name of the EKS Cluster. * */ public Output clusterName() { return this.clusterName; } /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the policy was updated. * */ @Export(name="modifiedAt", refs={String.class}, tree="[0]") private Output modifiedAt; /** * @return Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) that the policy was updated. * */ public Output modifiedAt() { return this.modifiedAt; } /** * The ARN of the access policy that you're associating. * */ @Export(name="policyArn", refs={String.class}, tree="[0]") private Output policyArn; /** * @return The ARN of the access policy that you're associating. * */ public Output policyArn() { return this.policyArn; } /** * The IAM Principal ARN which requires Authentication access to the EKS cluster. * */ @Export(name="principalArn", refs={String.class}, tree="[0]") private Output principalArn; /** * @return The IAM Principal ARN which requires Authentication access to the EKS cluster. * */ public Output principalArn() { return this.principalArn; } /** * * @param name The _unique_ name of the resulting resource. */ public AccessPolicyAssociation(java.lang.String name) { this(name, AccessPolicyAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public AccessPolicyAssociation(java.lang.String name, AccessPolicyAssociationArgs 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 AccessPolicyAssociation(java.lang.String name, AccessPolicyAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:eks/accessPolicyAssociation:AccessPolicyAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private AccessPolicyAssociation(java.lang.String name, Output id, @Nullable AccessPolicyAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:eks/accessPolicyAssociation:AccessPolicyAssociation", name, state, makeResourceOptions(options, id), false); } private static AccessPolicyAssociationArgs makeArgs(AccessPolicyAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AccessPolicyAssociationArgs.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 AccessPolicyAssociation get(java.lang.String name, Output id, @Nullable AccessPolicyAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new AccessPolicyAssociation(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy