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.
  • 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.

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
        {
            Contacts = 
            {
                "user@example.org",
            },
            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,
        });
        // not specifying network will target STAGING
        var exampleProd = new Akamai.PropertyActivation("exampleProd", new Akamai.PropertyActivationArgs
        {
            PropertyId = example.Id,
            Network = "PRODUCTION",
            Version = 3,
            Contacts = 
            {
                email,
            },
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                exampleStaging,
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_akamai as akamai

email = "user@example.org"
rule_format = "v2020-03-04"
example = akamai.Property("example",
    contacts=["user@example.org"],
    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)
# not specifying network will target STAGING
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", {
    contacts: ["user@example.org"],
    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,
});
// not specifying network will target STAGING
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,
                       contacts: Optional[Sequence[str]] = None,
                       network: Optional[str] = None,
                       property: Optional[str] = None,
                       property_id: Optional[str] = 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 Programming Model docs.

Inputs

The PropertyActivation resource accepts the following input properties:

Contacts List<string>
Version int
ActivationId string
Network string
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
Contacts []string
Version int
ActivationId string
Network string
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
contacts string[]
version number
activationId string
network string
property string

Deprecated: The setting "property" has been deprecated.

propertyId string
contacts Sequence[str]
version int
activation_id str
network str
property str

Deprecated: The setting "property" has been deprecated.

property_id str

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,
        contacts: Optional[Sequence[str]] = None,
        errors: Optional[str] = None,
        network: Optional[str] = None,
        property: Optional[str] = None,
        property_id: Optional[str] = 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
Contacts List<string>
Errors string
Network string
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
Status string
Version int
Warnings string
ActivationId string
Contacts []string
Errors string
Network string
Property string

Deprecated: The setting "property" has been deprecated.

PropertyId string
Status string
Version int
Warnings string
activationId string
contacts string[]
errors string
network string
property string

Deprecated: The setting "property" has been deprecated.

propertyId string
status string
version number
warnings string
activation_id str
contacts Sequence[str]
errors str
network str
property str

Deprecated: The setting "property" has been deprecated.

property_id str
status str
version int
warnings str

Package Details

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