com.pulumi.aws.shield.ShieldFunctions Maven / Gradle / Ivy
// *** 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.shield;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.shield.inputs.GetProtectionArgs;
import com.pulumi.aws.shield.inputs.GetProtectionPlainArgs;
import com.pulumi.aws.shield.outputs.GetProtectionResult;
import com.pulumi.core.Output;
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import java.util.concurrent.CompletableFuture;
public final class ShieldFunctions {
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getProtection() {
return getProtection(GetProtectionArgs.Empty, InvokeOptions.Empty);
}
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getProtectionPlain() {
return getProtectionPlain(GetProtectionPlainArgs.Empty, InvokeOptions.Empty);
}
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getProtection(GetProtectionArgs args) {
return getProtection(args, InvokeOptions.Empty);
}
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getProtectionPlain(GetProtectionPlainArgs args) {
return getProtectionPlain(args, InvokeOptions.Empty);
}
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static Output getProtection(GetProtectionArgs args, InvokeOptions options) {
return Deployment.getInstance().invoke("aws:shield/getProtection:getProtection", TypeShape.of(GetProtectionResult.class), args, Utilities.withVersion(options));
}
/**
* Data source for managing an AWS Shield Protection.
*
* ## Example Usage
*
* ### Basic Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .protectionId("abc123")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### By Resource ARN
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.shield.ShieldFunctions;
* import com.pulumi.aws.shield.inputs.GetProtectionArgs;
* 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) {
* final var example = ShieldFunctions.getProtection(GetProtectionArgs.builder()
* .resourceArn("arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
*/
public static CompletableFuture getProtectionPlain(GetProtectionPlainArgs args, InvokeOptions options) {
return Deployment.getInstance().invokeAsync("aws:shield/getProtection:getProtection", TypeShape.of(GetProtectionResult.class), args, Utilities.withVersion(options));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy