AppSecSecurityPolicy

Use the akamai.AppSecSecurityPolicy resource to create a new security policy.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = @var.Security_configuration,
        }));
        var securityPolicyCreateAppSecSecurityPolicy = new Akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy", new Akamai.AppSecSecurityPolicyArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            DefaultSettings = @var.Default_settings,
            SecurityPolicyName = @var.Policy_name,
            SecurityPolicyPrefix = @var.Policy_prefix,
        });
        this.SecurityPolicyCreate = securityPolicyCreateAppSecSecurityPolicy.SecurityPolicyId;
    }

    [Output("securityPolicyCreate")]
    public Output<string> SecurityPolicyCreate { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v2/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := _var.Security_configuration
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &akamai.LookupAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		securityPolicyCreateAppSecSecurityPolicy, err := akamai.NewAppSecSecurityPolicy(ctx, "securityPolicyCreateAppSecSecurityPolicy", &akamai.AppSecSecurityPolicyArgs{
			ConfigId:             pulumi.Int(configuration.ConfigId),
			DefaultSettings:      pulumi.Any(_var.Default_settings),
			SecurityPolicyName:   pulumi.Any(_var.Policy_name),
			SecurityPolicyPrefix: pulumi.Any(_var.Policy_prefix),
		})
		if err != nil {
			return err
		}
		ctx.Export("securityPolicyCreate", securityPolicyCreateAppSecSecurityPolicy.SecurityPolicyId)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name=var["security_configuration"])
security_policy_create_app_sec_security_policy = akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy",
    config_id=configuration.config_id,
    default_settings=var["default_settings"],
    security_policy_name=var["policy_name"],
    security_policy_prefix=var["policy_prefix"])
pulumi.export("securityPolicyCreate", security_policy_create_app_sec_security_policy.security_policy_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: _var.security_configuration,
});
const securityPolicyCreateAppSecSecurityPolicy = new akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy", {
    configId: configuration.then(configuration => configuration.configId),
    defaultSettings: _var.default_settings,
    securityPolicyName: _var.policy_name,
    securityPolicyPrefix: _var.policy_prefix,
});
export const securityPolicyCreate = securityPolicyCreateAppSecSecurityPolicy.securityPolicyId;

Create a AppSecSecurityPolicy Resource

new AppSecSecurityPolicy(name: string, args: AppSecSecurityPolicyArgs, opts?: CustomResourceOptions);
@overload
def AppSecSecurityPolicy(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         config_id: Optional[int] = None,
                         create_from_security_policy_id: Optional[str] = None,
                         default_settings: Optional[bool] = None,
                         security_policy_name: Optional[str] = None,
                         security_policy_prefix: Optional[str] = None)
@overload
def AppSecSecurityPolicy(resource_name: str,
                         args: AppSecSecurityPolicyArgs,
                         opts: Optional[ResourceOptions] = None)
func NewAppSecSecurityPolicy(ctx *Context, name string, args AppSecSecurityPolicyArgs, opts ...ResourceOption) (*AppSecSecurityPolicy, error)
public AppSecSecurityPolicy(string name, AppSecSecurityPolicyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecSecurityPolicyArgs
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 AppSecSecurityPolicyArgs
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 AppSecSecurityPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecSecurityPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecSecurityPolicy 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 AppSecSecurityPolicy resource accepts the following input properties:

ConfigId int
The configuration ID to use.
SecurityPolicyName string
The name of the new security policy.
SecurityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
CreateFromSecurityPolicyId string
The ID of the security policy to clone from.
DefaultSettings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.
ConfigId int
The configuration ID to use.
SecurityPolicyName string
The name of the new security policy.
SecurityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
CreateFromSecurityPolicyId string
The ID of the security policy to clone from.
DefaultSettings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.
configId number
The configuration ID to use.
securityPolicyName string
The name of the new security policy.
securityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
createFromSecurityPolicyId string
The ID of the security policy to clone from.
defaultSettings boolean
Whether the new policy should use the default settings. If not supplied, defaults to true.
config_id int
The configuration ID to use.
security_policy_name str
The name of the new security policy.
security_policy_prefix str
The four-character alphanumeric string prefix for the policy ID.
create_from_security_policy_id str
The ID of the security policy to clone from.
default_settings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSecSecurityPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
SecurityPolicyId string
The ID of the newly created security policy.
Id string
The provider-assigned unique ID for this managed resource.
SecurityPolicyId string
The ID of the newly created security policy.
id string
The provider-assigned unique ID for this managed resource.
securityPolicyId string
The ID of the newly created security policy.
id str
The provider-assigned unique ID for this managed resource.
security_policy_id str
The ID of the newly created security policy.

Look up an Existing AppSecSecurityPolicy Resource

Get an existing AppSecSecurityPolicy 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?: AppSecSecurityPolicyState, opts?: CustomResourceOptions): AppSecSecurityPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        create_from_security_policy_id: Optional[str] = None,
        default_settings: Optional[bool] = None,
        security_policy_id: Optional[str] = None,
        security_policy_name: Optional[str] = None,
        security_policy_prefix: Optional[str] = None) -> AppSecSecurityPolicy
func GetAppSecSecurityPolicy(ctx *Context, name string, id IDInput, state *AppSecSecurityPolicyState, opts ...ResourceOption) (*AppSecSecurityPolicy, error)
public static AppSecSecurityPolicy Get(string name, Input<string> id, AppSecSecurityPolicyState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ConfigId int
The configuration ID to use.
CreateFromSecurityPolicyId string
The ID of the security policy to clone from.
DefaultSettings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.
SecurityPolicyId string
The ID of the newly created security policy.
SecurityPolicyName string
The name of the new security policy.
SecurityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
ConfigId int
The configuration ID to use.
CreateFromSecurityPolicyId string
The ID of the security policy to clone from.
DefaultSettings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.
SecurityPolicyId string
The ID of the newly created security policy.
SecurityPolicyName string
The name of the new security policy.
SecurityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
configId number
The configuration ID to use.
createFromSecurityPolicyId string
The ID of the security policy to clone from.
defaultSettings boolean
Whether the new policy should use the default settings. If not supplied, defaults to true.
securityPolicyId string
The ID of the newly created security policy.
securityPolicyName string
The name of the new security policy.
securityPolicyPrefix string
The four-character alphanumeric string prefix for the policy ID.
config_id int
The configuration ID to use.
create_from_security_policy_id str
The ID of the security policy to clone from.
default_settings bool
Whether the new policy should use the default settings. If not supplied, defaults to true.
security_policy_id str
The ID of the newly created security policy.
security_policy_name str
The name of the new security policy.
security_policy_prefix str
The four-character alphanumeric string prefix for the policy ID.

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.