akamai logo
Akamai v4.1.0, Jan 25 23

akamai.getContracts

Use the akamai.getContracts data source to list contracts associated with the EdgeGrid API client token you’re using.

Attributes reference

This data source returns these attributes:

  • contracts - A list of supported contracts, with the following properties:
    • contract_id - The contract’s unique ID, including the ctr_ prefix.
    • contract_type_name - The type of contract, either DIRECT_CUSTOMER, INDIRECT_CUSTOMER, PARENT_CUSTOMER, REFERRAL_PARTNER, TIER_1_RESELLER, VAR_CUSTOMER, VALUE_ADDED_RESELLER, PARTNER, PORTAL_PARTNER, STREAMING_RESELLER, AKAMAI_INTERNAL, or UNKNOWN.

Example Usage

Return contracts associated with the EdgeGrid API client token currently used for authentication

using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;

return await Deployment.RunAsync(() => 
{
    var my_example = Akamai.GetContracts.Invoke();

    return new Dictionary<string, object?>
    {
        ["propertyMatch"] = my_example.Apply(getContractsResult => getContractsResult),
    };
});
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		my_example, err := akamai.GetContracts(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("propertyMatch", my_example)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var my-example = AkamaiFunctions.getContracts();

        ctx.export("propertyMatch", my_example);
    }
}
import pulumi
import pulumi_akamai as akamai

my_example = akamai.get_contracts()
pulumi.export("propertyMatch", my_example)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const my-example = akamai.getContracts({});
export const propertyMatch = my_example;
variables:
  my-example:
    fn::invoke:
      Function: akamai:getContracts
      Arguments: {}
outputs:
  propertyMatch: ${["my-example"]}

Using getContracts

function getContracts(opts?: InvokeOptions): Promise<GetContractsResult>
def get_contracts(opts: Optional[InvokeOptions] = None) -> GetContractsResult
func GetContracts(ctx *Context, opts ...InvokeOption) (*GetContractsResult, error)

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

public static class GetContracts 
{
    public static Task<GetContractsResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetContractsResult> getContracts(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getContracts:getContracts
  arguments:
    # arguments dictionary

getContracts Result

The following output properties are available:

Contracts List<GetContractsContract>
Id string

The provider-assigned unique ID for this managed resource.

Contracts []GetContractsContract
Id string

The provider-assigned unique ID for this managed resource.

contracts List<GetContractsContract>
id String

The provider-assigned unique ID for this managed resource.

contracts GetContractsContract[]
id string

The provider-assigned unique ID for this managed resource.

contracts Sequence[GetContractsContract]
id str

The provider-assigned unique ID for this managed resource.

contracts List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

Supporting Types

GetContractsContract

Package Details

Repository
Akamai pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.