akamai.AppSecIPGeoProtection
Scopes: Security policy
Enables or disables IP/Geo protection for the specified configuration and security policy. When enabled, this allows your firewall to allow (or to block) clients based on their IP address or their geographic location.
Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies/{policyId}/ip-geo-firewall
Output Options
The following options can be used to determine the information returned, and how that returned information is formatted:
output_text
. Tabular report showing the current protection settings.
Example Usage
Basic usage
using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;
return await Deployment.RunAsync(() =>
{
var configuration = Akamai.GetAppSecConfiguration.Invoke(new()
{
Name = "Documentation",
});
var protection = new Akamai.AppSecIPGeoProtection("protection", new()
{
ConfigId = configuration.Apply(getAppSecConfigurationResult => getAppSecConfigurationResult.ConfigId),
SecurityPolicyId = "gms1_134637",
Enabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
Name: pulumi.StringRef("Documentation"),
}, nil)
if err != nil {
return err
}
_, err = akamai.NewAppSecIPGeoProtection(ctx, "protection", &akamai.AppSecIPGeoProtectionArgs{
ConfigId: *pulumi.Int(configuration.ConfigId),
SecurityPolicyId: pulumi.String("gms1_134637"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetAppSecConfigurationArgs;
import com.pulumi.akamai.AppSecIPGeoProtection;
import com.pulumi.akamai.AppSecIPGeoProtectionArgs;
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 configuration = AkamaiFunctions.getAppSecConfiguration(GetAppSecConfigurationArgs.builder()
.name("Documentation")
.build());
var protection = new AppSecIPGeoProtection("protection", AppSecIPGeoProtectionArgs.builder()
.configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
.securityPolicyId("gms1_134637")
.enabled(true)
.build());
}
}
import pulumi
import pulumi_akamai as akamai
configuration = akamai.get_app_sec_configuration(name="Documentation")
protection = akamai.AppSecIPGeoProtection("protection",
config_id=configuration.config_id,
security_policy_id="gms1_134637",
enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
const configuration = akamai.getAppSecConfiguration({
name: "Documentation",
});
const protection = new akamai.AppSecIPGeoProtection("protection", {
configId: configuration.then(configuration => configuration.configId),
securityPolicyId: "gms1_134637",
enabled: true,
});
resources:
protection:
type: akamai:AppSecIPGeoProtection
properties:
configId: ${configuration.configId}
securityPolicyId: gms1_134637
enabled: true
variables:
configuration:
fn::invoke:
Function: akamai:getAppSecConfiguration
Arguments:
name: Documentation
Create AppSecIPGeoProtection Resource
new AppSecIPGeoProtection(name: string, args: AppSecIPGeoProtectionArgs, opts?: CustomResourceOptions);
@overload
def AppSecIPGeoProtection(resource_name: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
enabled: Optional[bool] = None,
security_policy_id: Optional[str] = None)
@overload
def AppSecIPGeoProtection(resource_name: str,
args: AppSecIPGeoProtectionArgs,
opts: Optional[ResourceOptions] = None)
func NewAppSecIPGeoProtection(ctx *Context, name string, args AppSecIPGeoProtectionArgs, opts ...ResourceOption) (*AppSecIPGeoProtection, error)
public AppSecIPGeoProtection(string name, AppSecIPGeoProtectionArgs args, CustomResourceOptions? opts = null)
public AppSecIPGeoProtection(String name, AppSecIPGeoProtectionArgs args)
public AppSecIPGeoProtection(String name, AppSecIPGeoProtectionArgs args, CustomResourceOptions options)
type: akamai:AppSecIPGeoProtection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppSecIPGeoProtectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AppSecIPGeoProtectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AppSecIPGeoProtectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppSecIPGeoProtectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppSecIPGeoProtectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AppSecIPGeoProtection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AppSecIPGeoProtection resource accepts the following input properties:
- Config
Id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- Enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- Security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- Config
Id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- Enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- Security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id Integer . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled Boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- security
Policy StringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id number . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config_
id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- security_
policy_ strid . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id Number . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled Boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- security
Policy StringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppSecIPGeoProtection resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Output
Text string Text representation
- Id string
The provider-assigned unique ID for this managed resource.
- Output
Text string Text representation
- id String
The provider-assigned unique ID for this managed resource.
- output
Text String Text representation
- id string
The provider-assigned unique ID for this managed resource.
- output
Text string Text representation
- id str
The provider-assigned unique ID for this managed resource.
- output_
text str Text representation
- id String
The provider-assigned unique ID for this managed resource.
- output
Text String Text representation
Look up Existing AppSecIPGeoProtection Resource
Get an existing AppSecIPGeoProtection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AppSecIPGeoProtectionState, opts?: CustomResourceOptions): AppSecIPGeoProtection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
config_id: Optional[int] = None,
enabled: Optional[bool] = None,
output_text: Optional[str] = None,
security_policy_id: Optional[str] = None) -> AppSecIPGeoProtection
func GetAppSecIPGeoProtection(ctx *Context, name string, id IDInput, state *AppSecIPGeoProtectionState, opts ...ResourceOption) (*AppSecIPGeoProtection, error)
public static AppSecIPGeoProtection Get(string name, Input<string> id, AppSecIPGeoProtectionState? state, CustomResourceOptions? opts = null)
public static AppSecIPGeoProtection get(String name, Output<String> id, AppSecIPGeoProtectionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Config
Id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- Enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- Output
Text string Text representation
- Security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- Config
Id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- Enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- Output
Text string Text representation
- Security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id Integer . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled Boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- output
Text String Text representation
- security
Policy StringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id number . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- output
Text string Text representation
- security
Policy stringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config_
id int . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled bool
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- output_
text str Text representation
- security_
policy_ strid . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
- config
Id Number . Unique identifier of the security configuration associated with the IP/Geo protection settings being modified.
- enabled Boolean
. Set to true to enable IP/Geo protection; set to false to disable IP/Geo protection.
- output
Text String Text representation
- security
Policy StringId . Unique identifier of the security policy associated with the IP/Geo protection settings being modified.
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.