Akamai

Pulumi Official
Package maintained by Pulumi
v2.9.0 published on Wednesday, Apr 6, 2022 by Pulumi

AppSecSecurityPolicy

Scopes: Security configuration

Creates a new security policy. The resource enables you to:

  • Create a new, “blank” security policy.
  • Create a new policy preconfigured with the default security policy settings.
  • Clone an existing security policy.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/security-policies

Output Options

The following options can be used to determine the information returned, and how that returned information is formatted:

  • security_policy_id. ID of the newly-created 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 = "Documentation",
        }));
        var securityPolicyCreateAppSecSecurityPolicy = new Akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy", new Akamai.AppSecSecurityPolicyArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            DefaultSettings = true,
            SecurityPolicyName = "Documentation Policy",
            SecurityPolicyPrefix = "gms1",
        });
        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 {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		securityPolicyCreateAppSecSecurityPolicy, err := akamai.NewAppSecSecurityPolicy(ctx, "securityPolicyCreateAppSecSecurityPolicy", &akamai.AppSecSecurityPolicyArgs{
			ConfigId:             pulumi.Int(configuration.ConfigId),
			DefaultSettings:      pulumi.Bool(true),
			SecurityPolicyName:   pulumi.String("Documentation Policy"),
			SecurityPolicyPrefix: pulumi.String("gms1"),
		})
		if err != nil {
			return err
		}
		ctx.Export("securityPolicyCreate", securityPolicyCreateAppSecSecurityPolicy.SecurityPolicyId)
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
security_policy_create_app_sec_security_policy = akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy",
    config_id=configuration.config_id,
    default_settings=True,
    security_policy_name="Documentation Policy",
    security_policy_prefix="gms1")
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: "Documentation",
});
const securityPolicyCreateAppSecSecurityPolicy = new akamai.AppSecSecurityPolicy("securityPolicyCreateAppSecSecurityPolicy", {
    configId: configuration.then(configuration => configuration.configId),
    defaultSettings: true,
    securityPolicyName: "Documentation Policy",
    securityPolicyPrefix: "gms1",
});
export const securityPolicyCreate = securityPolicyCreateAppSecSecurityPolicy.securityPolicyId;

Coming soon!

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)
public AppSecSecurityPolicy(String name, AppSecSecurityPolicyArgs args)
public AppSecSecurityPolicy(String name, AppSecSecurityPolicyArgs args, CustomResourceOptions options)
type: akamai:AppSecSecurityPolicy
properties: # The arguments to resource properties.
options: # 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.
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.
name String
The unique name of the resource.
args AppSecSecurityPolicyArgs
The arguments to resource properties.
options 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

. Unique identifier of the security configuration to be associated with the new security policy.

SecurityPolicyName string

. Name of the new security policy.

SecurityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

CreateFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

DefaultSettings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

ConfigId int

. Unique identifier of the security configuration to be associated with the new security policy.

SecurityPolicyName string

. Name of the new security policy.

SecurityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

CreateFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

DefaultSettings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

configId Integer

. Unique identifier of the security configuration to be associated with the new security policy.

securityPolicyName String

. Name of the new security policy.

securityPolicyPrefix String

. Four-character alphanumeric string prefix used in creating the security policy ID.

createFromSecurityPolicyId String

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings Boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

configId number

. Unique identifier of the security configuration to be associated with the new security policy.

securityPolicyName string

. Name of the new security policy.

securityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

createFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

config_id int

. Unique identifier of the security configuration to be associated with the new security policy.

security_policy_name str

. Name of the new security policy.

security_policy_prefix str

. Four-character alphanumeric string prefix used in creating the security policy ID.

create_from_security_policy_id str

. Unique identifier of the existing security policy that the new policy will be cloned from.

default_settings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

configId Number

. Unique identifier of the security configuration to be associated with the new security policy.

securityPolicyName String

. Name of the new security policy.

securityPolicyPrefix String

. Four-character alphanumeric string prefix used in creating the security policy ID.

createFromSecurityPolicyId String

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings Boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

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

Policy ID for new policy

Id string

The provider-assigned unique ID for this managed resource.

SecurityPolicyId string

Policy ID for new policy

id String

The provider-assigned unique ID for this managed resource.

securityPolicyId String

Policy ID for new policy

id string

The provider-assigned unique ID for this managed resource.

securityPolicyId string

Policy ID for new policy

id str

The provider-assigned unique ID for this managed resource.

security_policy_id str

Policy ID for new policy

id String

The provider-assigned unique ID for this managed resource.

securityPolicyId String

Policy ID for new 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)
public static AppSecSecurityPolicy get(String name, Output<String> id, AppSecSecurityPolicyState 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.
The following state arguments are supported:
ConfigId int

. Unique identifier of the security configuration to be associated with the new security policy.

CreateFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

DefaultSettings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

SecurityPolicyId string

Policy ID for new policy

SecurityPolicyName string

. Name of the new security policy.

SecurityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

ConfigId int

. Unique identifier of the security configuration to be associated with the new security policy.

CreateFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

DefaultSettings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

SecurityPolicyId string

Policy ID for new policy

SecurityPolicyName string

. Name of the new security policy.

SecurityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

configId Integer

. Unique identifier of the security configuration to be associated with the new security policy.

createFromSecurityPolicyId String

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings Boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

securityPolicyId String

Policy ID for new policy

securityPolicyName String

. Name of the new security policy.

securityPolicyPrefix String

. Four-character alphanumeric string prefix used in creating the security policy ID.

configId number

. Unique identifier of the security configuration to be associated with the new security policy.

createFromSecurityPolicyId string

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

securityPolicyId string

Policy ID for new policy

securityPolicyName string

. Name of the new security policy.

securityPolicyPrefix string

. Four-character alphanumeric string prefix used in creating the security policy ID.

config_id int

. Unique identifier of the security configuration to be associated with the new security policy.

create_from_security_policy_id str

. Unique identifier of the existing security policy that the new policy will be cloned from.

default_settings bool

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

security_policy_id str

Policy ID for new policy

security_policy_name str

. Name of the new security policy.

security_policy_prefix str

. Four-character alphanumeric string prefix used in creating the security policy ID.

configId Number

. Unique identifier of the security configuration to be associated with the new security policy.

createFromSecurityPolicyId String

. Unique identifier of the existing security policy that the new policy will be cloned from.

defaultSettings Boolean

. Set to true to assign default setting values to the new policy; set to false to create a “blank” security policy. If not included, the new policy will be created using the default settings.

securityPolicyId String

Policy ID for new policy

securityPolicyName String

. Name of the new security policy.

securityPolicyPrefix String

. Four-character alphanumeric string prefix used in creating the security 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.