com.pulumi.cloudflare.kotlin.CloudflareFunctions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.CloudflareFunctions.getAccessApplicationPlain
import com.pulumi.cloudflare.CloudflareFunctions.getAccessIdentityProviderPlain
import com.pulumi.cloudflare.CloudflareFunctions.getAccountRolesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getAccountsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getApiTokenPermissionGroupsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getDcvDelegationPlain
import com.pulumi.cloudflare.CloudflareFunctions.getDevicePostureRulesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getDevicesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getDlpDatasetsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getGatewayAppTypesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getGatewayCategoriesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getInfrastructureAccessTargetsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getIpRangesPlain
import com.pulumi.cloudflare.CloudflareFunctions.getListPlain
import com.pulumi.cloudflare.CloudflareFunctions.getListsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getLoadBalancerPoolsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getOriginCaCertificatePlain
import com.pulumi.cloudflare.CloudflareFunctions.getOriginCaRootCertificatePlain
import com.pulumi.cloudflare.CloudflareFunctions.getRecordPlain
import com.pulumi.cloudflare.CloudflareFunctions.getRulesetsPlain
import com.pulumi.cloudflare.CloudflareFunctions.getTunnelPlain
import com.pulumi.cloudflare.CloudflareFunctions.getTunnelVirtualNetworkPlain
import com.pulumi.cloudflare.CloudflareFunctions.getUserPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZeroTrustAccessApplicationPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZeroTrustAccessIdentityProviderPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZeroTrustTunnelCloudflaredPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZeroTrustTunnelVirtualNetworkPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZoneCacheReservePlain
import com.pulumi.cloudflare.CloudflareFunctions.getZoneDnssecPlain
import com.pulumi.cloudflare.CloudflareFunctions.getZonePlain
import com.pulumi.cloudflare.CloudflareFunctions.getZonesPlain
import com.pulumi.cloudflare.kotlin.inputs.GetAccessApplicationPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetAccessApplicationPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetAccessIdentityProviderPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetAccessIdentityProviderPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetAccountRolesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetAccountRolesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetAccountsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetAccountsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetDcvDelegationPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetDcvDelegationPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetDevicePostureRulesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetDevicePostureRulesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetDevicesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetDevicesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetDlpDatasetsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetDlpDatasetsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetGatewayAppTypesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetGatewayAppTypesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetGatewayCategoriesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetGatewayCategoriesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetInfrastructureAccessTargetsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetInfrastructureAccessTargetsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetListPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetListPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetListsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetListsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetLoadBalancerPoolsFilter
import com.pulumi.cloudflare.kotlin.inputs.GetLoadBalancerPoolsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetLoadBalancerPoolsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetLoadBalancerPoolsPool
import com.pulumi.cloudflare.kotlin.inputs.GetOriginCaCertificatePlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetOriginCaCertificatePlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetOriginCaRootCertificatePlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetOriginCaRootCertificatePlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetRecordPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetRecordPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetRulesetsFilter
import com.pulumi.cloudflare.kotlin.inputs.GetRulesetsPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetRulesetsPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetTunnelPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetTunnelPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetTunnelVirtualNetworkPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetTunnelVirtualNetworkPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessApplicationPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessApplicationPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessIdentityProviderPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessIdentityProviderPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelCloudflaredPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelCloudflaredPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelVirtualNetworkPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelVirtualNetworkPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZoneCacheReservePlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZoneCacheReservePlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZoneDnssecPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZoneDnssecPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZonePlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZonePlainArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.GetZonesFilter
import com.pulumi.cloudflare.kotlin.inputs.GetZonesPlainArgs
import com.pulumi.cloudflare.kotlin.inputs.GetZonesPlainArgsBuilder
import com.pulumi.cloudflare.kotlin.outputs.GetAccessApplicationResult
import com.pulumi.cloudflare.kotlin.outputs.GetAccessIdentityProviderResult
import com.pulumi.cloudflare.kotlin.outputs.GetAccountRolesResult
import com.pulumi.cloudflare.kotlin.outputs.GetAccountsResult
import com.pulumi.cloudflare.kotlin.outputs.GetApiTokenPermissionGroupsResult
import com.pulumi.cloudflare.kotlin.outputs.GetDcvDelegationResult
import com.pulumi.cloudflare.kotlin.outputs.GetDevicePostureRulesResult
import com.pulumi.cloudflare.kotlin.outputs.GetDevicesResult
import com.pulumi.cloudflare.kotlin.outputs.GetDlpDatasetsResult
import com.pulumi.cloudflare.kotlin.outputs.GetGatewayAppTypesResult
import com.pulumi.cloudflare.kotlin.outputs.GetGatewayCategoriesResult
import com.pulumi.cloudflare.kotlin.outputs.GetInfrastructureAccessTargetsResult
import com.pulumi.cloudflare.kotlin.outputs.GetIpRangesResult
import com.pulumi.cloudflare.kotlin.outputs.GetListResult
import com.pulumi.cloudflare.kotlin.outputs.GetListsResult
import com.pulumi.cloudflare.kotlin.outputs.GetLoadBalancerPoolsResult
import com.pulumi.cloudflare.kotlin.outputs.GetOriginCaCertificateResult
import com.pulumi.cloudflare.kotlin.outputs.GetOriginCaRootCertificateResult
import com.pulumi.cloudflare.kotlin.outputs.GetRecordResult
import com.pulumi.cloudflare.kotlin.outputs.GetRulesetsResult
import com.pulumi.cloudflare.kotlin.outputs.GetTunnelResult
import com.pulumi.cloudflare.kotlin.outputs.GetTunnelVirtualNetworkResult
import com.pulumi.cloudflare.kotlin.outputs.GetUserResult
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustAccessApplicationResult
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustAccessIdentityProviderResult
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustTunnelCloudflaredResult
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustTunnelVirtualNetworkResult
import com.pulumi.cloudflare.kotlin.outputs.GetZoneCacheReserveResult
import com.pulumi.cloudflare.kotlin.outputs.GetZoneDnssecResult
import com.pulumi.cloudflare.kotlin.outputs.GetZoneResult
import com.pulumi.cloudflare.kotlin.outputs.GetZonesResult
import kotlinx.coroutines.future.await
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.cloudflare.kotlin.outputs.GetAccessApplicationResult.Companion.toKotlin as getAccessApplicationResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetAccessIdentityProviderResult.Companion.toKotlin as getAccessIdentityProviderResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetAccountRolesResult.Companion.toKotlin as getAccountRolesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetAccountsResult.Companion.toKotlin as getAccountsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetApiTokenPermissionGroupsResult.Companion.toKotlin as getApiTokenPermissionGroupsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetDcvDelegationResult.Companion.toKotlin as getDcvDelegationResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetDevicePostureRulesResult.Companion.toKotlin as getDevicePostureRulesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetDevicesResult.Companion.toKotlin as getDevicesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetDlpDatasetsResult.Companion.toKotlin as getDlpDatasetsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetGatewayAppTypesResult.Companion.toKotlin as getGatewayAppTypesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetGatewayCategoriesResult.Companion.toKotlin as getGatewayCategoriesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetInfrastructureAccessTargetsResult.Companion.toKotlin as getInfrastructureAccessTargetsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetIpRangesResult.Companion.toKotlin as getIpRangesResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetListResult.Companion.toKotlin as getListResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetListsResult.Companion.toKotlin as getListsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetLoadBalancerPoolsResult.Companion.toKotlin as getLoadBalancerPoolsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetOriginCaCertificateResult.Companion.toKotlin as getOriginCaCertificateResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetOriginCaRootCertificateResult.Companion.toKotlin as getOriginCaRootCertificateResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetRecordResult.Companion.toKotlin as getRecordResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetRulesetsResult.Companion.toKotlin as getRulesetsResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetTunnelResult.Companion.toKotlin as getTunnelResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetTunnelVirtualNetworkResult.Companion.toKotlin as getTunnelVirtualNetworkResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetUserResult.Companion.toKotlin as getUserResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustAccessApplicationResult.Companion.toKotlin as getZeroTrustAccessApplicationResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustAccessIdentityProviderResult.Companion.toKotlin as getZeroTrustAccessIdentityProviderResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustTunnelCloudflaredResult.Companion.toKotlin as getZeroTrustTunnelCloudflaredResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZeroTrustTunnelVirtualNetworkResult.Companion.toKotlin as getZeroTrustTunnelVirtualNetworkResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZoneCacheReserveResult.Companion.toKotlin as getZoneCacheReserveResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZoneDnssecResult.Companion.toKotlin as getZoneDnssecResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZoneResult.Companion.toKotlin as getZoneResultToKotlin
import com.pulumi.cloudflare.kotlin.outputs.GetZonesResult.Companion.toKotlin as getZonesResultToKotlin
public object CloudflareFunctions {
/**
* Use this data source to lookup a single [Access Application](https://developers.cloudflare.com/cloudflare-one/applications/)
* @param argument A collection of arguments for invoking getAccessApplication.
* @return A collection of values returned by getAccessApplication.
*/
public suspend fun getAccessApplication(argument: GetAccessApplicationPlainArgs): GetAccessApplicationResult =
getAccessApplicationResultToKotlin(getAccessApplicationPlain(argument.toJava()).await())
/**
* @see [getAccessApplication].
* @param accountId The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @param domain The primary hostname and path that Access will secure. Must provide only one of `name`, `domain`.
* @param name Friendly name of the Access Application. Must provide only one of `name`, `domain`.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @return A collection of values returned by getAccessApplication.
*/
public suspend fun getAccessApplication(
accountId: String? = null,
domain: String? = null,
name: String? = null,
zoneId: String? = null,
): GetAccessApplicationResult {
val argument = GetAccessApplicationPlainArgs(
accountId = accountId,
domain = domain,
name = name,
zoneId = zoneId,
)
return getAccessApplicationResultToKotlin(getAccessApplicationPlain(argument.toJava()).await())
}
/**
* @see [getAccessApplication].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetAccessApplicationPlainArgs].
* @return A collection of values returned by getAccessApplication.
*/
public suspend fun getAccessApplication(argument: suspend GetAccessApplicationPlainArgsBuilder.() -> Unit): GetAccessApplicationResult {
val builder = GetAccessApplicationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessApplicationResultToKotlin(getAccessApplicationPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup a single [Access Identity Provider](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration) by name.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getAccessIdentityProvider({
* name: "Google SSO",
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* const exampleAccessApplication = new cloudflare.AccessApplication("example", {
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* name: "name",
* domain: "name.example.com",
* type: "self_hosted",
* sessionDuration: "24h",
* allowedIdps: [example.then(example => example.id)],
* autoRedirectToIdentity: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_access_identity_provider(name="Google SSO",
* account_id="f037e56e89293a057740de681ac9abbe")
* example_access_application = cloudflare.AccessApplication("example",
* zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* name="name",
* domain="name.example.com",
* type="self_hosted",
* session_duration="24h",
* allowed_idps=[example.id],
* auto_redirect_to_identity=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetAccessIdentityProvider.Invoke(new()
* {
* Name = "Google SSO",
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* var exampleAccessApplication = new Cloudflare.AccessApplication("example", new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Name = "name",
* Domain = "name.example.com",
* Type = "self_hosted",
* SessionDuration = "24h",
* AllowedIdps = new[]
* {
* example.Apply(getAccessIdentityProviderResult => getAccessIdentityProviderResult.Id),
* },
* AutoRedirectToIdentity = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := cloudflare.LookupAccessIdentityProvider(ctx, &cloudflare.LookupAccessIdentityProviderArgs{
* Name: "Google SSO",
* AccountId: pulumi.StringRef("f037e56e89293a057740de681ac9abbe"),
* }, nil)
* if err != nil {
* return err
* }
* _, err = cloudflare.NewAccessApplication(ctx, "example", &cloudflare.AccessApplicationArgs{
* ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
* Name: pulumi.String("name"),
* Domain: pulumi.String("name.example.com"),
* Type: pulumi.String("self_hosted"),
* SessionDuration: pulumi.String("24h"),
* AllowedIdps: pulumi.StringArray{
* pulumi.String(example.Id),
* },
* AutoRedirectToIdentity: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetAccessIdentityProviderArgs;
* import com.pulumi.cloudflare.AccessApplication;
* import com.pulumi.cloudflare.AccessApplicationArgs;
* 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 example = CloudflareFunctions.getAccessIdentityProvider(GetAccessIdentityProviderArgs.builder()
* .name("Google SSO")
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* var exampleAccessApplication = new AccessApplication("exampleAccessApplication", AccessApplicationArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .name("name")
* .domain("name.example.com")
* .type("self_hosted")
* .sessionDuration("24h")
* .allowedIdps(example.applyValue(getAccessIdentityProviderResult -> getAccessIdentityProviderResult.id()))
* .autoRedirectToIdentity(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleAccessApplication:
* type: cloudflare:AccessApplication
* name: example
* properties:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* name: name
* domain: name.example.com
* type: self_hosted
* sessionDuration: 24h
* allowedIdps:
* - ${example.id}
* autoRedirectToIdentity: true
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getAccessIdentityProvider
* Arguments:
* name: Google SSO
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getAccessIdentityProvider.
* @return A collection of values returned by getAccessIdentityProvider.
*/
public suspend fun getAccessIdentityProvider(argument: GetAccessIdentityProviderPlainArgs): GetAccessIdentityProviderResult =
getAccessIdentityProviderResultToKotlin(getAccessIdentityProviderPlain(argument.toJava()).await())
/**
* @see [getAccessIdentityProvider].
* @param accountId The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @param name Access Identity Provider name to search for.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @return A collection of values returned by getAccessIdentityProvider.
*/
public suspend fun getAccessIdentityProvider(
accountId: String? = null,
name: String,
zoneId: String? = null,
): GetAccessIdentityProviderResult {
val argument = GetAccessIdentityProviderPlainArgs(
accountId = accountId,
name = name,
zoneId = zoneId,
)
return getAccessIdentityProviderResultToKotlin(getAccessIdentityProviderPlain(argument.toJava()).await())
}
/**
* @see [getAccessIdentityProvider].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetAccessIdentityProviderPlainArgs].
* @return A collection of values returned by getAccessIdentityProvider.
*/
public suspend fun getAccessIdentityProvider(argument: suspend GetAccessIdentityProviderPlainArgsBuilder.() -> Unit): GetAccessIdentityProviderResult {
val builder = GetAccessIdentityProviderPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccessIdentityProviderResultToKotlin(getAccessIdentityProviderPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup [Account Roles](https://api.cloudflare.com/#account-roles-properties).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const accountRoles = cloudflare.getAccountRoles({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* const rolesByName = accountRoles.then(accountRoles => .reduce((__obj, role) => ({ ...__obj, [role.name]: role })));
* const member = new cloudflare.AccountMember("member", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* emailAddress: "[email protected]",
* roleIds: [rolesByName.Administrator?.id],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* account_roles = cloudflare.get_account_roles(account_id="f037e56e89293a057740de681ac9abbe")
* roles_by_name = {role.name: role for role in account_roles.roles}
* member = cloudflare.AccountMember("member",
* account_id="f037e56e89293a057740de681ac9abbe",
* email_address="[email protected]",
* role_ids=[roles_by_name["Administrator"]])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var accountRoles = Cloudflare.GetAccountRoles.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* var rolesByName = ;
* var member = new Cloudflare.AccountMember("member", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* EmailAddress = "[email protected]",
* RoleIds = new[]
* {
* rolesByName.Apply(rolesByName => rolesByName.Administrator.Id),
* },
* });
* });
* ```
*
* @param argument A collection of arguments for invoking getAccountRoles.
* @return A collection of values returned by getAccountRoles.
*/
public suspend fun getAccountRoles(argument: GetAccountRolesPlainArgs): GetAccountRolesResult =
getAccountRolesResultToKotlin(getAccountRolesPlain(argument.toJava()).await())
/**
* @see [getAccountRoles].
* @param accountId The account identifier to target for the resource.
* @return A collection of values returned by getAccountRoles.
*/
public suspend fun getAccountRoles(accountId: String): GetAccountRolesResult {
val argument = GetAccountRolesPlainArgs(
accountId = accountId,
)
return getAccountRolesResultToKotlin(getAccountRolesPlain(argument.toJava()).await())
}
/**
* @see [getAccountRoles].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetAccountRolesPlainArgs].
* @return A collection of values returned by getAccountRoles.
*/
public suspend fun getAccountRoles(argument: suspend GetAccountRolesPlainArgsBuilder.() -> Unit): GetAccountRolesResult {
val builder = GetAccountRolesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccountRolesResultToKotlin(getAccountRolesPlain(builtArgument.toJava()).await())
}
/**
* Data source for looking up Cloudflare Accounts.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getAccounts({
* name: "example account",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_accounts(name="example account")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetAccounts.Invoke(new()
* {
* Name = "example account",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetAccounts(ctx, &cloudflare.GetAccountsArgs{
* Name: pulumi.StringRef("example account"),
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetAccountsArgs;
* 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 example = CloudflareFunctions.getAccounts(GetAccountsArgs.builder()
* .name("example account")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getAccounts
* Arguments:
* name: example account
* ```
*
* @param argument A collection of arguments for invoking getAccounts.
* @return A collection of values returned by getAccounts.
*/
public suspend fun getAccounts(argument: GetAccountsPlainArgs): GetAccountsResult =
getAccountsResultToKotlin(getAccountsPlain(argument.toJava()).await())
/**
* @see [getAccounts].
* @param name The account name to target for the resource.
* @return A collection of values returned by getAccounts.
*/
public suspend fun getAccounts(name: String? = null): GetAccountsResult {
val argument = GetAccountsPlainArgs(
name = name,
)
return getAccountsResultToKotlin(getAccountsPlain(argument.toJava()).await())
}
/**
* @see [getAccounts].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetAccountsPlainArgs].
* @return A collection of values returned by getAccounts.
*/
public suspend fun getAccounts(argument: suspend GetAccountsPlainArgsBuilder.() -> Unit): GetAccountsResult {
val builder = GetAccountsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getAccountsResultToKotlin(getAccountsPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to look up [API Token Permission Groups](https://developers.cloudflare.com/api/tokens/create/permissions).
* Commonly used as references within [`cloudflare_token`](https://www.terraform.io/docs/providers/cloudflare/r/api_token.html) resources.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const all = cloudflare.getApiTokenPermissionGroups({});
* export const dnsReadPermissionId = all.then(all => all.zone?.["DNS Read"]);
* export const accountLbMonitorsAndReadId = all.then(all => all.account?.["Load Balancing: Monitors and Pools Read"]);
* export const userMembershipsReadId = all.then(all => all.user?.["Memberships Read"]);
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* all = cloudflare.get_api_token_permission_groups()
* pulumi.export("dnsReadPermissionId", all.zone["DNS Read"])
* pulumi.export("accountLbMonitorsAndReadId", all.account["Load Balancing: Monitors and Pools Read"])
* pulumi.export("userMembershipsReadId", all.user["Memberships Read"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var all = Cloudflare.GetApiTokenPermissionGroups.Invoke();
* return new Dictionary
* {
* ["dnsReadPermissionId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.Zone?.DNS_Read),
* ["accountLbMonitorsAndReadId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.Account?.Load_Balancing__Monitors_and_Pools_Read),
* ["userMembershipsReadId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.User?.Memberships_Read),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* all, err := cloudflare.GetApiTokenPermissionGroups(ctx, nil, nil);
* if err != nil {
* return err
* }
* ctx.Export("dnsReadPermissionId", all.Zone.DNS Read)
* ctx.Export("accountLbMonitorsAndReadId", all.Account.Load Balancing: Monitors and Pools Read)
* ctx.Export("userMembershipsReadId", all.User.Memberships Read)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* 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 all = CloudflareFunctions.getApiTokenPermissionGroups();
* ctx.export("dnsReadPermissionId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.zone().DNS Read()));
* ctx.export("accountLbMonitorsAndReadId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.account().Load Balancing: Monitors and Pools Read()));
* ctx.export("userMembershipsReadId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.user().Memberships Read()));
* }
* }
* ```
* ```yaml
* variables:
* all:
* fn::invoke:
* Function: cloudflare:getApiTokenPermissionGroups
* Arguments: {}
* outputs:
* # Get zone level DNS read permission ID.
* dnsReadPermissionId: ${all.zone"DNS Read"[%!s(MISSING)]}
* # Get account level "Load Balancing: Monitors and Pools Read" permission ID.
* accountLbMonitorsAndReadId: '${all.account"Load Balancing: Monitors and Pools Read"[%!s(MISSING)]}'
* # Get user level "Memberships Read" permission ID.
* userMembershipsReadId: ${all.user"Memberships Read"[%!s(MISSING)]}
* ```
*
* @param argument Use this data source to look up [API Token Permission Groups](https://developers.cloudflare.com/api/tokens/create/permissions).
* Commonly used as references within [`cloudflare_token`](https://www.terraform.io/docs/providers/cloudflare/r/api_token.html) resources.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const all = cloudflare.getApiTokenPermissionGroups({});
* export const dnsReadPermissionId = all.then(all => all.zone?.["DNS Read"]);
* export const accountLbMonitorsAndReadId = all.then(all => all.account?.["Load Balancing: Monitors and Pools Read"]);
* export const userMembershipsReadId = all.then(all => all.user?.["Memberships Read"]);
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* all = cloudflare.get_api_token_permission_groups()
* pulumi.export("dnsReadPermissionId", all.zone["DNS Read"])
* pulumi.export("accountLbMonitorsAndReadId", all.account["Load Balancing: Monitors and Pools Read"])
* pulumi.export("userMembershipsReadId", all.user["Memberships Read"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var all = Cloudflare.GetApiTokenPermissionGroups.Invoke();
* return new Dictionary
* {
* ["dnsReadPermissionId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.Zone?.DNS_Read),
* ["accountLbMonitorsAndReadId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.Account?.Load_Balancing__Monitors_and_Pools_Read),
* ["userMembershipsReadId"] = all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.User?.Memberships_Read),
* };
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* all, err := cloudflare.GetApiTokenPermissionGroups(ctx, nil, nil);
* if err != nil {
* return err
* }
* ctx.Export("dnsReadPermissionId", all.Zone.DNS Read)
* ctx.Export("accountLbMonitorsAndReadId", all.Account.Load Balancing: Monitors and Pools Read)
* ctx.Export("userMembershipsReadId", all.User.Memberships Read)
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* 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 all = CloudflareFunctions.getApiTokenPermissionGroups();
* ctx.export("dnsReadPermissionId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.zone().DNS Read()));
* ctx.export("accountLbMonitorsAndReadId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.account().Load Balancing: Monitors and Pools Read()));
* ctx.export("userMembershipsReadId", all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.user().Memberships Read()));
* }
* }
* ```
* ```yaml
* variables:
* all:
* fn::invoke:
* Function: cloudflare:getApiTokenPermissionGroups
* Arguments: {}
* outputs:
* # Get zone level DNS read permission ID.
* dnsReadPermissionId: ${all.zone"DNS Read"[%!s(MISSING)]}
* # Get account level "Load Balancing: Monitors and Pools Read" permission ID.
* accountLbMonitorsAndReadId: '${all.account"Load Balancing: Monitors and Pools Read"[%!s(MISSING)]}'
* # Get user level "Memberships Read" permission ID.
* userMembershipsReadId: ${all.user"Memberships Read"[%!s(MISSING)]}
* ```
*
* @return A collection of values returned by getApiTokenPermissionGroups.
*/
public suspend fun getApiTokenPermissionGroups(): GetApiTokenPermissionGroupsResult =
getApiTokenPermissionGroupsResultToKotlin(getApiTokenPermissionGroupsPlain().await())
/**
* Use this data source to retrieve the DCV Delegation unique identifier for a zone.
* @param argument A collection of arguments for invoking getDcvDelegation.
* @return A collection of values returned by getDcvDelegation.
*/
public suspend fun getDcvDelegation(argument: GetDcvDelegationPlainArgs): GetDcvDelegationResult =
getDcvDelegationResultToKotlin(getDcvDelegationPlain(argument.toJava()).await())
/**
* @see [getDcvDelegation].
* @param zoneId The zone identifier to target for the resource.
* @return A collection of values returned by getDcvDelegation.
*/
public suspend fun getDcvDelegation(zoneId: String): GetDcvDelegationResult {
val argument = GetDcvDelegationPlainArgs(
zoneId = zoneId,
)
return getDcvDelegationResultToKotlin(getDcvDelegationPlain(argument.toJava()).await())
}
/**
* @see [getDcvDelegation].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetDcvDelegationPlainArgs].
* @return A collection of values returned by getDcvDelegation.
*/
public suspend fun getDcvDelegation(argument: suspend GetDcvDelegationPlainArgsBuilder.() -> Unit): GetDcvDelegationResult {
val builder = GetDcvDelegationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDcvDelegationResultToKotlin(getDcvDelegationPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup a list of [Device Posture Rule](https://developers.cloudflare.com/cloudflare-one/identity/devices)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getDevicePostureRules({
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "check for /dev/random",
* type: "file",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_device_posture_rules(account_id="f037e56e89293a057740de681ac9abbe",
* name="check for /dev/random",
* type="file")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetDevicePostureRules.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "check for /dev/random",
* Type = "file",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetDevicePostureRules(ctx, &cloudflare.GetDevicePostureRulesArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* Name: pulumi.StringRef("check for /dev/random"),
* Type: pulumi.StringRef("file"),
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetDevicePostureRulesArgs;
* 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 example = CloudflareFunctions.getDevicePostureRules(GetDevicePostureRulesArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("check for /dev/random")
* .type("file")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getDevicePostureRules
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* name: check for /dev/random
* type: file
* ```
*
* @param argument A collection of arguments for invoking getDevicePostureRules.
* @return A collection of values returned by getDevicePostureRules.
*/
public suspend fun getDevicePostureRules(argument: GetDevicePostureRulesPlainArgs): GetDevicePostureRulesResult =
getDevicePostureRulesResultToKotlin(getDevicePostureRulesPlain(argument.toJava()).await())
/**
* @see [getDevicePostureRules].
* @param accountId The account identifier to target for the resource.
* @param name Name of the Device Posture Rule.
* @param type The device posture rule type. Available values: `serial_number`, `file`, `application`, `gateway`, `warp`, `domain_joined`, `os_version`, `disk_encryption`, `firewall`, `client_certificate`, `client_certificate_v2`, `workspace_one`, `unique_client_id`, `crowdstrike_s2s`, `sentinelone`, `kolide`, `tanium_s2s`, `intune`, `sentinelone_s2s`, `custom_s2s`.
* @return A collection of values returned by getDevicePostureRules.
*/
public suspend fun getDevicePostureRules(
accountId: String,
name: String? = null,
type: String? = null,
): GetDevicePostureRulesResult {
val argument = GetDevicePostureRulesPlainArgs(
accountId = accountId,
name = name,
type = type,
)
return getDevicePostureRulesResultToKotlin(getDevicePostureRulesPlain(argument.toJava()).await())
}
/**
* @see [getDevicePostureRules].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetDevicePostureRulesPlainArgs].
* @return A collection of values returned by getDevicePostureRules.
*/
public suspend fun getDevicePostureRules(argument: suspend GetDevicePostureRulesPlainArgsBuilder.() -> Unit): GetDevicePostureRulesResult {
val builder = GetDevicePostureRulesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDevicePostureRulesResultToKotlin(getDevicePostureRulesPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup [Devices](https://api.cloudflare.com/#devices-list-devices).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getDevices({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_devices(account_id="f037e56e89293a057740de681ac9abbe")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetDevices.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetDevices(ctx, &cloudflare.GetDevicesArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetDevicesArgs;
* 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 example = CloudflareFunctions.getDevices(GetDevicesArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getDevices
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getDevices.
* @return A collection of values returned by getDevices.
*/
public suspend fun getDevices(argument: GetDevicesPlainArgs): GetDevicesResult =
getDevicesResultToKotlin(getDevicesPlain(argument.toJava()).await())
/**
* @see [getDevices].
* @param accountId The account identifier to target for the resource.
* @return A collection of values returned by getDevices.
*/
public suspend fun getDevices(accountId: String): GetDevicesResult {
val argument = GetDevicesPlainArgs(
accountId = accountId,
)
return getDevicesResultToKotlin(getDevicesPlain(argument.toJava()).await())
}
/**
* @see [getDevices].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetDevicesPlainArgs].
* @return A collection of values returned by getDevices.
*/
public suspend fun getDevices(argument: suspend GetDevicesPlainArgsBuilder.() -> Unit): GetDevicesResult {
val builder = GetDevicesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDevicesResultToKotlin(getDevicesPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve all DLP datasets for an account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getDlpDatasets({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_dlp_datasets(account_id="f037e56e89293a057740de681ac9abbe")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetDlpDatasets.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetDlpDatasets(ctx, &cloudflare.GetDlpDatasetsArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetDlpDatasetsArgs;
* 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 example = CloudflareFunctions.getDlpDatasets(GetDlpDatasetsArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getDlpDatasets
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getDlpDatasets.
* @return A collection of values returned by getDlpDatasets.
*/
public suspend fun getDlpDatasets(argument: GetDlpDatasetsPlainArgs): GetDlpDatasetsResult =
getDlpDatasetsResultToKotlin(getDlpDatasetsPlain(argument.toJava()).await())
/**
* @see [getDlpDatasets].
* @param accountId The account ID to fetch DLP Datasets from.
* @return A collection of values returned by getDlpDatasets.
*/
public suspend fun getDlpDatasets(accountId: String): GetDlpDatasetsResult {
val argument = GetDlpDatasetsPlainArgs(
accountId = accountId,
)
return getDlpDatasetsResultToKotlin(getDlpDatasetsPlain(argument.toJava()).await())
}
/**
* @see [getDlpDatasets].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetDlpDatasetsPlainArgs].
* @return A collection of values returned by getDlpDatasets.
*/
public suspend fun getDlpDatasets(argument: suspend GetDlpDatasetsPlainArgsBuilder.() -> Unit): GetDlpDatasetsResult {
val builder = GetDlpDatasetsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getDlpDatasetsResultToKotlin(getDlpDatasetsPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve all Gateway application types for an account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getGatewayAppTypes({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_gateway_app_types(account_id="f037e56e89293a057740de681ac9abbe")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetGatewayAppTypes.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetGatewayAppTypes(ctx, &cloudflare.GetGatewayAppTypesArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetGatewayAppTypesArgs;
* 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 example = CloudflareFunctions.getGatewayAppTypes(GetGatewayAppTypesArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getGatewayAppTypes
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getGatewayAppTypes.
* @return A collection of values returned by getGatewayAppTypes.
*/
public suspend fun getGatewayAppTypes(argument: GetGatewayAppTypesPlainArgs): GetGatewayAppTypesResult =
getGatewayAppTypesResultToKotlin(getGatewayAppTypesPlain(argument.toJava()).await())
/**
* @see [getGatewayAppTypes].
* @param accountId The account ID to fetch Gateway App Types from.
* @return A collection of values returned by getGatewayAppTypes.
*/
public suspend fun getGatewayAppTypes(accountId: String): GetGatewayAppTypesResult {
val argument = GetGatewayAppTypesPlainArgs(
accountId = accountId,
)
return getGatewayAppTypesResultToKotlin(getGatewayAppTypesPlain(argument.toJava()).await())
}
/**
* @see [getGatewayAppTypes].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetGatewayAppTypesPlainArgs].
* @return A collection of values returned by getGatewayAppTypes.
*/
public suspend fun getGatewayAppTypes(argument: suspend GetGatewayAppTypesPlainArgsBuilder.() -> Unit): GetGatewayAppTypesResult {
val builder = GetGatewayAppTypesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getGatewayAppTypesResultToKotlin(getGatewayAppTypesPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve all Gateway categories for an account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getGatewayCategories({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_gateway_categories(account_id="f037e56e89293a057740de681ac9abbe")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetGatewayCategories.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetGatewayCategories(ctx, &cloudflare.GetGatewayCategoriesArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetGatewayCategoriesArgs;
* 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 example = CloudflareFunctions.getGatewayCategories(GetGatewayCategoriesArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getGatewayCategories
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getGatewayCategories.
* @return A collection of values returned by getGatewayCategories.
*/
public suspend fun getGatewayCategories(argument: GetGatewayCategoriesPlainArgs): GetGatewayCategoriesResult =
getGatewayCategoriesResultToKotlin(getGatewayCategoriesPlain(argument.toJava()).await())
/**
* @see [getGatewayCategories].
* @param accountId The account ID to fetch Gateway Categories from.
* @return A collection of values returned by getGatewayCategories.
*/
public suspend fun getGatewayCategories(accountId: String): GetGatewayCategoriesResult {
val argument = GetGatewayCategoriesPlainArgs(
accountId = accountId,
)
return getGatewayCategoriesResultToKotlin(getGatewayCategoriesPlain(argument.toJava()).await())
}
/**
* @see [getGatewayCategories].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetGatewayCategoriesPlainArgs].
* @return A collection of values returned by getGatewayCategories.
*/
public suspend fun getGatewayCategories(argument: suspend GetGatewayCategoriesPlainArgsBuilder.() -> Unit): GetGatewayCategoriesResult {
val builder = GetGatewayCategoriesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getGatewayCategoriesResultToKotlin(getGatewayCategoriesPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve all Infrastructure Access Targets.
* @param argument A collection of arguments for invoking getInfrastructureAccessTargets.
* @return A collection of values returned by getInfrastructureAccessTargets.
*/
public suspend fun getInfrastructureAccessTargets(argument: GetInfrastructureAccessTargetsPlainArgs): GetInfrastructureAccessTargetsResult =
getInfrastructureAccessTargetsResultToKotlin(getInfrastructureAccessTargetsPlain(argument.toJava()).await())
/**
* @see [getInfrastructureAccessTargets].
* @param accountId The account identifier to target for the resource.
* @param createdAfter A date and time after a target was created to filter on.
* @param hostname The name of the app type.
* @param hostnameContains The name of the app type.
* @param ipv4 The name of the app type.
* @param ipv6 The name of the app type.
* @param modifiedAfter A date and time after a target was modified to filter on.
* @param virtualNetworkId The name of the app type.
* @return A collection of values returned by getInfrastructureAccessTargets.
*/
public suspend fun getInfrastructureAccessTargets(
accountId: String,
createdAfter: String? = null,
hostname: String? = null,
hostnameContains: String? = null,
ipv4: String? = null,
ipv6: String? = null,
modifiedAfter: String? = null,
virtualNetworkId: String? = null,
): GetInfrastructureAccessTargetsResult {
val argument = GetInfrastructureAccessTargetsPlainArgs(
accountId = accountId,
createdAfter = createdAfter,
hostname = hostname,
hostnameContains = hostnameContains,
ipv4 = ipv4,
ipv6 = ipv6,
modifiedAfter = modifiedAfter,
virtualNetworkId = virtualNetworkId,
)
return getInfrastructureAccessTargetsResultToKotlin(getInfrastructureAccessTargetsPlain(argument.toJava()).await())
}
/**
* @see [getInfrastructureAccessTargets].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetInfrastructureAccessTargetsPlainArgs].
* @return A collection of values returned by getInfrastructureAccessTargets.
*/
public suspend fun getInfrastructureAccessTargets(argument: suspend GetInfrastructureAccessTargetsPlainArgsBuilder.() -> Unit): GetInfrastructureAccessTargetsResult {
val builder = GetInfrastructureAccessTargetsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getInfrastructureAccessTargetsResultToKotlin(getInfrastructureAccessTargetsPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to get the [IP ranges](https://www.cloudflare.com/ips/) of Cloudflare network.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* import * as example from "@pulumi/example";
* const cloudflare = cloudflare.getIpRanges({});
* const example = new example.index.FirewallResource("example", {
* name: "from-cloudflare",
* network: "default",
* sourceRanges: cloudflare.ipv4CidrBlocks,
* allow: [{
* ports: "443",
* protocol: "tcp",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* import pulumi_example as example
* cloudflare = cloudflare.get_ip_ranges()
* example = example.index.FirewallResource("example",
* name=from-cloudflare,
* network=default,
* source_ranges=cloudflare.ipv4_cidr_blocks,
* allow=[{
* ports: 443,
* protocol: tcp,
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* using Example = Pulumi.Example;
* return await Deployment.RunAsync(() =>
* {
* var cloudflare = Cloudflare.GetIpRanges.Invoke();
* var example = new Example.Index.FirewallResource("example", new()
* {
* Name = "from-cloudflare",
* Network = "default",
* SourceRanges = cloudflare.Apply(getIpRangesResult => getIpRangesResult.Ipv4CidrBlocks),
* Allow = new[]
* {
* {
* { "ports", "443" },
* { "protocol", "tcp" },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi-example/sdk/go/example"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cloudflare, err := cloudflare.GetIpRanges(ctx, nil, nil)
* if err != nil {
* return err
* }
* _, err = example.NewFirewallResource(ctx, "example", &example.FirewallResourceArgs{
* Name: "from-cloudflare",
* Network: "default",
* SourceRanges: cloudflare.Ipv4CidrBlocks,
* Allow: []map[string]interface{}{
* map[string]interface{}{
* "ports": "443",
* "protocol": "tcp",
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.example.firewallResource;
* import com.pulumi.example.FirewallResourceArgs;
* 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 cloudflare = CloudflareFunctions.getIpRanges();
* var example = new FirewallResource("example", FirewallResourceArgs.builder()
* .name("from-cloudflare")
* .network("default")
* .sourceRanges(cloudflare.applyValue(getIpRangesResult -> getIpRangesResult.ipv4CidrBlocks()))
* .allow(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: example:firewallResource
* properties:
* name: from-cloudflare
* network: default
* sourceRanges: ${cloudflare.ipv4CidrBlocks}
* allow:
* - ports: '443'
* protocol: tcp
* variables:
* cloudflare:
* fn::invoke:
* Function: cloudflare:getIpRanges
* Arguments: {}
* ```
*
* @param argument Use this data source to get the [IP ranges](https://www.cloudflare.com/ips/) of Cloudflare network.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* import * as example from "@pulumi/example";
* const cloudflare = cloudflare.getIpRanges({});
* const example = new example.index.FirewallResource("example", {
* name: "from-cloudflare",
* network: "default",
* sourceRanges: cloudflare.ipv4CidrBlocks,
* allow: [{
* ports: "443",
* protocol: "tcp",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* import pulumi_example as example
* cloudflare = cloudflare.get_ip_ranges()
* example = example.index.FirewallResource("example",
* name=from-cloudflare,
* network=default,
* source_ranges=cloudflare.ipv4_cidr_blocks,
* allow=[{
* ports: 443,
* protocol: tcp,
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* using Example = Pulumi.Example;
* return await Deployment.RunAsync(() =>
* {
* var cloudflare = Cloudflare.GetIpRanges.Invoke();
* var example = new Example.Index.FirewallResource("example", new()
* {
* Name = "from-cloudflare",
* Network = "default",
* SourceRanges = cloudflare.Apply(getIpRangesResult => getIpRangesResult.Ipv4CidrBlocks),
* Allow = new[]
* {
* {
* { "ports", "443" },
* { "protocol", "tcp" },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi-example/sdk/go/example"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* cloudflare, err := cloudflare.GetIpRanges(ctx, nil, nil)
* if err != nil {
* return err
* }
* _, err = example.NewFirewallResource(ctx, "example", &example.FirewallResourceArgs{
* Name: "from-cloudflare",
* Network: "default",
* SourceRanges: cloudflare.Ipv4CidrBlocks,
* Allow: []map[string]interface{}{
* map[string]interface{}{
* "ports": "443",
* "protocol": "tcp",
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.example.firewallResource;
* import com.pulumi.example.FirewallResourceArgs;
* 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 cloudflare = CloudflareFunctions.getIpRanges();
* var example = new FirewallResource("example", FirewallResourceArgs.builder()
* .name("from-cloudflare")
* .network("default")
* .sourceRanges(cloudflare.applyValue(getIpRangesResult -> getIpRangesResult.ipv4CidrBlocks()))
* .allow(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: example:firewallResource
* properties:
* name: from-cloudflare
* network: default
* sourceRanges: ${cloudflare.ipv4CidrBlocks}
* allow:
* - ports: '443'
* protocol: tcp
* variables:
* cloudflare:
* fn::invoke:
* Function: cloudflare:getIpRanges
* Arguments: {}
* ```
*
* @return A collection of values returned by getIpRanges.
*/
public suspend fun getIpRanges(): GetIpRangesResult =
getIpRangesResultToKotlin(getIpRangesPlain().await())
/**
* Use this data source to lookup a [List](https://developers.cloudflare.com/api/operations/lists-get-lists).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getList({
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "list_name",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_list(account_id="f037e56e89293a057740de681ac9abbe",
* name="list_name")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetList.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "list_name",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupList(ctx, &cloudflare.LookupListArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* Name: "list_name",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetListArgs;
* 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 example = CloudflareFunctions.getList(GetListArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("list_name")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getList
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* name: list_name
* ```
*
* @param argument A collection of arguments for invoking getList.
* @return A collection of values returned by getList.
*/
public suspend fun getList(argument: GetListPlainArgs): GetListResult =
getListResultToKotlin(getListPlain(argument.toJava()).await())
/**
* @see [getList].
* @param accountId The account identifier to target for the resource.
* @param name The list name to target for the resource.
* @return A collection of values returned by getList.
*/
public suspend fun getList(accountId: String, name: String): GetListResult {
val argument = GetListPlainArgs(
accountId = accountId,
name = name,
)
return getListResultToKotlin(getListPlain(argument.toJava()).await())
}
/**
* @see [getList].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetListPlainArgs].
* @return A collection of values returned by getList.
*/
public suspend fun getList(argument: suspend GetListPlainArgsBuilder.() -> Unit): GetListResult {
val builder = GetListPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getListResultToKotlin(getListPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup [Lists](https://developers.cloudflare.com/api/operations/lists-get-lists).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getLists({
* accountId: "f037e56e89293a057740de681ac9abbe",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_lists(account_id="f037e56e89293a057740de681ac9abbe")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetLists.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetLists(ctx, &cloudflare.GetListsArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetListsArgs;
* 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 example = CloudflareFunctions.getLists(GetListsArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getLists
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* ```
*
* @param argument A collection of arguments for invoking getLists.
* @return A collection of values returned by getLists.
*/
public suspend fun getLists(argument: GetListsPlainArgs): GetListsResult =
getListsResultToKotlin(getListsPlain(argument.toJava()).await())
/**
* @see [getLists].
* @param accountId The account identifier to target for the resource.
* @return A collection of values returned by getLists.
*/
public suspend fun getLists(accountId: String): GetListsResult {
val argument = GetListsPlainArgs(
accountId = accountId,
)
return getListsResultToKotlin(getListsPlain(argument.toJava()).await())
}
/**
* @see [getLists].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetListsPlainArgs].
* @return A collection of values returned by getLists.
*/
public suspend fun getLists(argument: suspend GetListsPlainArgsBuilder.() -> Unit): GetListsResult {
val builder = GetListsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getListsResultToKotlin(getListsPlain(builtArgument.toJava()).await())
}
/**
* A datasource to find Load Balancer Pools.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getLoadBalancerPools({
* accountId: "f037e56e89293a057740de681ac9abbe",
* filter: {
* name: "example-lb-pool",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_load_balancer_pools(account_id="f037e56e89293a057740de681ac9abbe",
* filter={
* "name": "example-lb-pool",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetLoadBalancerPools.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Filter = new Cloudflare.Inputs.GetLoadBalancerPoolsFilterInputArgs
* {
* Name = "example-lb-pool",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetLoadBalancerPools(ctx, &cloudflare.GetLoadBalancerPoolsArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* Filter: cloudflare.GetLoadBalancerPoolsFilter{
* Name: pulumi.StringRef("example-lb-pool"),
* },
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetLoadBalancerPoolsArgs;
* import com.pulumi.cloudflare.inputs.GetLoadBalancerPoolsFilterArgs;
* 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 example = CloudflareFunctions.getLoadBalancerPools(GetLoadBalancerPoolsArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .filter(GetLoadBalancerPoolsFilterArgs.builder()
* .name("example-lb-pool")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getLoadBalancerPools
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* filter:
* name: example-lb-pool
* ```
*
* @param argument A collection of arguments for invoking getLoadBalancerPools.
* @return A collection of values returned by getLoadBalancerPools.
*/
public suspend fun getLoadBalancerPools(argument: GetLoadBalancerPoolsPlainArgs): GetLoadBalancerPoolsResult =
getLoadBalancerPoolsResultToKotlin(getLoadBalancerPoolsPlain(argument.toJava()).await())
/**
* @see [getLoadBalancerPools].
* @param accountId The account identifier to target for the datasource lookups.
* @param filter One or more values used to look up Load Balancer pools. If more than one value is given all values must match in order to be included.
* @param pools A list of Load Balancer Pools details.
* @return A collection of values returned by getLoadBalancerPools.
*/
public suspend fun getLoadBalancerPools(
accountId: String,
filter: GetLoadBalancerPoolsFilter? = null,
pools: List? = null,
): GetLoadBalancerPoolsResult {
val argument = GetLoadBalancerPoolsPlainArgs(
accountId = accountId,
filter = filter,
pools = pools,
)
return getLoadBalancerPoolsResultToKotlin(getLoadBalancerPoolsPlain(argument.toJava()).await())
}
/**
* @see [getLoadBalancerPools].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetLoadBalancerPoolsPlainArgs].
* @return A collection of values returned by getLoadBalancerPools.
*/
public suspend fun getLoadBalancerPools(argument: suspend GetLoadBalancerPoolsPlainArgsBuilder.() -> Unit): GetLoadBalancerPoolsResult {
val builder = GetLoadBalancerPoolsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getLoadBalancerPoolsResultToKotlin(getLoadBalancerPoolsPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve an existing origin ca certificate.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getOriginCaCertificate({
* id: "REPLACE_ME",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_origin_ca_certificate(id="REPLACE_ME")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetOriginCaCertificate.Invoke(new()
* {
* Id = "REPLACE_ME",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupOriginCaCertificate(ctx, &cloudflare.LookupOriginCaCertificateArgs{
* Id: "REPLACE_ME",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetOriginCaCertificateArgs;
* 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 example = CloudflareFunctions.getOriginCaCertificate(GetOriginCaCertificateArgs.builder()
* .id("REPLACE_ME")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getOriginCaCertificate
* Arguments:
* id: REPLACE_ME
* ```
*
* @param argument A collection of arguments for invoking getOriginCaCertificate.
* @return A collection of values returned by getOriginCaCertificate.
*/
public suspend fun getOriginCaCertificate(argument: GetOriginCaCertificatePlainArgs): GetOriginCaCertificateResult =
getOriginCaCertificateResultToKotlin(getOriginCaCertificatePlain(argument.toJava()).await())
/**
* @see [getOriginCaCertificate].
* @param id The Origin CA Certificate unique identifier.
* @return A collection of values returned by getOriginCaCertificate.
*/
public suspend fun getOriginCaCertificate(id: String): GetOriginCaCertificateResult {
val argument = GetOriginCaCertificatePlainArgs(
id = id,
)
return getOriginCaCertificateResultToKotlin(getOriginCaCertificatePlain(argument.toJava()).await())
}
/**
* @see [getOriginCaCertificate].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetOriginCaCertificatePlainArgs].
* @return A collection of values returned by getOriginCaCertificate.
*/
public suspend fun getOriginCaCertificate(argument: suspend GetOriginCaCertificatePlainArgsBuilder.() -> Unit): GetOriginCaCertificateResult {
val builder = GetOriginCaCertificatePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getOriginCaCertificateResultToKotlin(getOriginCaCertificatePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to get the
* [Origin CA root certificate](https://developers.cloudflare.com/ssl/origin-configuration/origin-ca#4-required-for-some-add-cloudflare-origin-ca-root-certificates)
* for a given algorithm."
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getOriginCaRootCertificate({
* algorithm: "rsa",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_origin_ca_root_certificate(algorithm="rsa")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetOriginCaRootCertificate.Invoke(new()
* {
* Algorithm = "rsa",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetOriginCaRootCertificate(ctx, &cloudflare.GetOriginCaRootCertificateArgs{
* Algorithm: "rsa",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetOriginCaRootCertificateArgs;
* 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 example = CloudflareFunctions.getOriginCaRootCertificate(GetOriginCaRootCertificateArgs.builder()
* .algorithm("rsa")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getOriginCaRootCertificate
* Arguments:
* algorithm: rsa
* ```
*
* @param argument A collection of arguments for invoking getOriginCaRootCertificate.
* @return A collection of values returned by getOriginCaRootCertificate.
*/
public suspend fun getOriginCaRootCertificate(argument: GetOriginCaRootCertificatePlainArgs): GetOriginCaRootCertificateResult =
getOriginCaRootCertificateResultToKotlin(getOriginCaRootCertificatePlain(argument.toJava()).await())
/**
* @see [getOriginCaRootCertificate].
* @param algorithm The name of the algorithm used when creating an Origin CA certificate. Available values: `rsa`, `ecc`.
* @return A collection of values returned by getOriginCaRootCertificate.
*/
public suspend fun getOriginCaRootCertificate(algorithm: String): GetOriginCaRootCertificateResult {
val argument = GetOriginCaRootCertificatePlainArgs(
algorithm = algorithm,
)
return getOriginCaRootCertificateResultToKotlin(getOriginCaRootCertificatePlain(argument.toJava()).await())
}
/**
* @see [getOriginCaRootCertificate].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetOriginCaRootCertificatePlainArgs].
* @return A collection of values returned by getOriginCaRootCertificate.
*/
public suspend fun getOriginCaRootCertificate(argument: suspend GetOriginCaRootCertificatePlainArgsBuilder.() -> Unit): GetOriginCaRootCertificateResult {
val builder = GetOriginCaRootCertificatePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getOriginCaRootCertificateResultToKotlin(getOriginCaRootCertificatePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup a single [DNS Record](https://api.cloudflare.com/#dns-records-for-a-zone-properties).
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getRecord({
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* hostname: "example.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_record(zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* hostname="example.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetRecord.Invoke(new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Hostname = "example.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupRecord(ctx, &cloudflare.LookupRecordArgs{
* ZoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* Hostname: "example.com",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetRecordArgs;
* 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 example = CloudflareFunctions.getRecord(GetRecordArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .hostname("example.com")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getRecord
* Arguments:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* hostname: example.com
* ```
*
* @param argument A collection of arguments for invoking getRecord.
* @return A collection of values returned by getRecord.
*/
public suspend fun getRecord(argument: GetRecordPlainArgs): GetRecordResult =
getRecordResultToKotlin(getRecordPlain(argument.toJava()).await())
/**
* @see [getRecord].
* @param content Content to filter record results on.
* @param hostname Hostname to filter DNS record results on.
* @param priority DNS priority to filter record results on.
* @param type DNS record type to filter record results on. Defaults to `A`.
* @param zoneId The zone identifier to target for the resource.
* @return A collection of values returned by getRecord.
*/
public suspend fun getRecord(
content: String? = null,
hostname: String,
priority: Int? = null,
type: String? = null,
zoneId: String,
): GetRecordResult {
val argument = GetRecordPlainArgs(
content = content,
hostname = hostname,
priority = priority,
type = type,
zoneId = zoneId,
)
return getRecordResultToKotlin(getRecordPlain(argument.toJava()).await())
}
/**
* @see [getRecord].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetRecordPlainArgs].
* @return A collection of values returned by getRecord.
*/
public suspend fun getRecord(argument: suspend GetRecordPlainArgsBuilder.() -> Unit): GetRecordResult {
val builder = GetRecordPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getRecordResultToKotlin(getRecordPlain(builtArgument.toJava()).await())
}
/**
* Use this datasource to lookup Rulesets in an account or zone.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getRulesets({
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* filter: {
* name: ".*OWASP.*",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_rulesets(zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* filter={
* "name": ".*OWASP.*",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetRulesets.Invoke(new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Filter = new Cloudflare.Inputs.GetRulesetsFilterInputArgs
* {
* Name = ".*OWASP.*",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.GetRulesets(ctx, &cloudflare.GetRulesetsArgs{
* ZoneId: pulumi.StringRef("0da42c8d2132a9ddaf714f9e7c920711"),
* Filter: cloudflare.GetRulesetsFilter{
* Name: pulumi.StringRef(".*OWASP.*"),
* },
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetRulesetsArgs;
* import com.pulumi.cloudflare.inputs.GetRulesetsFilterArgs;
* 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 example = CloudflareFunctions.getRulesets(GetRulesetsArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .filter(GetRulesetsFilterArgs.builder()
* .name(".*OWASP.*")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getRulesets
* Arguments:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* filter:
* name: .*OWASP.*
* ```
*
* @param argument A collection of arguments for invoking getRulesets.
* @return A collection of values returned by getRulesets.
*/
public suspend fun getRulesets(argument: GetRulesetsPlainArgs): GetRulesetsResult =
getRulesetsResultToKotlin(getRulesetsPlain(argument.toJava()).await())
/**
* @see [getRulesets].
* @param accountId The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @param filter
* @param includeRules Include rule data in response.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @return A collection of values returned by getRulesets.
*/
public suspend fun getRulesets(
accountId: String? = null,
filter: GetRulesetsFilter? = null,
includeRules: Boolean? = null,
zoneId: String? = null,
): GetRulesetsResult {
val argument = GetRulesetsPlainArgs(
accountId = accountId,
filter = filter,
includeRules = includeRules,
zoneId = zoneId,
)
return getRulesetsResultToKotlin(getRulesetsPlain(argument.toJava()).await())
}
/**
* @see [getRulesets].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetRulesetsPlainArgs].
* @return A collection of values returned by getRulesets.
*/
public suspend fun getRulesets(argument: suspend GetRulesetsPlainArgsBuilder.() -> Unit): GetRulesetsResult {
val builder = GetRulesetsPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getRulesetsResultToKotlin(getRulesetsPlain(builtArgument.toJava()).await())
}
/**
* Use this datasource to lookup a tunnel in an account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getTunnel({
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "my-tunnel",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_tunnel(account_id="f037e56e89293a057740de681ac9abbe",
* name="my-tunnel")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetTunnel.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "my-tunnel",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupTunnel(ctx, &cloudflare.LookupTunnelArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* Name: "my-tunnel",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetTunnelArgs;
* 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 example = CloudflareFunctions.getTunnel(GetTunnelArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("my-tunnel")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getTunnel
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* name: my-tunnel
* ```
*
* @param argument A collection of arguments for invoking getTunnel.
* @return A collection of values returned by getTunnel.
*/
public suspend fun getTunnel(argument: GetTunnelPlainArgs): GetTunnelResult =
getTunnelResultToKotlin(getTunnelPlain(argument.toJava()).await())
/**
* @see [getTunnel].
* @param accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
* @param isDeleted If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. **Modifying this attribute will force creation of a new resource.**
* @param name Name of the tunnel. **Modifying this attribute will force creation of a new resource.**
* @return A collection of values returned by getTunnel.
*/
public suspend fun getTunnel(
accountId: String,
isDeleted: Boolean? = null,
name: String,
): GetTunnelResult {
val argument = GetTunnelPlainArgs(
accountId = accountId,
isDeleted = isDeleted,
name = name,
)
return getTunnelResultToKotlin(getTunnelPlain(argument.toJava()).await())
}
/**
* @see [getTunnel].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetTunnelPlainArgs].
* @return A collection of values returned by getTunnel.
*/
public suspend fun getTunnel(argument: suspend GetTunnelPlainArgsBuilder.() -> Unit): GetTunnelResult {
val builder = GetTunnelPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getTunnelResultToKotlin(getTunnelPlain(builtArgument.toJava()).await())
}
/**
* Use this datasource to lookup a tunnel virtual network in an account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getTunnelVirtualNetwork({
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "example",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_tunnel_virtual_network(account_id="f037e56e89293a057740de681ac9abbe",
* name="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetTunnelVirtualNetwork.Invoke(new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "example",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupTunnelVirtualNetwork(ctx, &cloudflare.LookupTunnelVirtualNetworkArgs{
* AccountId: "f037e56e89293a057740de681ac9abbe",
* Name: "example",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetTunnelVirtualNetworkArgs;
* 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 example = CloudflareFunctions.getTunnelVirtualNetwork(GetTunnelVirtualNetworkArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("example")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getTunnelVirtualNetwork
* Arguments:
* accountId: f037e56e89293a057740de681ac9abbe
* name: example
* ```
*
* @param argument A collection of arguments for invoking getTunnelVirtualNetwork.
* @return A collection of values returned by getTunnelVirtualNetwork.
*/
public suspend fun getTunnelVirtualNetwork(argument: GetTunnelVirtualNetworkPlainArgs): GetTunnelVirtualNetworkResult =
getTunnelVirtualNetworkResultToKotlin(getTunnelVirtualNetworkPlain(argument.toJava()).await())
/**
* @see [getTunnelVirtualNetwork].
* @param accountId The account identifier to target for the resource.
* @param name The Virtual Network Name.
* @return A collection of values returned by getTunnelVirtualNetwork.
*/
public suspend fun getTunnelVirtualNetwork(accountId: String, name: String): GetTunnelVirtualNetworkResult {
val argument = GetTunnelVirtualNetworkPlainArgs(
accountId = accountId,
name = name,
)
return getTunnelVirtualNetworkResultToKotlin(getTunnelVirtualNetworkPlain(argument.toJava()).await())
}
/**
* @see [getTunnelVirtualNetwork].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetTunnelVirtualNetworkPlainArgs].
* @return A collection of values returned by getTunnelVirtualNetwork.
*/
public suspend fun getTunnelVirtualNetwork(argument: suspend GetTunnelVirtualNetworkPlainArgsBuilder.() -> Unit): GetTunnelVirtualNetworkResult {
val builder = GetTunnelVirtualNetworkPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getTunnelVirtualNetworkResultToKotlin(getTunnelVirtualNetworkPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to retrieve information about the currently authenticated user.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const me = cloudflare.getUser({});
* const all = cloudflare.getApiTokenPermissionGroups({});
* const example = new cloudflare.ApiToken("example", {
* name: "Terraform Cloud (Terraform)",
* policies: [{
* permissionGroups: [all.then(all => all.user?.["User Details Read"])],
* resources: me.then(me => {
* [`com.cloudflare.api.user.${me.id}`]: "*",
* }),
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* me = cloudflare.get_user()
* all = cloudflare.get_api_token_permission_groups()
* example = cloudflare.ApiToken("example",
* name="Terraform Cloud (Terraform)",
* policies=[{
* "permission_groups": [all.user["User Details Read"]],
* "resources": {
* "": "*",
* },
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var me = Cloudflare.GetUser.Invoke();
* var all = Cloudflare.GetApiTokenPermissionGroups.Invoke();
* var example = new Cloudflare.ApiToken("example", new()
* {
* Name = "Terraform Cloud (Terraform)",
* Policies = new[]
* {
* new Cloudflare.Inputs.ApiTokenPolicyArgs
* {
* PermissionGroups = new[]
* {
* all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.User?.User_Details_Read),
* },
* Resources =
* {
* { $"com.cloudflare.api.user.{me.Apply(getUserResult => getUserResult.Id)}", "*" },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* me, err := cloudflare.GetUser(ctx, nil, nil);
* if err != nil {
* return err
* }
* all, err := cloudflare.GetApiTokenPermissionGroups(ctx, nil, nil);
* if err != nil {
* return err
* }
* _, err = cloudflare.NewApiToken(ctx, "example", &cloudflare.ApiTokenArgs{
* Name: pulumi.String("Terraform Cloud (Terraform)"),
* Policies: cloudflare.ApiTokenPolicyArray{
* &cloudflare.ApiTokenPolicyArgs{
* PermissionGroups: pulumi.StringArray{
* pulumi.String(all.User.User Details Read),
* },
* Resources: pulumi.StringMap{
* fmt.Sprintf("com.cloudflare.api.user.%v", me.Id): pulumi.String("*"),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.ApiToken;
* import com.pulumi.cloudflare.ApiTokenArgs;
* import com.pulumi.cloudflare.inputs.ApiTokenPolicyArgs;
* 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 me = CloudflareFunctions.getUser();
* final var all = CloudflareFunctions.getApiTokenPermissionGroups();
* var example = new ApiToken("example", ApiTokenArgs.builder()
* .name("Terraform Cloud (Terraform)")
* .policies(ApiTokenPolicyArgs.builder()
* .permissionGroups(all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.user().User Details Read()))
* .resources(Map.of(String.format("com.cloudflare.api.user.%s", me.applyValue(getUserResult -> getUserResult.id())), "*"))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:ApiToken
* properties:
* name: Terraform Cloud (Terraform)
* policies:
* - permissionGroups:
* - ${all.user"User Details Read"[%!s(MISSING)]}
* resources:
* com.cloudflare.api.user.${me.id}: '*'
* variables:
* me:
* fn::invoke:
* Function: cloudflare:getUser
* Arguments: {}
* all:
* fn::invoke:
* Function: cloudflare:getApiTokenPermissionGroups
* Arguments: {}
* ```
*
* @param argument Use this data source to retrieve information about the currently authenticated user.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const me = cloudflare.getUser({});
* const all = cloudflare.getApiTokenPermissionGroups({});
* const example = new cloudflare.ApiToken("example", {
* name: "Terraform Cloud (Terraform)",
* policies: [{
* permissionGroups: [all.then(all => all.user?.["User Details Read"])],
* resources: me.then(me => {
* [`com.cloudflare.api.user.${me.id}`]: "*",
* }),
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* me = cloudflare.get_user()
* all = cloudflare.get_api_token_permission_groups()
* example = cloudflare.ApiToken("example",
* name="Terraform Cloud (Terraform)",
* policies=[{
* "permission_groups": [all.user["User Details Read"]],
* "resources": {
* "": "*",
* },
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var me = Cloudflare.GetUser.Invoke();
* var all = Cloudflare.GetApiTokenPermissionGroups.Invoke();
* var example = new Cloudflare.ApiToken("example", new()
* {
* Name = "Terraform Cloud (Terraform)",
* Policies = new[]
* {
* new Cloudflare.Inputs.ApiTokenPolicyArgs
* {
* PermissionGroups = new[]
* {
* all.Apply(getApiTokenPermissionGroupsResult => getApiTokenPermissionGroupsResult.User?.User_Details_Read),
* },
* Resources =
* {
* { $"com.cloudflare.api.user.{me.Apply(getUserResult => getUserResult.Id)}", "*" },
* },
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "fmt"
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* me, err := cloudflare.GetUser(ctx, nil, nil);
* if err != nil {
* return err
* }
* all, err := cloudflare.GetApiTokenPermissionGroups(ctx, nil, nil);
* if err != nil {
* return err
* }
* _, err = cloudflare.NewApiToken(ctx, "example", &cloudflare.ApiTokenArgs{
* Name: pulumi.String("Terraform Cloud (Terraform)"),
* Policies: cloudflare.ApiTokenPolicyArray{
* &cloudflare.ApiTokenPolicyArgs{
* PermissionGroups: pulumi.StringArray{
* pulumi.String(all.User.User Details Read),
* },
* Resources: pulumi.StringMap{
* fmt.Sprintf("com.cloudflare.api.user.%v", me.Id): pulumi.String("*"),
* },
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.ApiToken;
* import com.pulumi.cloudflare.ApiTokenArgs;
* import com.pulumi.cloudflare.inputs.ApiTokenPolicyArgs;
* 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 me = CloudflareFunctions.getUser();
* final var all = CloudflareFunctions.getApiTokenPermissionGroups();
* var example = new ApiToken("example", ApiTokenArgs.builder()
* .name("Terraform Cloud (Terraform)")
* .policies(ApiTokenPolicyArgs.builder()
* .permissionGroups(all.applyValue(getApiTokenPermissionGroupsResult -> getApiTokenPermissionGroupsResult.user().User Details Read()))
* .resources(Map.of(String.format("com.cloudflare.api.user.%s", me.applyValue(getUserResult -> getUserResult.id())), "*"))
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:ApiToken
* properties:
* name: Terraform Cloud (Terraform)
* policies:
* - permissionGroups:
* - ${all.user"User Details Read"[%!s(MISSING)]}
* resources:
* com.cloudflare.api.user.${me.id}: '*'
* variables:
* me:
* fn::invoke:
* Function: cloudflare:getUser
* Arguments: {}
* all:
* fn::invoke:
* Function: cloudflare:getApiTokenPermissionGroups
* Arguments: {}
* ```
*
* @return A collection of values returned by getUser.
*/
public suspend fun getUser(): GetUserResult = getUserResultToKotlin(getUserPlain().await())
/**
* Use this data source to lookup a single [Access Application](https://developers.cloudflare.com/cloudflare-one/applications/)
* @param argument A collection of arguments for invoking getZeroTrustAccessApplication.
* @return A collection of values returned by getZeroTrustAccessApplication.
*/
public suspend fun getZeroTrustAccessApplication(argument: GetZeroTrustAccessApplicationPlainArgs): GetZeroTrustAccessApplicationResult =
getZeroTrustAccessApplicationResultToKotlin(getZeroTrustAccessApplicationPlain(argument.toJava()).await())
/**
* @see [getZeroTrustAccessApplication].
* @param accountId The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @param domain The primary hostname and path that Access will secure. Must provide only one of `name`, `domain`.
* @param name Friendly name of the Access Application. Must provide only one of `name`, `domain`.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @return A collection of values returned by getZeroTrustAccessApplication.
*/
public suspend fun getZeroTrustAccessApplication(
accountId: String? = null,
domain: String? = null,
name: String? = null,
zoneId: String? = null,
): GetZeroTrustAccessApplicationResult {
val argument = GetZeroTrustAccessApplicationPlainArgs(
accountId = accountId,
domain = domain,
name = name,
zoneId = zoneId,
)
return getZeroTrustAccessApplicationResultToKotlin(getZeroTrustAccessApplicationPlain(argument.toJava()).await())
}
/**
* @see [getZeroTrustAccessApplication].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessApplicationPlainArgs].
* @return A collection of values returned by getZeroTrustAccessApplication.
*/
public suspend fun getZeroTrustAccessApplication(argument: suspend GetZeroTrustAccessApplicationPlainArgsBuilder.() -> Unit): GetZeroTrustAccessApplicationResult {
val builder = GetZeroTrustAccessApplicationPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZeroTrustAccessApplicationResultToKotlin(getZeroTrustAccessApplicationPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to lookup a single [Access Identity Provider](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration) by name.
* @param argument A collection of arguments for invoking getZeroTrustAccessIdentityProvider.
* @return A collection of values returned by getZeroTrustAccessIdentityProvider.
*/
public suspend fun getZeroTrustAccessIdentityProvider(argument: GetZeroTrustAccessIdentityProviderPlainArgs): GetZeroTrustAccessIdentityProviderResult =
getZeroTrustAccessIdentityProviderResultToKotlin(getZeroTrustAccessIdentityProviderPlain(argument.toJava()).await())
/**
* @see [getZeroTrustAccessIdentityProvider].
* @param accountId The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @param name Access Identity Provider name to search for.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `account_id`.
* @return A collection of values returned by getZeroTrustAccessIdentityProvider.
*/
public suspend fun getZeroTrustAccessIdentityProvider(
accountId: String? = null,
name: String,
zoneId: String? = null,
): GetZeroTrustAccessIdentityProviderResult {
val argument = GetZeroTrustAccessIdentityProviderPlainArgs(
accountId = accountId,
name = name,
zoneId = zoneId,
)
return getZeroTrustAccessIdentityProviderResultToKotlin(getZeroTrustAccessIdentityProviderPlain(argument.toJava()).await())
}
/**
* @see [getZeroTrustAccessIdentityProvider].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustAccessIdentityProviderPlainArgs].
* @return A collection of values returned by getZeroTrustAccessIdentityProvider.
*/
public suspend fun getZeroTrustAccessIdentityProvider(argument: suspend GetZeroTrustAccessIdentityProviderPlainArgsBuilder.() -> Unit): GetZeroTrustAccessIdentityProviderResult {
val builder = GetZeroTrustAccessIdentityProviderPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZeroTrustAccessIdentityProviderResultToKotlin(getZeroTrustAccessIdentityProviderPlain(builtArgument.toJava()).await())
}
/**
* Use this datasource to lookup a tunnel in an account.
* @param argument A collection of arguments for invoking getZeroTrustTunnelCloudflared.
* @return A collection of values returned by getZeroTrustTunnelCloudflared.
*/
public suspend fun getZeroTrustTunnelCloudflared(argument: GetZeroTrustTunnelCloudflaredPlainArgs): GetZeroTrustTunnelCloudflaredResult =
getZeroTrustTunnelCloudflaredResultToKotlin(getZeroTrustTunnelCloudflaredPlain(argument.toJava()).await())
/**
* @see [getZeroTrustTunnelCloudflared].
* @param accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
* @param isDeleted If true, only include deleted tunnels. If false, exclude deleted tunnels. If empty, all tunnels will be included. **Modifying this attribute will force creation of a new resource.**
* @param name Name of the tunnel. **Modifying this attribute will force creation of a new resource.**
* @return A collection of values returned by getZeroTrustTunnelCloudflared.
*/
public suspend fun getZeroTrustTunnelCloudflared(
accountId: String,
isDeleted: Boolean? = null,
name: String,
): GetZeroTrustTunnelCloudflaredResult {
val argument = GetZeroTrustTunnelCloudflaredPlainArgs(
accountId = accountId,
isDeleted = isDeleted,
name = name,
)
return getZeroTrustTunnelCloudflaredResultToKotlin(getZeroTrustTunnelCloudflaredPlain(argument.toJava()).await())
}
/**
* @see [getZeroTrustTunnelCloudflared].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelCloudflaredPlainArgs].
* @return A collection of values returned by getZeroTrustTunnelCloudflared.
*/
public suspend fun getZeroTrustTunnelCloudflared(argument: suspend GetZeroTrustTunnelCloudflaredPlainArgsBuilder.() -> Unit): GetZeroTrustTunnelCloudflaredResult {
val builder = GetZeroTrustTunnelCloudflaredPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZeroTrustTunnelCloudflaredResultToKotlin(getZeroTrustTunnelCloudflaredPlain(builtArgument.toJava()).await())
}
/**
* Use this datasource to lookup a tunnel virtual network in an account.
* @param argument A collection of arguments for invoking getZeroTrustTunnelVirtualNetwork.
* @return A collection of values returned by getZeroTrustTunnelVirtualNetwork.
*/
public suspend fun getZeroTrustTunnelVirtualNetwork(argument: GetZeroTrustTunnelVirtualNetworkPlainArgs): GetZeroTrustTunnelVirtualNetworkResult =
getZeroTrustTunnelVirtualNetworkResultToKotlin(getZeroTrustTunnelVirtualNetworkPlain(argument.toJava()).await())
/**
* @see [getZeroTrustTunnelVirtualNetwork].
* @param accountId The account identifier to target for the resource.
* @param name The Virtual Network Name.
* @return A collection of values returned by getZeroTrustTunnelVirtualNetwork.
*/
public suspend fun getZeroTrustTunnelVirtualNetwork(accountId: String, name: String): GetZeroTrustTunnelVirtualNetworkResult {
val argument = GetZeroTrustTunnelVirtualNetworkPlainArgs(
accountId = accountId,
name = name,
)
return getZeroTrustTunnelVirtualNetworkResultToKotlin(getZeroTrustTunnelVirtualNetworkPlain(argument.toJava()).await())
}
/**
* @see [getZeroTrustTunnelVirtualNetwork].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZeroTrustTunnelVirtualNetworkPlainArgs].
* @return A collection of values returned by getZeroTrustTunnelVirtualNetwork.
*/
public suspend fun getZeroTrustTunnelVirtualNetwork(argument: suspend GetZeroTrustTunnelVirtualNetworkPlainArgsBuilder.() -> Unit): GetZeroTrustTunnelVirtualNetworkResult {
val builder = GetZeroTrustTunnelVirtualNetworkPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZeroTrustTunnelVirtualNetworkResultToKotlin(getZeroTrustTunnelVirtualNetworkPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to look up [zone](https://api.cloudflare.com/#zone-properties)
* info. This is the singular alternative to `cloudflare.getZones`.
* > **Note** Cloudflare zone names **are not unique**. It is possible for multiple
* accounts to have the same zone created but in different states. If you are
* using this setup, it is advised to use the `account_id` attribute on this
* resource or swap to `cloudflare.getZones` to further filter the results.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getZone({
* name: "example.com",
* });
* const exampleRecord = new cloudflare.Record("example", {
* zoneId: example.then(example => example.id),
* name: "www",
* content: "203.0.113.1",
* type: "A",
* proxied: true,
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_zone(name="example.com")
* example_record = cloudflare.Record("example",
* zone_id=example.id,
* name="www",
* content="203.0.113.1",
* type="A",
* proxied=True)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetZone.Invoke(new()
* {
* Name = "example.com",
* });
* var exampleRecord = new Cloudflare.Record("example", new()
* {
* ZoneId = example.Apply(getZoneResult => getZoneResult.Id),
* Name = "www",
* Content = "203.0.113.1",
* Type = "A",
* Proxied = true,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := cloudflare.LookupZone(ctx, &cloudflare.LookupZoneArgs{
* Name: pulumi.StringRef("example.com"),
* }, nil)
* if err != nil {
* return err
* }
* _, err = cloudflare.NewRecord(ctx, "example", &cloudflare.RecordArgs{
* ZoneId: pulumi.String(example.Id),
* Name: pulumi.String("www"),
* Content: pulumi.String("203.0.113.1"),
* Type: pulumi.String("A"),
* Proxied: pulumi.Bool(true),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetZoneArgs;
* import com.pulumi.cloudflare.Record;
* import com.pulumi.cloudflare.RecordArgs;
* 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 example = CloudflareFunctions.getZone(GetZoneArgs.builder()
* .name("example.com")
* .build());
* var exampleRecord = new Record("exampleRecord", RecordArgs.builder()
* .zoneId(example.applyValue(getZoneResult -> getZoneResult.id()))
* .name("www")
* .content("203.0.113.1")
* .type("A")
* .proxied(true)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleRecord:
* type: cloudflare:Record
* name: example
* properties:
* zoneId: ${example.id}
* name: www
* content: 203.0.113.1
* type: A
* proxied: true
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getZone
* Arguments:
* name: example.com
* ```
*
* @param argument A collection of arguments for invoking getZone.
* @return A collection of values returned by getZone.
*/
public suspend fun getZone(argument: GetZonePlainArgs): GetZoneResult =
getZoneResultToKotlin(getZonePlain(argument.toJava()).await())
/**
* @see [getZone].
* @param accountId The account identifier to target for the resource.
* @param name The name of the zone. Must provide only one of `zone_id`, `name`.
* @param zoneId The zone identifier to target for the resource. Must provide only one of `zone_id`, `name`.
* @return A collection of values returned by getZone.
*/
public suspend fun getZone(
accountId: String? = null,
name: String? = null,
zoneId: String? = null,
): GetZoneResult {
val argument = GetZonePlainArgs(
accountId = accountId,
name = name,
zoneId = zoneId,
)
return getZoneResultToKotlin(getZonePlain(argument.toJava()).await())
}
/**
* @see [getZone].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZonePlainArgs].
* @return A collection of values returned by getZone.
*/
public suspend fun getZone(argument: suspend GetZonePlainArgsBuilder.() -> Unit): GetZoneResult {
val builder = GetZonePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZoneResultToKotlin(getZonePlain(builtArgument.toJava()).await())
}
/**
* Provides a Cloudflare data source to look up Cache Reserve
* status for a given zone.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getZoneCacheReserve({
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_zone_cache_reserve(zone_id="0da42c8d2132a9ddaf714f9e7c920711")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetZoneCacheReserve.Invoke(new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupZoneCacheReserve(ctx, &cloudflare.LookupZoneCacheReserveArgs{
* ZoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetZoneCacheReserveArgs;
* 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 example = CloudflareFunctions.getZoneCacheReserve(GetZoneCacheReserveArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getZoneCacheReserve
* Arguments:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* ```
*
* @param argument A collection of arguments for invoking getZoneCacheReserve.
* @return A collection of values returned by getZoneCacheReserve.
*/
public suspend fun getZoneCacheReserve(argument: GetZoneCacheReservePlainArgs): GetZoneCacheReserveResult =
getZoneCacheReserveResultToKotlin(getZoneCacheReservePlain(argument.toJava()).await())
/**
* @see [getZoneCacheReserve].
* @param zoneId The zone identifier to target for the resource.
* @return A collection of values returned by getZoneCacheReserve.
*/
public suspend fun getZoneCacheReserve(zoneId: String): GetZoneCacheReserveResult {
val argument = GetZoneCacheReservePlainArgs(
zoneId = zoneId,
)
return getZoneCacheReserveResultToKotlin(getZoneCacheReservePlain(argument.toJava()).await())
}
/**
* @see [getZoneCacheReserve].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZoneCacheReservePlainArgs].
* @return A collection of values returned by getZoneCacheReserve.
*/
public suspend fun getZoneCacheReserve(argument: suspend GetZoneCacheReservePlainArgsBuilder.() -> Unit): GetZoneCacheReserveResult {
val builder = GetZoneCacheReservePlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZoneCacheReserveResultToKotlin(getZoneCacheReservePlain(builtArgument.toJava()).await())
}
/**
* Use this data source to look up Zone DNSSEC settings.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = cloudflare.getZoneDnssec({
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.get_zone_dnssec(zone_id="0da42c8d2132a9ddaf714f9e7c920711")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = Cloudflare.GetZoneDnssec.Invoke(new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.LookupZoneDnssec(ctx, &cloudflare.LookupZoneDnssecArgs{
* ZoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* }, nil)
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.CloudflareFunctions;
* import com.pulumi.cloudflare.inputs.GetZoneDnssecArgs;
* 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 example = CloudflareFunctions.getZoneDnssec(GetZoneDnssecArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .build());
* }
* }
* ```
* ```yaml
* variables:
* example:
* fn::invoke:
* Function: cloudflare:getZoneDnssec
* Arguments:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* ```
*
* @param argument A collection of arguments for invoking getZoneDnssec.
* @return A collection of values returned by getZoneDnssec.
*/
public suspend fun getZoneDnssec(argument: GetZoneDnssecPlainArgs): GetZoneDnssecResult =
getZoneDnssecResultToKotlin(getZoneDnssecPlain(argument.toJava()).await())
/**
* @see [getZoneDnssec].
* @param zoneId The zone identifier to target for the resource.
* @return A collection of values returned by getZoneDnssec.
*/
public suspend fun getZoneDnssec(zoneId: String): GetZoneDnssecResult {
val argument = GetZoneDnssecPlainArgs(
zoneId = zoneId,
)
return getZoneDnssecResultToKotlin(getZoneDnssecPlain(argument.toJava()).await())
}
/**
* @see [getZoneDnssec].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZoneDnssecPlainArgs].
* @return A collection of values returned by getZoneDnssec.
*/
public suspend fun getZoneDnssec(argument: suspend GetZoneDnssecPlainArgsBuilder.() -> Unit): GetZoneDnssecResult {
val builder = GetZoneDnssecPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZoneDnssecResultToKotlin(getZoneDnssecPlain(builtArgument.toJava()).await())
}
/**
* Use this data source to look up Zone results for use in other resources.
* @param argument A collection of arguments for invoking getZones.
* @return A collection of values returned by getZones.
*/
public suspend fun getZones(argument: GetZonesPlainArgs): GetZonesResult =
getZonesResultToKotlin(getZonesPlain(argument.toJava()).await())
/**
* @see [getZones].
* @param filter One or more values used to look up zone records. If more than one value is given all values must match in order to be included.
* @return A collection of values returned by getZones.
*/
public suspend fun getZones(filter: GetZonesFilter): GetZonesResult {
val argument = GetZonesPlainArgs(
filter = filter,
)
return getZonesResultToKotlin(getZonesPlain(argument.toJava()).await())
}
/**
* @see [getZones].
* @param argument Builder for [com.pulumi.cloudflare.kotlin.inputs.GetZonesPlainArgs].
* @return A collection of values returned by getZones.
*/
public suspend fun getZones(argument: suspend GetZonesPlainArgsBuilder.() -> Unit): GetZonesResult {
val builder = GetZonesPlainArgsBuilder()
builder.argument()
val builtArgument = builder.build()
return getZonesResultToKotlin(getZonesPlain(builtArgument.toJava()).await())
}
}