Akamai

v3.1.1 published on Tuesday, Nov 1, 2022 by Pulumi

getAppSecExportConfiguration

Output Options

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

  • json. Complete set of information about the specified security configuration version in JSON format. When this option is included information is always returned for the entire configuration. Among other things, that means that, if your command uses the search parameter, that parameter is ignored.
  • output_text. Tabular report showing the types of data specified in the search parameter. Valid only if the search parameter references at least one type.

Example Usage

Basic usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var configuration = Output.Create(Akamai.GetAppSecConfiguration.InvokeAsync(new Akamai.GetAppSecConfigurationArgs
        {
            Name = "Documentation",
        }));
        var export = Output.Tuple(configuration, configuration).Apply(values =>
        {
            var configuration = values.Item1;
            var configuration1 = values.Item2;
            return Output.Create(Akamai.GetAppSecExportConfiguration.InvokeAsync(new Akamai.GetAppSecExportConfigurationArgs
            {
                ConfigId = configuration.ConfigId,
                Version = configuration1.LatestVersion,
                Searches = 
                {
                    "securityPolicies",
                    "selectedHosts",
                },
            }));
        });
        this.Json = export.Apply(export => export.Json);
        this.Text = export.Apply(export => export.OutputText);
    }

    [Output("json")]
    public Output<string> Json { get; set; }
    [Output("text")]
    public Output<string> Text { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		configuration, err := akamai.LookupAppSecConfiguration(ctx, &GetAppSecConfigurationArgs{
			Name: pulumi.StringRef("Documentation"),
		}, nil)
		if err != nil {
			return err
		}
		export, err := akamai.GetAppSecExportConfiguration(ctx, &GetAppSecExportConfigurationArgs{
			ConfigId: configuration.ConfigId,
			Version:  configuration.LatestVersion,
			Searches: []string{
				"securityPolicies",
				"selectedHosts",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("json", export.Json)
		ctx.Export("text", export.OutputText)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetAppSecConfigurationArgs;
import com.pulumi.akamai.inputs.GetAppSecExportConfigurationArgs;
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 configuration = AkamaiFunctions.getAppSecConfiguration(GetAppSecConfigurationArgs.builder()
            .name("Documentation")
            .build());

        final var export = AkamaiFunctions.getAppSecExportConfiguration(GetAppSecExportConfigurationArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .version(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.latestVersion()))
            .searches(            
                "securityPolicies",
                "selectedHosts")
            .build());

        ctx.export("json", export.applyValue(getAppSecExportConfigurationResult -> getAppSecExportConfigurationResult.json()));
        ctx.export("text", export.applyValue(getAppSecExportConfigurationResult -> getAppSecExportConfigurationResult.outputText()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
export = akamai.get_app_sec_export_configuration(config_id=configuration.config_id,
    version=configuration.latest_version,
    searches=[
        "securityPolicies",
        "selectedHosts",
    ])
pulumi.export("json", export.json)
pulumi.export("text", export.output_text)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const export = Promise.all([configuration, configuration]).then(([configuration, configuration1]) => akamai.getAppSecExportConfiguration({
    configId: configuration.configId,
    version: configuration1.latestVersion,
    searches: [
        "securityPolicies",
        "selectedHosts",
    ],
}));
export const json = _export.then(_export => _export.json);
export const text = _export.then(_export => _export.outputText);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  export:
    Fn::Invoke:
      Function: akamai:getAppSecExportConfiguration
      Arguments:
        configId: ${configuration.configId}
        version: ${configuration.latestVersion}
        searches:
          - securityPolicies
          - selectedHosts
outputs:
  json: ${export.json}
  text: ${export.outputText}

Using getAppSecExportConfiguration

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 getAppSecExportConfiguration(args: GetAppSecExportConfigurationArgs, opts?: InvokeOptions): Promise<GetAppSecExportConfigurationResult>
function getAppSecExportConfigurationOutput(args: GetAppSecExportConfigurationOutputArgs, opts?: InvokeOptions): Output<GetAppSecExportConfigurationResult>
def get_app_sec_export_configuration(config_id: Optional[int] = None,
                                     searches: Optional[Sequence[str]] = None,
                                     version: Optional[int] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetAppSecExportConfigurationResult
def get_app_sec_export_configuration_output(config_id: Optional[pulumi.Input[int]] = None,
                                     searches: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                     version: Optional[pulumi.Input[int]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetAppSecExportConfigurationResult]
func GetAppSecExportConfiguration(ctx *Context, args *GetAppSecExportConfigurationArgs, opts ...InvokeOption) (*GetAppSecExportConfigurationResult, error)
func GetAppSecExportConfigurationOutput(ctx *Context, args *GetAppSecExportConfigurationOutputArgs, opts ...InvokeOption) GetAppSecExportConfigurationResultOutput

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

public static class GetAppSecExportConfiguration 
{
    public static Task<GetAppSecExportConfigurationResult> InvokeAsync(GetAppSecExportConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetAppSecExportConfigurationResult> Invoke(GetAppSecExportConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppSecExportConfigurationResult> getAppSecExportConfiguration(GetAppSecExportConfigurationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getAppSecExportConfiguration:getAppSecExportConfiguration
  arguments:
    # arguments dictionary

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration you want to return information for.

Version int

. Version number of the security configuration.

Searches List<string>

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

ConfigId int

. Unique identifier of the security configuration you want to return information for.

Version int

. Version number of the security configuration.

Searches []string

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

configId Integer

. Unique identifier of the security configuration you want to return information for.

version Integer

. Version number of the security configuration.

searches List<String>

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

configId number

. Unique identifier of the security configuration you want to return information for.

version number

. Version number of the security configuration.

searches string[]

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

config_id int

. Unique identifier of the security configuration you want to return information for.

version int

. Version number of the security configuration.

searches Sequence[str]

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

configId Number

. Unique identifier of the security configuration you want to return information for.

version Number

. Version number of the security configuration.

searches List<String>

. JSON array of strings specifying the types of information to be retrieved. Note that there are two different ways to return data by using the search parameter. To return data in tabular format, use one or more of the following terms:

getAppSecExportConfiguration Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
Version int
Searches List<string>
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
Version int
Searches []string
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
version Integer
searches List<String>
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
version number
searches string[]
config_id int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
version int
searches Sequence[str]
configId Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
version Number
searches List<String>

Package Details

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

This Pulumi package is based on the akamai Terraform Provider.