1. Packages
  2. Scaleway
  3. API Docs
  4. tem
  5. BlockedList
Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse

scaleway.tem.BlockedList

Explore with Pulumi AI

scaleway logo
Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse

    Creates and manages blocklisted email addresses for a Scaleway Transactional Email Domain. For more information refer to the API documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const test = new scaleway.tem.BlockedList("test", {
        domainId: "fr-par/12345678-1234-1234-1234-123456789abc",
        email: "spam@example.com",
        type: "mailbox_full",
        reason: "Spam detected",
        region: "fr-par",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    test = scaleway.tem.BlockedList("test",
        domain_id="fr-par/12345678-1234-1234-1234-123456789abc",
        email="spam@example.com",
        type="mailbox_full",
        reason="Spam detected",
        region="fr-par")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/tem"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tem.NewBlockedList(ctx, "test", &tem.BlockedListArgs{
    			DomainId: pulumi.String("fr-par/12345678-1234-1234-1234-123456789abc"),
    			Email:    pulumi.String("spam@example.com"),
    			Type:     pulumi.String("mailbox_full"),
    			Reason:   pulumi.String("Spam detected"),
    			Region:   pulumi.String("fr-par"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Scaleway.Tem.BlockedList("test", new()
        {
            DomainId = "fr-par/12345678-1234-1234-1234-123456789abc",
            Email = "spam@example.com",
            Type = "mailbox_full",
            Reason = "Spam detected",
            Region = "fr-par",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.tem.BlockedList;
    import com.pulumi.scaleway.tem.BlockedListArgs;
    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) {
            var test = new BlockedList("test", BlockedListArgs.builder()
                .domainId("fr-par/12345678-1234-1234-1234-123456789abc")
                .email("spam@example.com")
                .type("mailbox_full")
                .reason("Spam detected")
                .region("fr-par")
                .build());
    
        }
    }
    
    resources:
      test:
        type: scaleway:tem:BlockedList
        properties:
          domainId: fr-par/12345678-1234-1234-1234-123456789abc
          email: spam@example.com
          type: mailbox_full
          reason: Spam detected
          region: fr-par
    

    Create BlockedList Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new BlockedList(name: string, args: BlockedListArgs, opts?: CustomResourceOptions);
    @overload
    def BlockedList(resource_name: str,
                    args: BlockedListArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def BlockedList(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    domain_id: Optional[str] = None,
                    email: Optional[str] = None,
                    type: Optional[str] = None,
                    project_id: Optional[str] = None,
                    reason: Optional[str] = None,
                    region: Optional[str] = None)
    func NewBlockedList(ctx *Context, name string, args BlockedListArgs, opts ...ResourceOption) (*BlockedList, error)
    public BlockedList(string name, BlockedListArgs args, CustomResourceOptions? opts = null)
    public BlockedList(String name, BlockedListArgs args)
    public BlockedList(String name, BlockedListArgs args, CustomResourceOptions options)
    
    type: scaleway:tem:BlockedList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BlockedListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args BlockedListArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args BlockedListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlockedListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlockedListArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var blockedListResource = new Scaleway.Tem.BlockedList("blockedListResource", new()
    {
        DomainId = "string",
        Email = "string",
        Type = "string",
        ProjectId = "string",
        Reason = "string",
        Region = "string",
    });
    
    example, err := tem.NewBlockedList(ctx, "blockedListResource", &tem.BlockedListArgs{
    	DomainId:  pulumi.String("string"),
    	Email:     pulumi.String("string"),
    	Type:      pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Reason:    pulumi.String("string"),
    	Region:    pulumi.String("string"),
    })
    
    var blockedListResource = new BlockedList("blockedListResource", BlockedListArgs.builder()
        .domainId("string")
        .email("string")
        .type("string")
        .projectId("string")
        .reason("string")
        .region("string")
        .build());
    
    blocked_list_resource = scaleway.tem.BlockedList("blockedListResource",
        domain_id="string",
        email="string",
        type="string",
        project_id="string",
        reason="string",
        region="string")
    
    const blockedListResource = new scaleway.tem.BlockedList("blockedListResource", {
        domainId: "string",
        email: "string",
        type: "string",
        projectId: "string",
        reason: "string",
        region: "string",
    });
    
    type: scaleway:tem:BlockedList
    properties:
        domainId: string
        email: string
        projectId: string
        reason: string
        region: string
        type: string
    

    BlockedList Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The BlockedList resource accepts the following input properties:

    DomainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    Email string
    The email address to block.
    Type string
    Type of the blocklist. Possible values are:
    ProjectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    Reason string
    Reason for blocking the email address.
    Region string
    The region in which the blocklist is created. Defaults to the provider's region.
    DomainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    Email string
    The email address to block.
    Type string
    Type of the blocklist. Possible values are:
    ProjectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    Reason string
    Reason for blocking the email address.
    Region string
    The region in which the blocklist is created. Defaults to the provider's region.
    domainId String
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email String
    The email address to block.
    type String
    Type of the blocklist. Possible values are:
    projectId String
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason String
    Reason for blocking the email address.
    region String
    The region in which the blocklist is created. Defaults to the provider's region.
    domainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email string
    The email address to block.
    type string
    Type of the blocklist. Possible values are:
    projectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason string
    Reason for blocking the email address.
    region string
    The region in which the blocklist is created. Defaults to the provider's region.
    domain_id str
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email str
    The email address to block.
    type str
    Type of the blocklist. Possible values are:
    project_id str
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason str
    Reason for blocking the email address.
    region str
    The region in which the blocklist is created. Defaults to the provider's region.
    domainId String
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email String
    The email address to block.
    type String
    Type of the blocklist. Possible values are:
    projectId String
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason String
    Reason for blocking the email address.
    region String
    The region in which the blocklist is created. Defaults to the provider's region.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BlockedList resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BlockedList Resource

    Get an existing BlockedList resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: BlockedListState, opts?: CustomResourceOptions): BlockedList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_id: Optional[str] = None,
            email: Optional[str] = None,
            project_id: Optional[str] = None,
            reason: Optional[str] = None,
            region: Optional[str] = None,
            type: Optional[str] = None) -> BlockedList
    func GetBlockedList(ctx *Context, name string, id IDInput, state *BlockedListState, opts ...ResourceOption) (*BlockedList, error)
    public static BlockedList Get(string name, Input<string> id, BlockedListState? state, CustomResourceOptions? opts = null)
    public static BlockedList get(String name, Output<String> id, BlockedListState state, CustomResourceOptions options)
    resources:  _:    type: scaleway:tem:BlockedList    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DomainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    Email string
    The email address to block.
    ProjectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    Reason string
    Reason for blocking the email address.
    Region string
    The region in which the blocklist is created. Defaults to the provider's region.
    Type string
    Type of the blocklist. Possible values are:
    DomainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    Email string
    The email address to block.
    ProjectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    Reason string
    Reason for blocking the email address.
    Region string
    The region in which the blocklist is created. Defaults to the provider's region.
    Type string
    Type of the blocklist. Possible values are:
    domainId String
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email String
    The email address to block.
    projectId String
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason String
    Reason for blocking the email address.
    region String
    The region in which the blocklist is created. Defaults to the provider's region.
    type String
    Type of the blocklist. Possible values are:
    domainId string
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email string
    The email address to block.
    projectId string
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason string
    Reason for blocking the email address.
    region string
    The region in which the blocklist is created. Defaults to the provider's region.
    type string
    Type of the blocklist. Possible values are:
    domain_id str
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email str
    The email address to block.
    project_id str
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason str
    Reason for blocking the email address.
    region str
    The region in which the blocklist is created. Defaults to the provider's region.
    type str
    Type of the blocklist. Possible values are:
    domainId String
    The ID of the domain affected by the blocklist. Must be in the format {region}/{domain_id}.
    email String
    The email address to block.
    projectId String
    The ID of the project this blocklist belongs to. Defaults to the provider's project ID.
    reason String
    Reason for blocking the email address.
    region String
    The region in which the blocklist is created. Defaults to the provider's region.
    type String
    Type of the blocklist. Possible values are:

    Import

    Blocklists can be imported using the {region}/{id}, e.g.

    bash

    $ pulumi import scaleway:tem/blockedList:BlockedList test fr-par/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse