Akamai

v3.0.0 published on Monday, Jul 25, 2022 by Pulumi

getAppSecAdvancedSettingsPragmaHeader

Scopes: Security configuration; security policy

Returns pragma header settings information. This HTTP header provides information about such things as: the edge routers used in a transaction; the Akamai IP addresses involved; information about whether a request was cached or not; and so on. By default, pragma headers are removed from all responses.

Additional information is available from the PragmaHeader members section of the Application Security API.

Related API Endpoint: /appsec/v1/configs/{configId}/versions/{versionNumber}/advanced-settings/pragma-header

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 information about the pragma header settings.
  • output_text. Tabular report showing the pragma header settings.

Example 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 pragmaHeader = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecAdvancedSettingsPragmaHeader.InvokeAsync(new Akamai.GetAppSecAdvancedSettingsPragmaHeaderArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.AdvancedSettingsPragmaHeaderOutput = pragmaHeader.Apply(pragmaHeader => pragmaHeader.OutputText);
        this.AdvancedSettingsPragmaHeaderJson = pragmaHeader.Apply(pragmaHeader => pragmaHeader.Json);
        var policyPragmaHeader = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecAdvancedSettingsPragmaHeader.InvokeAsync(new Akamai.GetAppSecAdvancedSettingsPragmaHeaderArgs
        {
            ConfigId = configuration.ConfigId,
            SecurityPolicyId = "gms1_134637",
        })));
        this.AdvancedSettingsPolicyPragmaHeaderOutput = policyPragmaHeader.Apply(policyPragmaHeader => policyPragmaHeader.OutputText);
        this.AdvancedSettingsPolicyPragmaHeaderJson = policyPragmaHeader.Apply(policyPragmaHeader => policyPragmaHeader.Json);
    }

    [Output("advancedSettingsPragmaHeaderOutput")]
    public Output<string> AdvancedSettingsPragmaHeaderOutput { get; set; }
    [Output("advancedSettingsPragmaHeaderJson")]
    public Output<string> AdvancedSettingsPragmaHeaderJson { get; set; }
    [Output("advancedSettingsPolicyPragmaHeaderOutput")]
    public Output<string> AdvancedSettingsPolicyPragmaHeaderOutput { get; set; }
    [Output("advancedSettingsPolicyPragmaHeaderJson")]
    public Output<string> AdvancedSettingsPolicyPragmaHeaderJson { 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
		}
		pragmaHeader, err := akamai.LookupAppSecAdvancedSettingsPragmaHeader(ctx, &GetAppSecAdvancedSettingsPragmaHeaderArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("advancedSettingsPragmaHeaderOutput", pragmaHeader.OutputText)
		ctx.Export("advancedSettingsPragmaHeaderJson", pragmaHeader.Json)
		policyPragmaHeader, err := akamai.LookupAppSecAdvancedSettingsPragmaHeader(ctx, &GetAppSecAdvancedSettingsPragmaHeaderArgs{
			ConfigId:         configuration.ConfigId,
			SecurityPolicyId: pulumi.StringRef("gms1_134637"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("advancedSettingsPolicyPragmaHeaderOutput", policyPragmaHeader.OutputText)
		ctx.Export("advancedSettingsPolicyPragmaHeaderJson", policyPragmaHeader.Json)
		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.GetAppSecAdvancedSettingsPragmaHeaderArgs;
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 pragmaHeader = AkamaiFunctions.getAppSecAdvancedSettingsPragmaHeader(GetAppSecAdvancedSettingsPragmaHeaderArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .build());

        ctx.export("advancedSettingsPragmaHeaderOutput", pragmaHeader.applyValue(getAppSecAdvancedSettingsPragmaHeaderResult -> getAppSecAdvancedSettingsPragmaHeaderResult.outputText()));
        ctx.export("advancedSettingsPragmaHeaderJson", pragmaHeader.applyValue(getAppSecAdvancedSettingsPragmaHeaderResult -> getAppSecAdvancedSettingsPragmaHeaderResult.json()));
        final var policyPragmaHeader = AkamaiFunctions.getAppSecAdvancedSettingsPragmaHeader(GetAppSecAdvancedSettingsPragmaHeaderArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .securityPolicyId("gms1_134637")
            .build());

        ctx.export("advancedSettingsPolicyPragmaHeaderOutput", policyPragmaHeader.applyValue(getAppSecAdvancedSettingsPragmaHeaderResult -> getAppSecAdvancedSettingsPragmaHeaderResult.outputText()));
        ctx.export("advancedSettingsPolicyPragmaHeaderJson", policyPragmaHeader.applyValue(getAppSecAdvancedSettingsPragmaHeaderResult -> getAppSecAdvancedSettingsPragmaHeaderResult.json()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
pragma_header = akamai.get_app_sec_advanced_settings_pragma_header(config_id=configuration.config_id)
pulumi.export("advancedSettingsPragmaHeaderOutput", pragma_header.output_text)
pulumi.export("advancedSettingsPragmaHeaderJson", pragma_header.json)
policy_pragma_header = akamai.get_app_sec_advanced_settings_pragma_header(config_id=configuration.config_id,
    security_policy_id="gms1_134637")
pulumi.export("advancedSettingsPolicyPragmaHeaderOutput", policy_pragma_header.output_text)
pulumi.export("advancedSettingsPolicyPragmaHeaderJson", policy_pragma_header.json)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const pragmaHeader = configuration.then(configuration => akamai.getAppSecAdvancedSettingsPragmaHeader({
    configId: configuration.configId,
}));
export const advancedSettingsPragmaHeaderOutput = pragmaHeader.then(pragmaHeader => pragmaHeader.outputText);
export const advancedSettingsPragmaHeaderJson = pragmaHeader.then(pragmaHeader => pragmaHeader.json);
const policyPragmaHeader = configuration.then(configuration => akamai.getAppSecAdvancedSettingsPragmaHeader({
    configId: configuration.configId,
    securityPolicyId: "gms1_134637",
}));
export const advancedSettingsPolicyPragmaHeaderOutput = policyPragmaHeader.then(policyPragmaHeader => policyPragmaHeader.outputText);
export const advancedSettingsPolicyPragmaHeaderJson = policyPragmaHeader.then(policyPragmaHeader => policyPragmaHeader.json);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  pragmaHeader:
    Fn::Invoke:
      Function: akamai:getAppSecAdvancedSettingsPragmaHeader
      Arguments:
        configId: ${configuration.configId}
  policyPragmaHeader:
    Fn::Invoke:
      Function: akamai:getAppSecAdvancedSettingsPragmaHeader
      Arguments:
        configId: ${configuration.configId}
        securityPolicyId: gms1_134637
outputs:
  advancedSettingsPragmaHeaderOutput: ${pragmaHeader.outputText}
  advancedSettingsPragmaHeaderJson: ${pragmaHeader.json}
  advancedSettingsPolicyPragmaHeaderOutput: ${policyPragmaHeader.outputText}
  advancedSettingsPolicyPragmaHeaderJson: ${policyPragmaHeader.json}

Using getAppSecAdvancedSettingsPragmaHeader

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 getAppSecAdvancedSettingsPragmaHeader(args: GetAppSecAdvancedSettingsPragmaHeaderArgs, opts?: InvokeOptions): Promise<GetAppSecAdvancedSettingsPragmaHeaderResult>
function getAppSecAdvancedSettingsPragmaHeaderOutput(args: GetAppSecAdvancedSettingsPragmaHeaderOutputArgs, opts?: InvokeOptions): Output<GetAppSecAdvancedSettingsPragmaHeaderResult>
def get_app_sec_advanced_settings_pragma_header(config_id: Optional[int] = None,
                                                security_policy_id: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetAppSecAdvancedSettingsPragmaHeaderResult
def get_app_sec_advanced_settings_pragma_header_output(config_id: Optional[pulumi.Input[int]] = None,
                                                security_policy_id: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetAppSecAdvancedSettingsPragmaHeaderResult]
func LookupAppSecAdvancedSettingsPragmaHeader(ctx *Context, args *LookupAppSecAdvancedSettingsPragmaHeaderArgs, opts ...InvokeOption) (*LookupAppSecAdvancedSettingsPragmaHeaderResult, error)
func LookupAppSecAdvancedSettingsPragmaHeaderOutput(ctx *Context, args *LookupAppSecAdvancedSettingsPragmaHeaderOutputArgs, opts ...InvokeOption) LookupAppSecAdvancedSettingsPragmaHeaderResultOutput

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

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

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the pragma header settings.

SecurityPolicyId string

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

ConfigId int

. Unique identifier of the security configuration associated with the pragma header settings.

SecurityPolicyId string

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

configId Integer

. Unique identifier of the security configuration associated with the pragma header settings.

securityPolicyId String

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

configId number

. Unique identifier of the security configuration associated with the pragma header settings.

securityPolicyId string

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

config_id int

. Unique identifier of the security configuration associated with the pragma header settings.

security_policy_id str

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

configId Number

. Unique identifier of the security configuration associated with the pragma header settings.

securityPolicyId String

. Unique identifier of the security policy associated with the pragma header settings. If not included, information is returned for all your security policies.

getAppSecAdvancedSettingsPragmaHeader Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
SecurityPolicyId string
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
SecurityPolicyId string
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId String
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
securityPolicyId string
config_id int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
security_policy_id str
configId Number
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
securityPolicyId 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.