Akamai

Pulumi Official
Package maintained by Pulumi
v2.9.0 published on Wednesday, Apr 6, 2022 by Pulumi

getAppSecContractsGroups

Scopes: Contract; group

Returns information about the contracts and groups associated with your account. Among other things, this information is required to create a new security configuration and to return a list of the hostnames available for use in a security policy. The returned information for this data source is described in the List contracts and groups of the Application Security API.

Related API Endpoint: /appsec/v1/contracts-groups

Output Options

The following options can be used to determine the information returned, and how that returned information is formatted:

  • json. JSON-formatted list of contract and group information.
  • output_text. Tabular report of contract and group information.
  • default_contractid. Default contract ID for the specified contract and group.
  • default_groupid. Default group ID for the specified contract and group.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var contractsGroups = Output.Create(Akamai.GetAppSecContractsGroups.InvokeAsync(new Akamai.GetAppSecContractsGroupsArgs
        {
            Contractid = "5-2WA382",
            Groupid = 12198,
        }));
        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 {
		contractsGroups, err := akamai.GetAppSecContractsGroups(ctx, &GetAppSecContractsGroupsArgs{
			Contractid: pulumi.StringRef("5-2WA382"),
			Groupid:    pulumi.IntRef(12198),
		}, 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
	})
}

Coming soon!

import pulumi
import pulumi_akamai as akamai

contracts_groups = akamai.get_app_sec_contracts_groups(contractid="5-2WA382",
    groupid=12198)
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: "5-2WA382",
    groupid: 12198,
});
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);

Coming soon!

Using getAppSecContractsGroups

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

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

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

public static class GetAppSecContractsGroups 
{
    public static Task<GetAppSecContractsGroupsResult> InvokeAsync(GetAppSecContractsGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecContractsGroupsResult> Invoke(GetAppSecContractsGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecContractsGroupsResult> getAppSecContractsGroups(GetAppSecContractsGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: akamai:index/getAppSecContractsGroups:getAppSecContractsGroups
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Contractid string

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

Groupid int

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

Contractid string

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

Groupid int

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

contractid String

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

groupid Integer

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

contractid string

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

groupid number

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

contractid str

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

groupid int

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

contractid String

. Unique identifier of an Akamai contract. If not included, information is returned for all the Akamai contracts associated with your account.

groupid Number

. Unique identifier of a contract group. If not included, information is returned for all the groups associated with your account.

getAppSecContractsGroups Result

The following output properties are available:

DefaultContractid string
DefaultGroupid int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
Contractid string
Groupid int
DefaultContractid string
DefaultGroupid int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
Contractid string
Groupid int
defaultContractid String
defaultGroupid Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
contractid String
groupid Integer
defaultContractid string
defaultGroupid number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
contractid string
groupid number
default_contractid str
default_groupid int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
contractid str
groupid int
defaultContractid String
defaultGroupid Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
contractid String
groupid Number

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.