Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.waf.getCertificates
Explore with Pulumi AI
This data source provides the Waf Certificates of the current Alibaba Cloud user.
NOTE: Available in v1.135.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.waf.getCertificates({
    ids: ["your_certificate_id"],
    instanceId: "your_instance_id",
    domain: "your_domain_name",
});
export const wafCertificate = _default.then(_default => _default.certificates?.[0]);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.waf.get_certificates(ids=["your_certificate_id"],
    instance_id="your_instance_id",
    domain="your_domain_name")
pulumi.export("wafCertificate", default.certificates[0])
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/waf"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := waf.GetCertificates(ctx, &waf.GetCertificatesArgs{
			Ids: []string{
				"your_certificate_id",
			},
			InstanceId: "your_instance_id",
			Domain:     pulumi.StringRef("your_domain_name"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("wafCertificate", _default.Certificates[0])
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Waf.GetCertificates.Invoke(new()
    {
        Ids = new[]
        {
            "your_certificate_id",
        },
        InstanceId = "your_instance_id",
        Domain = "your_domain_name",
    });
    return new Dictionary<string, object?>
    {
        ["wafCertificate"] = @default.Apply(@default => @default.Apply(getCertificatesResult => getCertificatesResult.Certificates[0])),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.waf.WafFunctions;
import com.pulumi.alicloud.waf.inputs.GetCertificatesArgs;
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 default = WafFunctions.getCertificates(GetCertificatesArgs.builder()
            .ids("your_certificate_id")
            .instanceId("your_instance_id")
            .domain("your_domain_name")
            .build());
        ctx.export("wafCertificate", default_.certificates()[0]);
    }
}
variables:
  default:
    fn::invoke:
      Function: alicloud:waf:getCertificates
      Arguments:
        ids:
          - your_certificate_id
        instanceId: your_instance_id
        domain: your_domain_name
outputs:
  wafCertificate: ${default.certificates[0]}
