Want to learn about running containers in Lambda? Join our free hands-on workshop. Register Now

CpCode

The akamai.properties.CpCode resource allows you to create or re-use CP Codes.

If the CP Code already exists it will be used instead of creating a new one.

Example Usage

Basic usage:

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var cpCode = new Akamai.Properties.CpCode("cpCode", new Akamai.Properties.CpCodeArgs
        {
            Contract = akamai_contract.Contract.Id,
            Group = akamai_group.Group.Id,
            Product = "prd_xxx",
        });
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := properties.NewCpCode(ctx, "cpCode", &properties.CpCodeArgs{
            Contract: pulumi.Any(akamai_contract.Contract.Id),
            Group:    pulumi.Any(akamai_group.Group.Id),
            Product:  pulumi.String("prd_xxx"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_akamai as akamai

cp_code = akamai.properties.CpCode("cpCode",
    contract=akamai_contract["contract"]["id"],
    group=akamai_group["group"]["id"],
    product="prd_xxx")
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const cpCode = new akamai.properties.CpCode("cp_code", {
    contract: akamai_contract_contract.id,
    group: akamai_group_group.id,
    product: "prd_xxx",
});

Create a CpCode Resource

new CpCode(name: string, args: CpCodeArgs, opts?: CustomResourceOptions);
def CpCode(resource_name, opts=None, contract=None, group=None, name=None, product=None, __props__=None)
func NewCpCode(ctx *Context, name string, args CpCodeArgs, opts ...ResourceOption) (*CpCode, error)
public CpCode(string name, CpCodeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args CpCodeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args CpCodeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args CpCodeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

CpCode Resource Properties

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

Inputs

The CpCode resource accepts the following input properties:

Contract string

— (Required) The Contract ID

Group string

— (Required) The Group ID

Product string

— (Required) The Product ID

Name string

— (Required) The CP Code name

Contract string

— (Required) The Contract ID

Group string

— (Required) The Group ID

Product string

— (Required) The Product ID

Name string

— (Required) The CP Code name

contract string

— (Required) The Contract ID

group string

— (Required) The Group ID

product string

— (Required) The Product ID

name string

— (Required) The CP Code name

contract str

— (Required) The Contract ID

group str

— (Required) The Group ID

product str

— (Required) The Product ID

name str

— (Required) The CP Code name

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing CpCode Resource

Get an existing CpCode 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?: CpCodeState, opts?: CustomResourceOptions): CpCode
static get(resource_name, id, opts=None, contract=None, group=None, name=None, product=None, __props__=None)
func GetCpCode(ctx *Context, name string, id IDInput, state *CpCodeState, opts ...ResourceOption) (*CpCode, error)
public static CpCode Get(string name, Input<string> id, CpCodeState? 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:

Contract string

— (Required) The Contract ID

Group string

— (Required) The Group ID

Name string

— (Required) The CP Code name

Product string

— (Required) The Product ID

Contract string

— (Required) The Contract ID

Group string

— (Required) The Group ID

Name string

— (Required) The CP Code name

Product string

— (Required) The Product ID

contract string

— (Required) The Contract ID

group string

— (Required) The Group ID

name string

— (Required) The CP Code name

product string

— (Required) The Product ID

contract str

— (Required) The Contract ID

group str

— (Required) The Group ID

name str

— (Required) The CP Code name

product str

— (Required) The Product 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.