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

com.pulumi.kong.ConsumerAcl Maven / Gradle / Ivy

There is a newer version: 4.6.0-alpha.1731736524
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.kong;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.kong.ConsumerAclArgs;
import com.pulumi.kong.Utilities;
import com.pulumi.kong.inputs.ConsumerAclState;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## # kong.ConsumerAcl
 * 
 * Consumer ACL is a resource that allows you to configure the acl plugin for a consumer.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.kong.Consumer;
 * import com.pulumi.kong.ConsumerArgs;
 * import com.pulumi.kong.Plugin;
 * import com.pulumi.kong.PluginArgs;
 * import com.pulumi.kong.ConsumerAcl;
 * import com.pulumi.kong.ConsumerAclArgs;
 * 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 myConsumer = new Consumer("myConsumer", ConsumerArgs.builder()
 *             .username("User1")
 *             .customId("123")
 *             .build());
 * 
 *         var aclPlugin = new Plugin("aclPlugin", PluginArgs.builder()
 *             .name("acl")
 *             .configJson("""
 * 	{
 * 		"allow": ["group1", "group2"]
 * 	}
 *             """)
 *             .build());
 * 
 *         var consumerAcl = new ConsumerAcl("consumerAcl", ConsumerAclArgs.builder()
 *             .consumerId(myConsumer.id())
 *             .group("group2")
 *             .tags(            
 *                 "myTag",
 *                 "otherTag")
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * */ @ResourceType(type="kong:index/consumerAcl:ConsumerAcl") public class ConsumerAcl extends com.pulumi.resources.CustomResource { /** * the id of the consumer to be configured * */ @Export(name="consumerId", refs={String.class}, tree="[0]") private Output consumerId; /** * @return the id of the consumer to be configured * */ public Output consumerId() { return this.consumerId; } /** * the acl group * */ @Export(name="group", refs={String.class}, tree="[0]") private Output group; /** * @return the acl group * */ public Output group() { return this.group; } /** * A list of strings associated with the consumer acl for grouping and filtering * */ @Export(name="tags", refs={List.class,String.class}, tree="[0,1]") private Output> tags; /** * @return A list of strings associated with the consumer acl for grouping and filtering * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * * @param name The _unique_ name of the resulting resource. */ public ConsumerAcl(java.lang.String name) { this(name, ConsumerAclArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ConsumerAcl(java.lang.String name, ConsumerAclArgs 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 ConsumerAcl(java.lang.String name, ConsumerAclArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("kong:index/consumerAcl:ConsumerAcl", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ConsumerAcl(java.lang.String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("kong:index/consumerAcl:ConsumerAcl", name, state, makeResourceOptions(options, id), false); } private static ConsumerAclArgs makeArgs(ConsumerAclArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ConsumerAclArgs.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 ConsumerAcl get(java.lang.String name, Output id, @Nullable ConsumerAclState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConsumerAcl(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy