1. Packages
  2. Azure Classic
  3. API Docs
  4. core
  5. ResourceProviderRegistration

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

azure.core.ResourceProviderRegistration

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages the registration of a Resource Provider - which allows access to the API’s supported by this Resource Provider.

    The Azure Provider will automatically register all of the Resource Providers which it supports on launch (unless opted-out using the skip_provider_registration field within the provider block).

    !> Note: The errors returned from the Azure API when a Resource Provider is unregistered are unclear (example API version '2019-01-01' was not found for 'Microsoft.Foo') - please ensure that all of the necessary Resource Providers you’re using are registered - if in doubt we strongly recommend letting the provider register these for you.

    Note: Adding or Removing a Preview Feature will re-register the Resource Provider.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceProviderRegistration("example", {name: "Microsoft.PolicyInsights"});
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceProviderRegistration("example", name="Microsoft.PolicyInsights")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{
    			Name: pulumi.String("Microsoft.PolicyInsights"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceProviderRegistration("example", new()
        {
            Name = "Microsoft.PolicyInsights",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceProviderRegistration;
    import com.pulumi.azure.core.ResourceProviderRegistrationArgs;
    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 example = new ResourceProviderRegistration("example", ResourceProviderRegistrationArgs.builder()
                .name("Microsoft.PolicyInsights")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceProviderRegistration
        properties:
          name: Microsoft.PolicyInsights
    

    Registering A Preview Feature)

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceProviderRegistration("example", {
        name: "Microsoft.ContainerService",
        features: [{
            name: "AKS-DataPlaneAutoApprove",
            registered: true,
        }],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceProviderRegistration("example",
        name="Microsoft.ContainerService",
        features=[{
            "name": "AKS-DataPlaneAutoApprove",
            "registered": True,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := core.NewResourceProviderRegistration(ctx, "example", &core.ResourceProviderRegistrationArgs{
    			Name: pulumi.String("Microsoft.ContainerService"),
    			Features: core.ResourceProviderRegistrationFeatureArray{
    				&core.ResourceProviderRegistrationFeatureArgs{
    					Name:       pulumi.String("AKS-DataPlaneAutoApprove"),
    					Registered: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceProviderRegistration("example", new()
        {
            Name = "Microsoft.ContainerService",
            Features = new[]
            {
                new Azure.Core.Inputs.ResourceProviderRegistrationFeatureArgs
                {
                    Name = "AKS-DataPlaneAutoApprove",
                    Registered = true,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceProviderRegistration;
    import com.pulumi.azure.core.ResourceProviderRegistrationArgs;
    import com.pulumi.azure.core.inputs.ResourceProviderRegistrationFeatureArgs;
    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 example = new ResourceProviderRegistration("example", ResourceProviderRegistrationArgs.builder()
                .name("Microsoft.ContainerService")
                .features(ResourceProviderRegistrationFeatureArgs.builder()
                    .name("AKS-DataPlaneAutoApprove")
                    .registered(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceProviderRegistration
        properties:
          name: Microsoft.ContainerService
          features:
            - name: AKS-DataPlaneAutoApprove
              registered: true
    

    Create ResourceProviderRegistration Resource

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

    Constructor syntax

    new ResourceProviderRegistration(name: string, args?: ResourceProviderRegistrationArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceProviderRegistration(resource_name: str,
                                     args: Optional[ResourceProviderRegistrationArgs] = None,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceProviderRegistration(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     features: Optional[Sequence[ResourceProviderRegistrationFeatureArgs]] = None,
                                     name: Optional[str] = None)
    func NewResourceProviderRegistration(ctx *Context, name string, args *ResourceProviderRegistrationArgs, opts ...ResourceOption) (*ResourceProviderRegistration, error)
    public ResourceProviderRegistration(string name, ResourceProviderRegistrationArgs? args = null, CustomResourceOptions? opts = null)
    public ResourceProviderRegistration(String name, ResourceProviderRegistrationArgs args)
    public ResourceProviderRegistration(String name, ResourceProviderRegistrationArgs args, CustomResourceOptions options)
    
    type: azure:core:ResourceProviderRegistration
    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 ResourceProviderRegistrationArgs
    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 ResourceProviderRegistrationArgs
    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 ResourceProviderRegistrationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceProviderRegistrationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceProviderRegistrationArgs
    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 resourceProviderRegistrationResource = new Azure.Core.ResourceProviderRegistration("resourceProviderRegistrationResource", new()
    {
        Features = new[]
        {
            new Azure.Core.Inputs.ResourceProviderRegistrationFeatureArgs
            {
                Name = "string",
                Registered = false,
            },
        },
        Name = "string",
    });
    
    example, err := core.NewResourceProviderRegistration(ctx, "resourceProviderRegistrationResource", &core.ResourceProviderRegistrationArgs{
    	Features: core.ResourceProviderRegistrationFeatureArray{
    		&core.ResourceProviderRegistrationFeatureArgs{
    			Name:       pulumi.String("string"),
    			Registered: pulumi.Bool(false),
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var resourceProviderRegistrationResource = new ResourceProviderRegistration("resourceProviderRegistrationResource", ResourceProviderRegistrationArgs.builder()
        .features(ResourceProviderRegistrationFeatureArgs.builder()
            .name("string")
            .registered(false)
            .build())
        .name("string")
        .build());
    
    resource_provider_registration_resource = azure.core.ResourceProviderRegistration("resourceProviderRegistrationResource",
        features=[{
            "name": "string",
            "registered": False,
        }],
        name="string")
    
    const resourceProviderRegistrationResource = new azure.core.ResourceProviderRegistration("resourceProviderRegistrationResource", {
        features: [{
            name: "string",
            registered: false,
        }],
        name: "string",
    });
    
    type: azure:core:ResourceProviderRegistration
    properties:
        features:
            - name: string
              registered: false
        name: string
    

    ResourceProviderRegistration Resource Properties

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

    Inputs

    The ResourceProviderRegistration resource accepts the following input properties:

    Features List<ResourceProviderRegistrationFeature>
    Name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    Features []ResourceProviderRegistrationFeatureArgs
    Name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features List<ResourceProviderRegistrationFeature>
    name String
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features ResourceProviderRegistrationFeature[]
    name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features Sequence[ResourceProviderRegistrationFeatureArgs]
    name str
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features List<Property Map>
    name String
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResourceProviderRegistration 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 ResourceProviderRegistration Resource

    Get an existing ResourceProviderRegistration 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?: ResourceProviderRegistrationState, opts?: CustomResourceOptions): ResourceProviderRegistration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            features: Optional[Sequence[ResourceProviderRegistrationFeatureArgs]] = None,
            name: Optional[str] = None) -> ResourceProviderRegistration
    func GetResourceProviderRegistration(ctx *Context, name string, id IDInput, state *ResourceProviderRegistrationState, opts ...ResourceOption) (*ResourceProviderRegistration, error)
    public static ResourceProviderRegistration Get(string name, Input<string> id, ResourceProviderRegistrationState? state, CustomResourceOptions? opts = null)
    public static ResourceProviderRegistration get(String name, Output<String> id, ResourceProviderRegistrationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Features List<ResourceProviderRegistrationFeature>
    Name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    Features []ResourceProviderRegistrationFeatureArgs
    Name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features List<ResourceProviderRegistrationFeature>
    name String
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features ResourceProviderRegistrationFeature[]
    name string
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features Sequence[ResourceProviderRegistrationFeatureArgs]
    name str
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.
    features List<Property Map>
    name String
    The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created.

    Supporting Types

    ResourceProviderRegistrationFeature, ResourceProviderRegistrationFeatureArgs

    Name string
    Registered bool
    Should this feature be Registered or Unregistered?
    Name string
    Registered bool
    Should this feature be Registered or Unregistered?
    name String
    registered Boolean
    Should this feature be Registered or Unregistered?
    name string
    registered boolean
    Should this feature be Registered or Unregistered?
    name str
    registered bool
    Should this feature be Registered or Unregistered?
    name String
    registered Boolean
    Should this feature be Registered or Unregistered?

    Import

    Resource Provider Registrations can be imported using the resource id, e.g.

    $ pulumi import azure:core/resourceProviderRegistration:ResourceProviderRegistration example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v6.2.0 published on Friday, Sep 27, 2024 by Pulumi