PropertyActivation

The akamai.PropertyActivation resource lets you activate a property version. An activation deploys the version to either the Akamai staging or production network. You can activate a specific version multiple times if you need to.

Before activating on production, activate on staging first. This way you can detect any problems in staging before your changes progress to production.

Argument reference

The following arguments are supported:

  • property_id - (Required) The property’s unique identifier, including the prp_ prefix.
  • contact - (Required) One or more email addresses to send activation status changes to.
  • version - (Required) The property version to activate. Previously this field was optional. It now depends on the akamai.Property resource to identify latest instead of calculating it locally. This association helps keep the dependency tree properly aligned. To always use the latest version, enter this value {resource}.{resource identifier}.{field name}. Using the example code above, the entry would be akamai_property.example.latest_version since we want the value of the latest_version attribute in the akamai.Property resource labeled example.
  • network - (Optional) Akamai network to activate on, either STAGING or PRODUCTION. STAGING is the default.
  • note - (Optional) A log message you can assign to the activation request.
  • auto_acknowledge_rule_warnings - (Optional) Whether the activation should proceed despite any warnings. By default set to true.

Deprecated arguments

  • property - (Deprecated) Replaced by property_id. Maintained for legacy purposes.

Attribute reference

The following attributes are returned:

  • id - The unique identifier for this activation.
  • warnings - The contents of warnings field returned by the API. For more information see Errors in the PAPI documentation.
  • errors - The contents of errors field returned by the API. For more information see Errors in the PAPI documentation.
  • activation_id - The ID given to the activation event while it’s in progress.
  • status - The property version’s activation status on the selected network.

Deprecated attributes

  • rule_warnings - (Deprecated) Rule warnings are no longer maintained in the state file. You can still see the warnings in logs.

Example Usage

using System.IO;
using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var email = "user@example.org";
        var ruleFormat = "v2020-03-04";
        var example = new Akamai.Property("example", new Akamai.PropertyArgs
        {
            ProductId = "prd_SPM",
            ContractId = @var.Contractid,
            GroupId = @var.Groupid,
            Hostnames = 
            {
                { "example.org", "example.org.edgesuite.net" },
                { "www.example.org", "example.org.edgesuite.net" },
                { "sub.example.org", "sub.example.org.edgesuite.net" },
            },
            RuleFormat = ruleFormat,
            Rules = File.ReadAllText($"{path.Module}/main.json"),
        });
        var exampleStaging = new Akamai.PropertyActivation("exampleStaging", new Akamai.PropertyActivationArgs
        {
            PropertyId = example.Id,
            Contacts = 
            {
                email,
            },
            Version = example.LatestVersion,
            Note = "Sample activation",
        });
        var exampleProd = new Akamai.PropertyActivation("exampleProd", new Akamai.PropertyActivationArgs
        {
            PropertyId = example.Id,
            Network = "PRODUCTION",
            Version = 3,
            Contacts = 
            {
                email,
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                exampleStaging,
            },
        });
    }

}
package main

