Akamai

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

getAppSecMalwareContentTypes

Scopes: Security configuration; malware protection

Returns information about available content types for malware protection. Each malware policy includes a set of content types to which the policy’s actions are applied.

Output Options

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

  • output_text. Tabular report showing the available content types.
  • json. JSON-formatted list of the available content types.

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 malwareContentTypes = configuration.Apply(configuration => Output.Create(Akamai.GetAppSecMalwareContentTypes.InvokeAsync(new Akamai.GetAppSecMalwareContentTypesArgs
        {
            ConfigId = configuration.ConfigId,
        })));
        this.MalwareContentTypesOutput = malwareContentTypes.Apply(malwareContentTypes => malwareContentTypes.OutputText);
        this.MalwareContentTypesJson = malwareContentTypes.Apply(malwareContentTypes => malwareContentTypes.Json);
    }

    [Output("malwareContentTypesOutput")]
    public Output<string> MalwareContentTypesOutput { get; set; }
    [Output("malwareContentTypesJson")]
    public Output<string> MalwareContentTypesJson { 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
		}
		malwareContentTypes, err := akamai.GetAppSecMalwareContentTypes(ctx, &GetAppSecMalwareContentTypesArgs{
			ConfigId: configuration.ConfigId,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("malwareContentTypesOutput", malwareContentTypes.OutputText)
		ctx.Export("malwareContentTypesJson", malwareContentTypes.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.GetAppSecMalwareContentTypesArgs;
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 malwareContentTypes = AkamaiFunctions.getAppSecMalwareContentTypes(GetAppSecMalwareContentTypesArgs.builder()
            .configId(configuration.applyValue(getAppSecConfigurationResult -> getAppSecConfigurationResult.configId()))
            .build());

        ctx.export("malwareContentTypesOutput", malwareContentTypes.applyValue(getAppSecMalwareContentTypesResult -> getAppSecMalwareContentTypesResult.outputText()));
        ctx.export("malwareContentTypesJson", malwareContentTypes.applyValue(getAppSecMalwareContentTypesResult -> getAppSecMalwareContentTypesResult.json()));
    }
}
import pulumi
import pulumi_akamai as akamai

configuration = akamai.get_app_sec_configuration(name="Documentation")
malware_content_types = akamai.get_app_sec_malware_content_types(config_id=configuration.config_id)
pulumi.export("malwareContentTypesOutput", malware_content_types.output_text)
pulumi.export("malwareContentTypesJson", malware_content_types.json)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const configuration = akamai.getAppSecConfiguration({
    name: "Documentation",
});
const malwareContentTypes = configuration.then(configuration => akamai.getAppSecMalwareContentTypes({
    configId: configuration.configId,
}));
export const malwareContentTypesOutput = malwareContentTypes.then(malwareContentTypes => malwareContentTypes.outputText);
export const malwareContentTypesJson = malwareContentTypes.then(malwareContentTypes => malwareContentTypes.json);
variables:
  configuration:
    Fn::Invoke:
      Function: akamai:getAppSecConfiguration
      Arguments:
        name: Documentation
  malwareContentTypes:
    Fn::Invoke:
      Function: akamai:getAppSecMalwareContentTypes
      Arguments:
        configId: ${configuration.configId}
outputs:
  malwareContentTypesOutput: ${malwareContentTypes.outputText}
  malwareContentTypesJson: ${malwareContentTypes.json}

Using getAppSecMalwareContentTypes

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 getAppSecMalwareContentTypes(args: GetAppSecMalwareContentTypesArgs, opts?: InvokeOptions): Promise<GetAppSecMalwareContentTypesResult>
function getAppSecMalwareContentTypesOutput(args: GetAppSecMalwareContentTypesOutputArgs, opts?: InvokeOptions): Output<GetAppSecMalwareContentTypesResult>
def get_app_sec_malware_content_types(config_id: Optional[int] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetAppSecMalwareContentTypesResult
def get_app_sec_malware_content_types_output(config_id: Optional[pulumi.Input[int]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetAppSecMalwareContentTypesResult]
func GetAppSecMalwareContentTypes(ctx *Context, args *GetAppSecMalwareContentTypesArgs, opts ...InvokeOption) (*GetAppSecMalwareContentTypesResult, error)
func GetAppSecMalwareContentTypesOutput(ctx *Context, args *GetAppSecMalwareContentTypesOutputArgs, opts ...InvokeOption) GetAppSecMalwareContentTypesResultOutput

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

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

The following arguments are supported:

ConfigId int

. Unique identifier of the security configuration associated with the content types.

ConfigId int

. Unique identifier of the security configuration associated with the content types.

configId Integer

. Unique identifier of the security configuration associated with the content types.

configId number

. Unique identifier of the security configuration associated with the content types.

config_id int

. Unique identifier of the security configuration associated with the content types.

configId Number

. Unique identifier of the security configuration associated with the content types.

getAppSecMalwareContentTypes Result

The following output properties are available:

ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
ConfigId int
Id string

The provider-assigned unique ID for this managed resource.

Json string
OutputText string
configId Integer
id String

The provider-assigned unique ID for this managed resource.

json String
outputText String
configId number
id string

The provider-assigned unique ID for this managed resource.

json string
outputText string
config_id int
id str

The provider-assigned unique ID for this managed resource.

json str
output_text str
configId Number
id String

The provider-assigned unique ID for this managed resource.

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