AppSecSecurityPolicyClone

The akamai.AppSecSecurityPolicyClone resource allows you to create a new security policy by cloning an existing 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 = "Akamai Tools",
        }));
        var securityPolicyCloneAppSecSecurityPolicyClone = new Akamai.AppSecSecurityPolicyClone("securityPolicyCloneAppSecSecurityPolicyClone", new Akamai.AppSecSecurityPolicyCloneArgs
        {
            ConfigId = configuration.Apply(configuration => configuration.ConfigId),
            Version = configuration.Apply(configuration => configuration.LatestVersion),
            CreateFromSecurityPolicy = "crAP_75829",
            PolicyName = "Test Policy 1",
            PolicyPrefix = "TP1",
        });
        this.SecurityPolicyClone = securityPolicyCloneAppSecSecurityPolicyClone.PolicyId;
    }

    [Output("securityPolicyClone")]
    public Output<string> SecurityPolicyClone { 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 := "Akamai Tools"
		configuration, err := akamai.GetAppSecConfiguration(ctx, &akamai.GetAppSecConfigurationArgs{
			Name: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		securityPolicyCloneAppSecSecurityPolicyClone, err := akamai.NewAppSecSecurityPolicyClone(ctx, "securityPolicyCloneAppSecSecurityPolicyClone", &akamai.AppSecSecurityPolicyCloneArgs{
			ConfigId:                 pulumi.Int(configuration.ConfigId),
			Version:                  pulumi.Int(configuration.LatestVersion),
			CreateFromSecurityPolicy: pulumi.String("crAP_75829"),
			PolicyName:               pulumi.String("Test Policy 1"),
			PolicyPrefix:             pulumi.String("TP1"),
		})
		if err != nil {
			return err
		}
		ctx.Export("securityPolicyClone", securityPolicyCloneAppSecSecurityPolicyClone.PolicyId)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Akamai Tools")
security_policy_clone_app_sec_security_policy_clone = akamai.AppSecSecurityPolicyClone("securityPolicyCloneAppSecSecurityPolicyClone",
    config_id=configuration.config_id,
    version=configuration.latest_version,
    create_from_security_policy="crAP_75829",
    policy_name="Test Policy 1",
    policy_prefix="TP1")
pulumi.export("securityPolicyClone", security_policy_clone_app_sec_security_policy_clone.policy_id)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Akamai Tools",
});
const securityPolicyCloneAppSecSecurityPolicyClone = new akamai.AppSecSecurityPolicyClone("securityPolicyCloneAppSecSecurityPolicyClone", {
    configId: configuration.then(configuration => configuration.configId),
    version: configuration.then(configuration => configuration.latestVersion),
    createFromSecurityPolicy: "crAP_75829",
    policyName: "Test Policy 1",
    policyPrefix: "TP1",
});
export const securityPolicyClone = securityPolicyCloneAppSecSecurityPolicyClone.policyId;

Create a AppSecSecurityPolicyClone Resource

new AppSecSecurityPolicyClone(name: string, args: AppSecSecurityPolicyCloneArgs, opts?: CustomResourceOptions);
@overload
def AppSecSecurityPolicyClone(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              config_id: Optional[int] = None,
                              create_from_security_policy: Optional[str] = None,
                              policy_name: Optional[str] = None,
                              policy_prefix: Optional[str] = None,
                              version: Optional[int] = None)
@overload
def AppSecSecurityPolicyClone(resource_name: str,
                              args: AppSecSecurityPolicyCloneArgs,
                              opts: Optional[ResourceOptions] = None)
func NewAppSecSecurityPolicyClone(ctx *Context, name string, args AppSecSecurityPolicyCloneArgs, opts ...ResourceOption) (*AppSecSecurityPolicyClone, error)
public AppSecSecurityPolicyClone(string name, AppSecSecurityPolicyCloneArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AppSecSecurityPolicyCloneArgs
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 AppSecSecurityPolicyCloneArgs
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 AppSecSecurityPolicyCloneArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSecSecurityPolicyCloneArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AppSecSecurityPolicyClone Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AppSecSecurityPolicyClone resource accepts the following input properties:

ConfigId int
The ID of the security configuration to use.
CreateFromSecurityPolicy string
The ID of the security policy to clone.
Version int
PolicyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
PolicyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
ConfigId int
The ID of the security configuration to use.
CreateFromSecurityPolicy string
The ID of the security policy to clone.
Version int
PolicyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
PolicyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
configId number
The ID of the security configuration to use.
createFromSecurityPolicy string
The ID of the security policy to clone.
version number
policyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
policyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
config_id int
The ID of the security configuration to use.
create_from_security_policy str
The ID of the security policy to clone.
version int
policy_name str
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
policy_prefix str
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
PolicyId string
The ID of the new security policy.
Id string
The provider-assigned unique ID for this managed resource.
PolicyId string
The ID of the new security policy.
id string
The provider-assigned unique ID for this managed resource.
policyId string
The ID of the new security policy.
id str
The provider-assigned unique ID for this managed resource.
policy_id str
The ID of the new security policy.

Look up an Existing AppSecSecurityPolicyClone Resource

Get an existing AppSecSecurityPolicyClone 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?: AppSecSecurityPolicyCloneState, opts?: CustomResourceOptions): AppSecSecurityPolicyClone
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[int] = None,
        create_from_security_policy: Optional[str] = None,
        policy_id: Optional[str] = None,
        policy_name: Optional[str] = None,
        policy_prefix: Optional[str] = None,
        version: Optional[int] = None) -> AppSecSecurityPolicyClone
func GetAppSecSecurityPolicyClone(ctx *Context, name string, id IDInput, state *AppSecSecurityPolicyCloneState, opts ...ResourceOption) (*AppSecSecurityPolicyClone, error)
public static AppSecSecurityPolicyClone Get(string name, Input<string> id, AppSecSecurityPolicyCloneState? 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 ID of the security configuration to use.
CreateFromSecurityPolicy string
The ID of the security policy to clone.
PolicyId string
The ID of the new security policy.
PolicyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
PolicyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
Version int
ConfigId int
The ID of the security configuration to use.
CreateFromSecurityPolicy string
The ID of the security policy to clone.
PolicyId string
The ID of the new security policy.
PolicyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
PolicyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
Version int
configId number
The ID of the security configuration to use.
createFromSecurityPolicy string
The ID of the security policy to clone.
policyId string
The ID of the new security policy.
policyName string
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
policyPrefix string
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
version number
config_id int
The ID of the security configuration to use.
create_from_security_policy str
The ID of the security policy to clone.
policy_id str
The ID of the new security policy.
policy_name str
The name to be used for the new security policy. If not specified, the name will be autogenerated with the pattern ‘clone from ‘.
policy_prefix str
The four-character policy prefix to be used for the new security policy. If not specified, the prefix will be autogenerated.
version int

Package Details

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