Using getCertificates
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCertificates(args: GetCertificatesArgs, opts?: InvokeOptions): Promise<GetCertificatesResult>
function getCertificatesOutput(args: GetCertificatesOutputArgs, opts?: InvokeOptions): Output<GetCertificatesResult>def get_certificates(domain: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     instance_id: Optional[str] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetCertificatesResult
def get_certificates_output(domain: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     instance_id: Optional[pulumi.Input[str]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetCertificatesResult]func GetCertificates(ctx *Context, args *GetCertificatesArgs, opts ...InvokeOption) (*GetCertificatesResult, error)
func GetCertificatesOutput(ctx *Context, args *GetCertificatesOutputArgs, opts ...InvokeOption) GetCertificatesResultOutput> Note: This function is named GetCertificates in the Go SDK.
public static class GetCertificates 
{
    public static Task<GetCertificatesResult> InvokeAsync(GetCertificatesArgs args, InvokeOptions? opts = null)
    public static Output<GetCertificatesResult> Invoke(GetCertificatesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCertificatesResult> getCertificates(GetCertificatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:waf/getCertificates:getCertificates
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Instance
Id string - WAF instance ID.
 - Domain string
 - WAF domain name.
 - Ids List<string>
 - A list of Certificate IDs.
 - Name
Regex string - A regex string to filter results by Certificate name.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- Instance
Id string - WAF instance ID.
 - Domain string
 - WAF domain name.
 - Ids []string
 - A list of Certificate IDs.
 - Name
Regex string - A regex string to filter results by Certificate name.
 - Output
File string - File name where to save data source results (after running 
pulumi preview). 
- instance
Id String - WAF instance ID.
 - domain String
 - WAF domain name.
 - ids List<String>
 - A list of Certificate IDs.
 - name
Regex String - A regex string to filter results by Certificate name.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
- instance
Id string - WAF instance ID.
 - domain string
 - WAF domain name.
 - ids string[]
 - A list of Certificate IDs.
 - name
Regex string - A regex string to filter results by Certificate name.
 - output
File string - File name where to save data source results (after running 
pulumi preview). 
- instance_
id str - WAF instance ID.
 - domain str
 - WAF domain name.
 - ids Sequence[str]
 - A list of Certificate IDs.
 - name_
regex str - A regex string to filter results by Certificate name.
 - output_
file str - File name where to save data source results (after running 
pulumi preview). 
- instance
Id String - WAF instance ID.
 - domain String
 - WAF domain name.
 - ids List<String>
 - A list of Certificate IDs.
 - name
Regex String - A regex string to filter results by Certificate name.
 - output
File String - File name where to save data source results (after running 
pulumi preview). 
getCertificates Result
The following output properties are available:
- Certificates
List<Pulumi.
Ali Cloud. Waf. Outputs. Get Certificates Certificate>  - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids List<string>
 - Instance
Id string - Names List<string>
 - Domain string
 - Name
Regex string - Output
File string 
- Certificates
[]Get
Certificates Certificate  - Id string
 - The provider-assigned unique ID for this managed resource.
 - Ids []string
 - Instance
Id string - Names []string
 - Domain string
 - Name
Regex string - Output
File string 
- certificates
List<Get
Certificates Certificate>  - id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - instance
Id String - names List<String>
 - domain String
 - name
Regex String - output
File String 
- certificates
Get
Certificates Certificate[]  - id string
 - The provider-assigned unique ID for this managed resource.
 - ids string[]
 - instance
Id string - names string[]
 - domain string
 - name
Regex string - output
File string 
- certificates
Sequence[Get
Certificates Certificate]  - id str
 - The provider-assigned unique ID for this managed resource.
 - ids Sequence[str]
 - instance_
id str - names Sequence[str]
 - domain str
 - name_
regex str - output_
file str 
- certificates List<Property Map>
 - id String
 - The provider-assigned unique ID for this managed resource.
 - ids List<String>
 - instance
Id String - names List<String>
 - domain String
 - name
Regex String - output
File String 
Supporting Types
GetCertificatesCertificate  
- Certificate
Id string - Certificate recording ID.
 - Certificate
Name string - Your certificate name.
 - Common
Name string - Certificate bound to the domain name.
 - Domain string
 - The domain that you want to add to WAF.
 - Id string
 - The ID of the Certificate.
 - Instance
Id string - WAF instance ID.
 - Is
Using bool - Sans List<string>
 
- Certificate
Id string - Certificate recording ID.
 - Certificate
Name string - Your certificate name.
 - Common
Name string - Certificate bound to the domain name.
 - Domain string
 - The domain that you want to add to WAF.
 - Id string
 - The ID of the Certificate.
 - Instance
Id string - WAF instance ID.
 - Is
Using bool - Sans []string
 
- certificate
Id String - Certificate recording ID.
 - certificate
Name String - Your certificate name.
 - common
Name String - Certificate bound to the domain name.
 - domain String
 - The domain that you want to add to WAF.
 - id String
 - The ID of the Certificate.
 - instance
Id String - WAF instance ID.
 - is
Using Boolean - sans List<String>
 
- certificate
Id string - Certificate recording ID.
 - certificate
Name string - Your certificate name.
 - common
Name string - Certificate bound to the domain name.
 - domain string
 - The domain that you want to add to WAF.
 - id string
 - The ID of the Certificate.
 - instance
Id string - WAF instance ID.
 - is
Using boolean - sans string[]
 
- certificate_
id str - Certificate recording ID.
 - certificate_
name str - Your certificate name.
 - common_
name str - Certificate bound to the domain name.
 - domain str
 - The domain that you want to add to WAF.
 - id str
 - The ID of the Certificate.
 - instance_
id str - WAF instance ID.
 - is_
using bool - sans Sequence[str]
 
- certificate
Id String - Certificate recording ID.
 - certificate
Name String - Your certificate name.
 - common
Name String - Certificate bound to the domain name.
 - domain String
 - The domain that you want to add to WAF.
 - id String
 - The ID of the Certificate.
 - instance
Id String - WAF instance ID.
 - is
Using Boolean - sans List<String>
 
Package Details
- Repository
 - Alibaba Cloud pulumi/pulumi-alicloud
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
alicloudTerraform Provider.