/
identityProviderFacebook.go
120 lines (107 loc) · 5.34 KB
/
identityProviderFacebook.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
// nolint: lll
package apimanagement
import (
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Manages an API Management Facebook Identity Provider.
//
// > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/api_management_identity_provider_facebook.html.markdown.
type IdentityProviderFacebook struct {
pulumi.CustomResourceState
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringOutput `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId pulumi.StringOutput `pulumi:"appId"`
// App Secret for Facebook.
AppSecret pulumi.StringOutput `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringOutput `pulumi:"resourceGroupName"`
}
// NewIdentityProviderFacebook registers a new resource with the given unique name, arguments, and options.
func NewIdentityProviderFacebook(ctx *pulumi.Context,
name string, args *IdentityProviderFacebookArgs, opts ...pulumi.ResourceOption) (*IdentityProviderFacebook, error) {
if args == nil || args.ApiManagementName == nil {
return nil, errors.New("missing required argument 'ApiManagementName'")
}
if args == nil || args.AppId == nil {
return nil, errors.New("missing required argument 'AppId'")
}
if args == nil || args.AppSecret == nil {
return nil, errors.New("missing required argument 'AppSecret'")
}
if args == nil || args.ResourceGroupName == nil {
return nil, errors.New("missing required argument 'ResourceGroupName'")
}
if args == nil {
args = &IdentityProviderFacebookArgs{}
}
var resource IdentityProviderFacebook
err := ctx.RegisterResource("azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIdentityProviderFacebook gets an existing IdentityProviderFacebook resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIdentityProviderFacebook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IdentityProviderFacebookState, opts ...pulumi.ResourceOption) (*IdentityProviderFacebook, error) {
var resource IdentityProviderFacebook
err := ctx.ReadResource("azure:apimanagement/identityProviderFacebook:IdentityProviderFacebook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IdentityProviderFacebook resources.
type identityProviderFacebookState struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName *string `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId *string `pulumi:"appId"`
// App Secret for Facebook.
AppSecret *string `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName *string `pulumi:"resourceGroupName"`
}
type IdentityProviderFacebookState struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringPtrInput
// App ID for Facebook.
AppId pulumi.StringPtrInput
// App Secret for Facebook.
AppSecret pulumi.StringPtrInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringPtrInput
}
func (IdentityProviderFacebookState) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderFacebookState)(nil)).Elem()
}
type identityProviderFacebookArgs struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName string `pulumi:"apiManagementName"`
// App ID for Facebook.
AppId string `pulumi:"appId"`
// App Secret for Facebook.
AppSecret string `pulumi:"appSecret"`
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The set of arguments for constructing a IdentityProviderFacebook resource.
type IdentityProviderFacebookArgs struct {
// The Name of the API Management Service where this Facebook Identity Provider should be created. Changing this forces a new resource to be created.
ApiManagementName pulumi.StringInput
// App ID for Facebook.
AppId pulumi.StringInput
// App Secret for Facebook.
AppSecret pulumi.StringInput
// The Name of the Resource Group where the API Management Service exists. Changing this forces a new resource to be created.
ResourceGroupName pulumi.StringInput
}
func (IdentityProviderFacebookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*identityProviderFacebookArgs)(nil)).Elem()
}