github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ssoadmin/applicationAccessScope.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ssoadmin 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Resource for managing an AWS SSO Admin Application Access Scope. 16 // 17 // ## Example Usage 18 // 19 // ## Import 20 // 21 // Using `pulumi import`, import SSO Admin Application Access Scope using the `id`. For example: 22 // 23 // ```sh 24 // $ pulumi import aws:ssoadmin/applicationAccessScope:ApplicationAccessScope example arn:aws:sso::012345678901:application/ssoins-012345678901/apl-012345678901,sso:account:access 25 // ``` 26 type ApplicationAccessScope struct { 27 pulumi.CustomResourceState 28 29 // Specifies the ARN of the application with the access scope with the targets to add or update. 30 ApplicationArn pulumi.StringOutput `pulumi:"applicationArn"` 31 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 32 AuthorizedTargets pulumi.StringArrayOutput `pulumi:"authorizedTargets"` 33 // Specifies the name of the access scope to be associated with the specified targets. 34 // 35 // The following arguments are optional: 36 Scope pulumi.StringOutput `pulumi:"scope"` 37 } 38 39 // NewApplicationAccessScope registers a new resource with the given unique name, arguments, and options. 40 func NewApplicationAccessScope(ctx *pulumi.Context, 41 name string, args *ApplicationAccessScopeArgs, opts ...pulumi.ResourceOption) (*ApplicationAccessScope, error) { 42 if args == nil { 43 return nil, errors.New("missing one or more required arguments") 44 } 45 46 if args.ApplicationArn == nil { 47 return nil, errors.New("invalid value for required argument 'ApplicationArn'") 48 } 49 if args.Scope == nil { 50 return nil, errors.New("invalid value for required argument 'Scope'") 51 } 52 opts = internal.PkgResourceDefaultOpts(opts) 53 var resource ApplicationAccessScope 54 err := ctx.RegisterResource("aws:ssoadmin/applicationAccessScope:ApplicationAccessScope", name, args, &resource, opts...) 55 if err != nil { 56 return nil, err 57 } 58 return &resource, nil 59 } 60 61 // GetApplicationAccessScope gets an existing ApplicationAccessScope resource's state with the given name, ID, and optional 62 // state properties that are used to uniquely qualify the lookup (nil if not required). 63 func GetApplicationAccessScope(ctx *pulumi.Context, 64 name string, id pulumi.IDInput, state *ApplicationAccessScopeState, opts ...pulumi.ResourceOption) (*ApplicationAccessScope, error) { 65 var resource ApplicationAccessScope 66 err := ctx.ReadResource("aws:ssoadmin/applicationAccessScope:ApplicationAccessScope", name, id, state, &resource, opts...) 67 if err != nil { 68 return nil, err 69 } 70 return &resource, nil 71 } 72 73 // Input properties used for looking up and filtering ApplicationAccessScope resources. 74 type applicationAccessScopeState struct { 75 // Specifies the ARN of the application with the access scope with the targets to add or update. 76 ApplicationArn *string `pulumi:"applicationArn"` 77 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 78 AuthorizedTargets []string `pulumi:"authorizedTargets"` 79 // Specifies the name of the access scope to be associated with the specified targets. 80 // 81 // The following arguments are optional: 82 Scope *string `pulumi:"scope"` 83 } 84 85 type ApplicationAccessScopeState struct { 86 // Specifies the ARN of the application with the access scope with the targets to add or update. 87 ApplicationArn pulumi.StringPtrInput 88 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 89 AuthorizedTargets pulumi.StringArrayInput 90 // Specifies the name of the access scope to be associated with the specified targets. 91 // 92 // The following arguments are optional: 93 Scope pulumi.StringPtrInput 94 } 95 96 func (ApplicationAccessScopeState) ElementType() reflect.Type { 97 return reflect.TypeOf((*applicationAccessScopeState)(nil)).Elem() 98 } 99 100 type applicationAccessScopeArgs struct { 101 // Specifies the ARN of the application with the access scope with the targets to add or update. 102 ApplicationArn string `pulumi:"applicationArn"` 103 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 104 AuthorizedTargets []string `pulumi:"authorizedTargets"` 105 // Specifies the name of the access scope to be associated with the specified targets. 106 // 107 // The following arguments are optional: 108 Scope string `pulumi:"scope"` 109 } 110 111 // The set of arguments for constructing a ApplicationAccessScope resource. 112 type ApplicationAccessScopeArgs struct { 113 // Specifies the ARN of the application with the access scope with the targets to add or update. 114 ApplicationArn pulumi.StringInput 115 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 116 AuthorizedTargets pulumi.StringArrayInput 117 // Specifies the name of the access scope to be associated with the specified targets. 118 // 119 // The following arguments are optional: 120 Scope pulumi.StringInput 121 } 122 123 func (ApplicationAccessScopeArgs) ElementType() reflect.Type { 124 return reflect.TypeOf((*applicationAccessScopeArgs)(nil)).Elem() 125 } 126 127 type ApplicationAccessScopeInput interface { 128 pulumi.Input 129 130 ToApplicationAccessScopeOutput() ApplicationAccessScopeOutput 131 ToApplicationAccessScopeOutputWithContext(ctx context.Context) ApplicationAccessScopeOutput 132 } 133 134 func (*ApplicationAccessScope) ElementType() reflect.Type { 135 return reflect.TypeOf((**ApplicationAccessScope)(nil)).Elem() 136 } 137 138 func (i *ApplicationAccessScope) ToApplicationAccessScopeOutput() ApplicationAccessScopeOutput { 139 return i.ToApplicationAccessScopeOutputWithContext(context.Background()) 140 } 141 142 func (i *ApplicationAccessScope) ToApplicationAccessScopeOutputWithContext(ctx context.Context) ApplicationAccessScopeOutput { 143 return pulumi.ToOutputWithContext(ctx, i).(ApplicationAccessScopeOutput) 144 } 145 146 // ApplicationAccessScopeArrayInput is an input type that accepts ApplicationAccessScopeArray and ApplicationAccessScopeArrayOutput values. 147 // You can construct a concrete instance of `ApplicationAccessScopeArrayInput` via: 148 // 149 // ApplicationAccessScopeArray{ ApplicationAccessScopeArgs{...} } 150 type ApplicationAccessScopeArrayInput interface { 151 pulumi.Input 152 153 ToApplicationAccessScopeArrayOutput() ApplicationAccessScopeArrayOutput 154 ToApplicationAccessScopeArrayOutputWithContext(context.Context) ApplicationAccessScopeArrayOutput 155 } 156 157 type ApplicationAccessScopeArray []ApplicationAccessScopeInput 158 159 func (ApplicationAccessScopeArray) ElementType() reflect.Type { 160 return reflect.TypeOf((*[]*ApplicationAccessScope)(nil)).Elem() 161 } 162 163 func (i ApplicationAccessScopeArray) ToApplicationAccessScopeArrayOutput() ApplicationAccessScopeArrayOutput { 164 return i.ToApplicationAccessScopeArrayOutputWithContext(context.Background()) 165 } 166 167 func (i ApplicationAccessScopeArray) ToApplicationAccessScopeArrayOutputWithContext(ctx context.Context) ApplicationAccessScopeArrayOutput { 168 return pulumi.ToOutputWithContext(ctx, i).(ApplicationAccessScopeArrayOutput) 169 } 170 171 // ApplicationAccessScopeMapInput is an input type that accepts ApplicationAccessScopeMap and ApplicationAccessScopeMapOutput values. 172 // You can construct a concrete instance of `ApplicationAccessScopeMapInput` via: 173 // 174 // ApplicationAccessScopeMap{ "key": ApplicationAccessScopeArgs{...} } 175 type ApplicationAccessScopeMapInput interface { 176 pulumi.Input 177 178 ToApplicationAccessScopeMapOutput() ApplicationAccessScopeMapOutput 179 ToApplicationAccessScopeMapOutputWithContext(context.Context) ApplicationAccessScopeMapOutput 180 } 181 182 type ApplicationAccessScopeMap map[string]ApplicationAccessScopeInput 183 184 func (ApplicationAccessScopeMap) ElementType() reflect.Type { 185 return reflect.TypeOf((*map[string]*ApplicationAccessScope)(nil)).Elem() 186 } 187 188 func (i ApplicationAccessScopeMap) ToApplicationAccessScopeMapOutput() ApplicationAccessScopeMapOutput { 189 return i.ToApplicationAccessScopeMapOutputWithContext(context.Background()) 190 } 191 192 func (i ApplicationAccessScopeMap) ToApplicationAccessScopeMapOutputWithContext(ctx context.Context) ApplicationAccessScopeMapOutput { 193 return pulumi.ToOutputWithContext(ctx, i).(ApplicationAccessScopeMapOutput) 194 } 195 196 type ApplicationAccessScopeOutput struct{ *pulumi.OutputState } 197 198 func (ApplicationAccessScopeOutput) ElementType() reflect.Type { 199 return reflect.TypeOf((**ApplicationAccessScope)(nil)).Elem() 200 } 201 202 func (o ApplicationAccessScopeOutput) ToApplicationAccessScopeOutput() ApplicationAccessScopeOutput { 203 return o 204 } 205 206 func (o ApplicationAccessScopeOutput) ToApplicationAccessScopeOutputWithContext(ctx context.Context) ApplicationAccessScopeOutput { 207 return o 208 } 209 210 // Specifies the ARN of the application with the access scope with the targets to add or update. 211 func (o ApplicationAccessScopeOutput) ApplicationArn() pulumi.StringOutput { 212 return o.ApplyT(func(v *ApplicationAccessScope) pulumi.StringOutput { return v.ApplicationArn }).(pulumi.StringOutput) 213 } 214 215 // Specifies an array list of ARNs that represent the authorized targets for this access scope. 216 func (o ApplicationAccessScopeOutput) AuthorizedTargets() pulumi.StringArrayOutput { 217 return o.ApplyT(func(v *ApplicationAccessScope) pulumi.StringArrayOutput { return v.AuthorizedTargets }).(pulumi.StringArrayOutput) 218 } 219 220 // Specifies the name of the access scope to be associated with the specified targets. 221 // 222 // The following arguments are optional: 223 func (o ApplicationAccessScopeOutput) Scope() pulumi.StringOutput { 224 return o.ApplyT(func(v *ApplicationAccessScope) pulumi.StringOutput { return v.Scope }).(pulumi.StringOutput) 225 } 226 227 type ApplicationAccessScopeArrayOutput struct{ *pulumi.OutputState } 228 229 func (ApplicationAccessScopeArrayOutput) ElementType() reflect.Type { 230 return reflect.TypeOf((*[]*ApplicationAccessScope)(nil)).Elem() 231 } 232 233 func (o ApplicationAccessScopeArrayOutput) ToApplicationAccessScopeArrayOutput() ApplicationAccessScopeArrayOutput { 234 return o 235 } 236 237 func (o ApplicationAccessScopeArrayOutput) ToApplicationAccessScopeArrayOutputWithContext(ctx context.Context) ApplicationAccessScopeArrayOutput { 238 return o 239 } 240 241 func (o ApplicationAccessScopeArrayOutput) Index(i pulumi.IntInput) ApplicationAccessScopeOutput { 242 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ApplicationAccessScope { 243 return vs[0].([]*ApplicationAccessScope)[vs[1].(int)] 244 }).(ApplicationAccessScopeOutput) 245 } 246 247 type ApplicationAccessScopeMapOutput struct{ *pulumi.OutputState } 248 249 func (ApplicationAccessScopeMapOutput) ElementType() reflect.Type { 250 return reflect.TypeOf((*map[string]*ApplicationAccessScope)(nil)).Elem() 251 } 252 253 func (o ApplicationAccessScopeMapOutput) ToApplicationAccessScopeMapOutput() ApplicationAccessScopeMapOutput { 254 return o 255 } 256 257 func (o ApplicationAccessScopeMapOutput) ToApplicationAccessScopeMapOutputWithContext(ctx context.Context) ApplicationAccessScopeMapOutput { 258 return o 259 } 260 261 func (o ApplicationAccessScopeMapOutput) MapIndex(k pulumi.StringInput) ApplicationAccessScopeOutput { 262 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ApplicationAccessScope { 263 return vs[0].(map[string]*ApplicationAccessScope)[vs[1].(string)] 264 }).(ApplicationAccessScopeOutput) 265 } 266 267 func init() { 268 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationAccessScopeInput)(nil)).Elem(), &ApplicationAccessScope{}) 269 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationAccessScopeArrayInput)(nil)).Elem(), ApplicationAccessScopeArray{}) 270 pulumi.RegisterInputType(reflect.TypeOf((*ApplicationAccessScopeMapInput)(nil)).Elem(), ApplicationAccessScopeMap{}) 271 pulumi.RegisterOutputType(ApplicationAccessScopeOutput{}) 272 pulumi.RegisterOutputType(ApplicationAccessScopeArrayOutput{}) 273 pulumi.RegisterOutputType(ApplicationAccessScopeMapOutput{}) 274 }