import (
	"fmt"
	"io/ioutil"

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

func readFileOrPanic(path string) pulumi.StringPtrInput {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		panic(err.Error())
	}
	return pulumi.String(string(data))
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		email := "user@example.org"
		ruleFormat := "v2020-03-04"
		example, err := akamai.NewProperty(ctx, "example", &akamai.PropertyArgs{
			ProductId:  pulumi.String("prd_SPM"),
			ContractId: pulumi.Any(_var.Contractid),
			GroupId:    pulumi.Any(_var.Groupid),
			Hostnames: PropertyHostnameArray{
				Example.org:     "example.org.edgesuite.net",
				Www.example.org: "example.org.edgesuite.net",
				Sub.example.org: "sub.example.org.edgesuite.net",
			},
			RuleFormat: pulumi.String(ruleFormat),
			Rules:      readFileOrPanic(fmt.Sprintf("%v%v", path.Module, "/main.json")),
		})
		if err != nil {
			return err
		}
		exampleStaging, err := akamai.NewPropertyActivation(ctx, "exampleStaging", &akamai.PropertyActivationArgs{
			PropertyId: example.ID(),
			Contacts: pulumi.StringArray{
				pulumi.String(email),
			},
			Version: example.LatestVersion,
			Note:    pulumi.String("Sample activation"),
		})
		if err != nil {
			return err
		}
		_, err = akamai.NewPropertyActivation(ctx, "exampleProd", &akamai.PropertyActivationArgs{
			PropertyId: example.ID(),
			Network:    pulumi.String("PRODUCTION"),
			Version:    pulumi.Int(3),
			Contacts: pulumi.StringArray{
				pulumi.String(email),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleStaging,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

email = "user@example.org"
rule_format = "v2020-03-04"
example = akamai.Property("example",
    product_id="prd_SPM",
    contract_id=var["contractid"],
    group_id=var["groupid"],
    hostnames={
        "example.org": "example.org.edgesuite.net",
        "www.example.org": "example.org.edgesuite.net",
        "sub.example.org": "sub.example.org.edgesuite.net",
    },
    rule_format=rule_format,
    rules=(lambda path: open(path).read())(f"{path['module']}/main.json"))
example_staging = akamai.PropertyActivation("exampleStaging",
    property_id=example.id,
    contacts=[email],
    version=example.latest_version,
    note="Sample activation")
example_prod = akamai.PropertyActivation("exampleProd",
    property_id=example.id,
    network="PRODUCTION",
    version=3,
    contacts=[email],
    opts=pulumi.ResourceOptions(depends_on=[example_staging]))
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";
import * from "fs";

const email = "user@example.org";
const ruleFormat = "v2020-03-04";
const example = new akamai.Property("example", {
    productId: "prd_SPM",
    contractId: _var.contractid,
    groupId: _var.groupid,
    hostnames: {
        "example.org": "example.org.edgesuite.net",
        "www.example.org": "example.org.edgesuite.net",
        "sub.example.org": "sub.example.org.edgesuite.net",
    },
    ruleFormat: ruleFormat,
    rules: fs.readFileSync(`${path.module}/main.json`),
});
const exampleStaging = new akamai.PropertyActivation("exampleStaging", {
    propertyId: example.id,
    contacts: [email],
    version: example.latestVersion,
    note: "Sample activation",
});
const exampleProd = new akamai.PropertyActivation("exampleProd", {
    propertyId: example.id,
    network: "PRODUCTION",
    version: 3,
    contacts: [email],
}, {
    dependsOn: [exampleStaging],
});

Create a PropertyActivation Resource

new PropertyActivation(name: string, args: PropertyActivationArgs, opts?: CustomResourceOptions);
@overload
def PropertyActivation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       activation_id: Optional[str] = None,
                       auto_acknowledge_rule_warnings: Optional[bool] = None,
                       contacts: Optional[Sequence[str]] = None,
                       network: Optional[str] = None,
                       note: Optional[str] = None,
                       property: Optional[str] = None,
                       property_id: Optional[str] = None,
                       rule_errors: Optional[Sequence[PropertyActivationRuleErrorArgs]] = None,
                       rule_warnings: Optional[Sequence[PropertyActivationRuleWarningArgs]] = None,
                       version: Optional[int] = None)
@overload
def PropertyActivation(resource_name: str,
                       args: PropertyActivationArgs,
                       opts: Optional[ResourceOptions] = None)
func NewPropertyActivation(ctx *Context, name string, args PropertyActivationArgs, opts ...ResourceOption) (*PropertyActivation, error)
public PropertyActivation(string name, PropertyActivationArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PropertyActivationArgs
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 PropertyActivationArgs
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 PropertyActivationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PropertyActivationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

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

Contacts List<string>
Version int
ActivationId string
AutoAcknowledgeRuleWarnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
Network string
Note string
assigns a log message to the activation request
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
RuleErrors List<PropertyActivationRuleErrorArgs>
RuleWarnings List<PropertyActivationRuleWarningArgs>

Deprecated: Rule warnings will not be set in state anymore

Contacts []string
Version int
ActivationId string
AutoAcknowledgeRuleWarnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
Network string
Note string
assigns a log message to the activation request
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
RuleErrors []PropertyActivationRuleErrorArgs
RuleWarnings []PropertyActivationRuleWarningArgs

Deprecated: Rule warnings will not be set in state anymore

contacts string[]
version number
activationId string
autoAcknowledgeRuleWarnings boolean
automatically acknowledge all rule warnings for activation to continue. default is true
network string
note string
assigns a log message to the activation request
property string

Deprecated: The setting "property" has been deprecated.

propertyId string
ruleErrors PropertyActivationRuleErrorArgs[]
ruleWarnings PropertyActivationRuleWarningArgs[]

Deprecated: Rule warnings will not be set in state anymore

contacts Sequence[str]
version int
activation_id str
auto_acknowledge_rule_warnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
network str
note str
assigns a log message to the activation request
property str

Deprecated: The setting "property" has been deprecated.

property_id str
rule_errors Sequence[PropertyActivationRuleErrorArgs]
rule_warnings Sequence[PropertyActivationRuleWarningArgs]

Deprecated: Rule warnings will not be set in state anymore

Outputs

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

Errors string
Id string
The provider-assigned unique ID for this managed resource.
Status string
Warnings string
Errors string
Id string
The provider-assigned unique ID for this managed resource.
Status string
Warnings string
errors string
id string
The provider-assigned unique ID for this managed resource.
status string
warnings string
errors str
id str
The provider-assigned unique ID for this managed resource.
status str
warnings str

Look up an Existing PropertyActivation Resource

Get an existing PropertyActivation 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?: PropertyActivationState, opts?: CustomResourceOptions): PropertyActivation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        activation_id: Optional[str] = None,
        auto_acknowledge_rule_warnings: Optional[bool] = None,
        contacts: Optional[Sequence[str]] = None,
        errors: Optional[str] = None,
        network: Optional[str] = None,
        note: Optional[str] = None,
        property: Optional[str] = None,
        property_id: Optional[str] = None,
        rule_errors: Optional[Sequence[PropertyActivationRuleErrorArgs]] = None,
        rule_warnings: Optional[Sequence[PropertyActivationRuleWarningArgs]] = None,
        status: Optional[str] = None,
        version: Optional[int] = None,
        warnings: Optional[str] = None) -> PropertyActivation
func GetPropertyActivation(ctx *Context, name string, id IDInput, state *PropertyActivationState, opts ...ResourceOption) (*PropertyActivation, error)
public static PropertyActivation Get(string name, Input<string> id, PropertyActivationState? 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:

ActivationId string
AutoAcknowledgeRuleWarnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
Contacts List<string>
Errors string
Network string
Note string
assigns a log message to the activation request
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
RuleErrors List<PropertyActivationRuleErrorArgs>
RuleWarnings List<PropertyActivationRuleWarningArgs>

Deprecated: Rule warnings will not be set in state anymore

Status string
Version int
Warnings string
ActivationId string
AutoAcknowledgeRuleWarnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
Contacts []string
Errors string
Network string
Note string
assigns a log message to the activation request
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
RuleErrors []PropertyActivationRuleErrorArgs
RuleWarnings []PropertyActivationRuleWarningArgs

Deprecated: Rule warnings will not be set in state anymore

Status string
Version int
Warnings string
activationId string
autoAcknowledgeRuleWarnings boolean
automatically acknowledge all rule warnings for activation to continue. default is true
contacts string[]
errors string
network string
note string
assigns a log message to the activation request
property string

Deprecated: The setting "property" has been deprecated.

propertyId string
ruleErrors PropertyActivationRuleErrorArgs[]
ruleWarnings PropertyActivationRuleWarningArgs[]

Deprecated: Rule warnings will not be set in state anymore

status string
version number
warnings string
activation_id str
auto_acknowledge_rule_warnings bool
automatically acknowledge all rule warnings for activation to continue. default is true
contacts Sequence[str]
errors str
network str
note str
assigns a log message to the activation request
property str

Deprecated: The setting "property" has been deprecated.

property_id str
rule_errors Sequence[PropertyActivationRuleErrorArgs]
rule_warnings Sequence[PropertyActivationRuleWarningArgs]

Deprecated: Rule warnings will not be set in state anymore

status str
version int
warnings str

Supporting Types

PropertyActivationRuleError

BehaviorName string
Detail string
ErrorLocation string
Instance string
StatusCode int
Title string
Type string
BehaviorName string
Detail string
ErrorLocation string
Instance string
StatusCode int
Title string
Type string
behaviorName string
detail string
errorLocation string
instance string
statusCode number
title string
type string

PropertyActivationRuleWarning

BehaviorName string
Detail string
ErrorLocation string
Instance string
StatusCode int
Title string
Type string
BehaviorName string
Detail string
ErrorLocation string
Instance string
StatusCode int
Title string
Type string
behaviorName string
detail string
errorLocation string
instance string
statusCode number
title string
type string

Package Details

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