getAppSecContractsGroups

Use the akamai.getAppSecContractsGroups data source to retrieve information about the contracts and groups for your account. Each object contains the contract, groups associated with the contract, and whether Kona Site Defender or Web Application Protector is the product for that contract. You’ll need this information when you create a new security configuration or when you want to get a list of hostnames still available for use in a security policy. The information available via this data source is described here.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var contractsGroups = Output.Create(Akamai.GetAppSecContractsGroups.InvokeAsync(new Akamai.GetAppSecContractsGroupsArgs
        {
            Contractid = @var.Contractid,
            Groupid = @var.Groupid,
        }));
        this.ContractsGroupsList = contractsGroups.Apply(contractsGroups => contractsGroups.OutputText);
        this.ContractsGroupsJson = contractsGroups.Apply(contractsGroups => contractsGroups.Json);
        this.ContractGroupsDefaultContractid = contractsGroups.Apply(contractsGroups => contractsGroups.DefaultContractid);
        this.ContractGroupsDefaultGroupid = contractsGroups.Apply(contractsGroups => contractsGroups.DefaultGroupid);
    }

    [Output("contractsGroupsList")]
    public Output<string> ContractsGroupsList { get; set; }
    [Output("contractsGroupsJson")]
    public Output<string> ContractsGroupsJson { get; set; }
    [Output("contractGroupsDefaultContractid")]
    public Output<string> ContractGroupsDefaultContractid { get; set; }
    [Output("contractGroupsDefaultGroupid")]
    public Output<string> ContractGroupsDefaultGroupid { 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 := _var.Contractid
		opt1 := _var.Groupid
		contractsGroups, err := akamai.GetAppSecContractsGroups(ctx, &akamai.GetAppSecContractsGroupsArgs{
			Contractid: &opt0,
			Groupid:    &opt1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("contractsGroupsList", contractsGroups.OutputText)
		ctx.Export("contractsGroupsJson", contractsGroups.Json)
		ctx.Export("contractGroupsDefaultContractid", contractsGroups.DefaultContractid)
		ctx.Export("contractGroupsDefaultGroupid", contractsGroups.DefaultGroupid)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

contracts_groups = akamai.get_app_sec_contracts_groups(contractid=var["contractid"],
    groupid=var["groupid"])
pulumi.export("contractsGroupsList", contracts_groups.output_text)
pulumi.export("contractsGroupsJson", contracts_groups.json)
pulumi.export("contractGroupsDefaultContractid", contracts_groups.default_contractid)
pulumi.export("contractGroupsDefaultGroupid", contracts_groups.default_groupid)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const contractsGroups = akamai.getAppSecContractsGroups({
    contractid: _var.contractid,
    groupid: _var.groupid,
});
export const contractsGroupsList = contractsGroups.then(contractsGroups => contractsGroups.outputText);
export const contractsGroupsJson = contractsGroups.then(contractsGroups => contractsGroups.json);
export const contractGroupsDefaultContractid = contractsGroups.then(contractsGroups => contractsGroups.defaultContractid);
export const contractGroupsDefaultGroupid = contractsGroups.then(contractsGroups => contractsGroups.defaultGroupid);

Using getAppSecContractsGroups

function getAppSecContractsGroups(args: GetAppSecContractsGroupsArgs, opts?: InvokeOptions): Promise<GetAppSecContractsGroupsResult>
def get_app_sec_contracts_groups(contractid: Optional[str] = None,
                                 groupid: Optional[int] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetAppSecContractsGroupsResult
func GetAppSecContractsGroups(ctx *Context, args *GetAppSecContractsGroupsArgs, opts ...InvokeOption) (*GetAppSecContractsGroupsResult, error)

Note: This function is named GetAppSecContractsGroups in the Go SDK.

public static class GetAppSecContractsGroups {
    public static Task<GetAppSecContractsGroupsResult> InvokeAsync(GetAppSecContractsGroupsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Contractid string
(Optional) The ID of a contract for which to retrieve information.
Groupid int
(Optional) The ID of a group for which to retrieve information.
Contractid string
(Optional) The ID of a contract for which to retrieve information.
Groupid int
(Optional) The ID of a group for which to retrieve information.
contractid string
(Optional) The ID of a contract for which to retrieve information.
groupid number
(Optional) The ID of a group for which to retrieve information.
contractid str
(Optional) The ID of a contract for which to retrieve information.
groupid int
(Optional) The ID of a group for which to retrieve information.

getAppSecContractsGroups Result

The following output properties are available:

DefaultContractid string
The default contract ID for the specified contract and group.
DefaultGroupid int
The default group ID for the specified contract and group.
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the contract and group information.
OutputText string
A tabular display showing the contract and group information.
Contractid string
(Optional) The ID of a contract for which to retrieve information.
Groupid int
(Optional) The ID of a group for which to retrieve information.
DefaultContractid string
The default contract ID for the specified contract and group.
DefaultGroupid int
The default group ID for the specified contract and group.
Id string
The provider-assigned unique ID for this managed resource.
Json string
A JSON-formatted list of the contract and group information.
OutputText string
A tabular display showing the contract and group information.
Contractid string
(Optional) The ID of a contract for which to retrieve information.
Groupid int
(Optional) The ID of a group for which to retrieve information.
defaultContractid string
The default contract ID for the specified contract and group.
defaultGroupid number
The default group ID for the specified contract and group.
id string
The provider-assigned unique ID for this managed resource.
json string
A JSON-formatted list of the contract and group information.
outputText string
A tabular display showing the contract and group information.
contractid string
(Optional) The ID of a contract for which to retrieve information.
groupid number
(Optional) The ID of a group for which to retrieve information.
default_contractid str
The default contract ID for the specified contract and group.
default_groupid int
The default group ID for the specified contract and group.
id str
The provider-assigned unique ID for this managed resource.
json str
A JSON-formatted list of the contract and group information.
output_text str
A tabular display showing the contract and group information.
contractid str
(Optional) The ID of a contract for which to retrieve information.
groupid int
(Optional) The ID of a group for which to retrieve information.

Package Details

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