Package com.pulumi.aws.wafv2
Class ApiKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.wafv2.ApiKey
-
public class ApiKey extends com.pulumi.resources.CustomResourceProvides an AWS WAFv2 API Key resource. ## Example Usage
## Import Using `pulumi import`, import WAFv2 API Key using `api_key,scope`. For example: ```sh $ pulumi import aws:wafv2/apiKey:ApiKey example a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,REGIONAL ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.wafv2.ApiKey; import com.pulumi.aws.wafv2.ApiKeyArgs; import java.util.ArrayList; import java.util.Arrays; 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 ApiKey("example", ApiKeyArgs.builder() .scope("REGIONAL") .tokenDomains("example.com") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ApiKey(java.lang.String name)ApiKey(java.lang.String name, ApiKeyArgs args)ApiKey(java.lang.String name, ApiKeyArgs 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>apiKey()static ApiKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ApiKeyState 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.lang.String>region()com.pulumi.core.Output<java.lang.String>scope()com.pulumi.core.Output<java.util.List<java.lang.String>>tokenDomains()
-
-
-
Constructor Detail
-
ApiKey
public ApiKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ApiKey
public ApiKey(java.lang.String name, ApiKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ApiKey
public ApiKey(java.lang.String name, ApiKeyArgs 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
-
apiKey
public com.pulumi.core.Output<java.lang.String> apiKey()
- Returns:
- The generated API key. This value is sensitive.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
scope
public com.pulumi.core.Output<java.lang.String> scope()
- Returns:
- Specifies whether this is for an AWS CloudFront distribution or for a regional application. Valid values are `CLOUDFRONT` or `REGIONAL`. Changing this forces a new resource to be created. **NOTE:** WAFv2 API Keys deployed for `CLOUDFRONT` must be created within the `us-east-1` region.
-
tokenDomains
public com.pulumi.core.Output<java.util.List<java.lang.String>> tokenDomains()
- Returns:
- The domains that you want to be able to use the API key with, for example `example.com`. You can specify up to 5 domains. Changing this forces a new resource to be created.
-
get
public static ApiKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ApiKeyState 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.
-
-