github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/iam/getPolicyDocument.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 iam 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Generates an IAM policy document in JSON format for use with resources that expect policy documents such as `iam.Policy`. 15 // 16 // Using this data source to generate policy documents is *optional*. It is also valid to use literal JSON strings in your configuration or to use the `file` interpolation function to read a raw JSON policy document from a file. 17 // 18 // ## Example Usage 19 // 20 // ### Basic Example 21 // 22 // <!--Start PulumiCodeChooser --> 23 // ```go 24 // package main 25 // 26 // import ( 27 // 28 // "fmt" 29 // 30 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 31 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 32 // 33 // ) 34 // 35 // func main() { 36 // pulumi.Run(func(ctx *pulumi.Context) error { 37 // example, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 38 // Statements: pulumi.Array{ 39 // iam.GetPolicyDocumentStatement{ 40 // Sid: pulumi.StringRef("1"), 41 // Actions: []string{ 42 // "s3:ListAllMyBuckets", 43 // "s3:GetBucketLocation", 44 // }, 45 // Resources: []string{ 46 // "arn:aws:s3:::*", 47 // }, 48 // }, 49 // iam.GetPolicyDocumentStatement{ 50 // Actions: []string{ 51 // "s3:ListBucket", 52 // }, 53 // Resources: []string{ 54 // fmt.Sprintf("arn:aws:s3:::%v", s3BucketName), 55 // }, 56 // Conditions: []iam.GetPolicyDocumentStatementCondition{ 57 // { 58 // Test: "StringLike", 59 // Variable: "s3:prefix", 60 // Values: []string{ 61 // "", 62 // "home/", 63 // "home/&{aws:username}/", 64 // }, 65 // }, 66 // }, 67 // }, 68 // iam.GetPolicyDocumentStatement{ 69 // Actions: []string{ 70 // "s3:*", 71 // }, 72 // Resources: []string{ 73 // fmt.Sprintf("arn:aws:s3:::%v/home/&{aws:username}", s3BucketName), 74 // fmt.Sprintf("arn:aws:s3:::%v/home/&{aws:username}/*", s3BucketName), 75 // }, 76 // }, 77 // }, 78 // }, nil) 79 // if err != nil { 80 // return err 81 // } 82 // _, err = iam.NewPolicy(ctx, "example", &iam.PolicyArgs{ 83 // Name: pulumi.String("example_policy"), 84 // Path: pulumi.String("/"), 85 // Policy: pulumi.String(example.Json), 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // return nil 91 // }) 92 // } 93 // 94 // ``` 95 // <!--End PulumiCodeChooser --> 96 // 97 // ### Example Multiple Condition Keys and Values 98 // 99 // You can specify a [condition with multiple keys and values](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_multi-value-conditions.html) by supplying multiple `condition` blocks with the same `test` value, but differing `variable` and `values` values. 100 // 101 // <!--Start PulumiCodeChooser --> 102 // ```go 103 // package main 104 // 105 // import ( 106 // 107 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 108 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 109 // 110 // ) 111 // 112 // func main() { 113 // pulumi.Run(func(ctx *pulumi.Context) error { 114 // _, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 115 // Statements: []iam.GetPolicyDocumentStatement{ 116 // { 117 // Actions: []string{ 118 // "kms:Decrypt", 119 // "kms:GenerateDataKey", 120 // }, 121 // Resources: []string{ 122 // "*", 123 // }, 124 // Conditions: []iam.GetPolicyDocumentStatementCondition{ 125 // { 126 // Test: "ForAnyValue:StringEquals", 127 // Variable: "kms:EncryptionContext:service", 128 // Values: []string{ 129 // "pi", 130 // }, 131 // }, 132 // { 133 // Test: "ForAnyValue:StringEquals", 134 // Variable: "kms:EncryptionContext:aws:pi:service", 135 // Values: []string{ 136 // "rds", 137 // }, 138 // }, 139 // { 140 // Test: "ForAnyValue:StringEquals", 141 // Variable: "kms:EncryptionContext:aws:rds:db-id", 142 // Values: []string{ 143 // "db-AAAAABBBBBCCCCCDDDDDEEEEE", 144 // "db-EEEEEDDDDDCCCCCBBBBBAAAAA", 145 // }, 146 // }, 147 // }, 148 // }, 149 // }, 150 // }, nil) 151 // if err != nil { 152 // return err 153 // } 154 // return nil 155 // }) 156 // } 157 // 158 // ``` 159 // <!--End PulumiCodeChooser --> 160 // 161 // `data.aws_iam_policy_document.example_multiple_condition_keys_and_values.json` will evaluate to: 162 // 163 // ### Example Assume-Role Policy with Multiple Principals 164 // 165 // You can specify multiple principal blocks with different types. You can also use this data source to generate an assume-role policy. 166 // 167 // <!--Start PulumiCodeChooser --> 168 // ```go 169 // package main 170 // 171 // import ( 172 // 173 // "fmt" 174 // 175 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 176 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 177 // 178 // ) 179 // func main() { 180 // pulumi.Run(func(ctx *pulumi.Context) error { 181 // _, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 182 // Statements: []iam.GetPolicyDocumentStatement{ 183 // { 184 // Actions: []string{ 185 // "sts:AssumeRole", 186 // }, 187 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 188 // { 189 // Type: "Service", 190 // Identifiers: []string{ 191 // "firehose.amazonaws.com", 192 // }, 193 // }, 194 // { 195 // Type: "AWS", 196 // Identifiers: interface{}{ 197 // trustedRoleArn, 198 // }, 199 // }, 200 // { 201 // Type: "Federated", 202 // Identifiers: []string{ 203 // fmt.Sprintf("arn:aws:iam::%v:saml-provider/%v", accountId, providerName), 204 // "cognito-identity.amazonaws.com", 205 // }, 206 // }, 207 // }, 208 // }, 209 // }, 210 // }, nil); 211 // if err != nil { 212 // return err 213 // } 214 // return nil 215 // }) 216 // } 217 // ``` 218 // <!--End PulumiCodeChooser --> 219 // 220 // ### Example Using A Source Document 221 // 222 // <!--Start PulumiCodeChooser --> 223 // ```go 224 // package main 225 // 226 // import ( 227 // 228 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 229 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 230 // 231 // ) 232 // func main() { 233 // pulumi.Run(func(ctx *pulumi.Context) error { 234 // source, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 235 // Statements: []iam.GetPolicyDocumentStatement{ 236 // { 237 // Actions: []string{ 238 // "ec2:*", 239 // }, 240 // Resources: []string{ 241 // "*", 242 // }, 243 // }, 244 // { 245 // Sid: pulumi.StringRef("SidToOverride"), 246 // Actions: []string{ 247 // "s3:*", 248 // }, 249 // Resources: []string{ 250 // "*", 251 // }, 252 // }, 253 // }, 254 // }, nil); 255 // if err != nil { 256 // return err 257 // } 258 // _, err = iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 259 // SourcePolicyDocuments: interface{}{ 260 // source.Json, 261 // }, 262 // Statements: []iam.GetPolicyDocumentStatement{ 263 // { 264 // Sid: pulumi.StringRef("SidToOverride"), 265 // Actions: []string{ 266 // "s3:*", 267 // }, 268 // Resources: []string{ 269 // "arn:aws:s3:::somebucket", 270 // "arn:aws:s3:::somebucket/*", 271 // }, 272 // }, 273 // }, 274 // }, nil); 275 // if err != nil { 276 // return err 277 // } 278 // return nil 279 // }) 280 // } 281 // ``` 282 // <!--End PulumiCodeChooser --> 283 // 284 // `data.aws_iam_policy_document.source_document_example.json` will evaluate to: 285 // 286 // ### Example Using An Override Document 287 // 288 // <!--Start PulumiCodeChooser --> 289 // ```go 290 // package main 291 // 292 // import ( 293 // 294 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 295 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 296 // 297 // ) 298 // func main() { 299 // pulumi.Run(func(ctx *pulumi.Context) error { 300 // override, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 301 // Statements: []iam.GetPolicyDocumentStatement{ 302 // { 303 // Sid: pulumi.StringRef("SidToOverride"), 304 // Actions: []string{ 305 // "s3:*", 306 // }, 307 // Resources: []string{ 308 // "*", 309 // }, 310 // }, 311 // }, 312 // }, nil); 313 // if err != nil { 314 // return err 315 // } 316 // _, err = iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 317 // OverridePolicyDocuments: interface{}{ 318 // override.Json, 319 // }, 320 // Statements: []iam.GetPolicyDocumentStatement{ 321 // { 322 // Actions: []string{ 323 // "ec2:*", 324 // }, 325 // Resources: []string{ 326 // "*", 327 // }, 328 // }, 329 // { 330 // Sid: pulumi.StringRef("SidToOverride"), 331 // Actions: []string{ 332 // "s3:*", 333 // }, 334 // Resources: []string{ 335 // "arn:aws:s3:::somebucket", 336 // "arn:aws:s3:::somebucket/*", 337 // }, 338 // }, 339 // }, 340 // }, nil); 341 // if err != nil { 342 // return err 343 // } 344 // return nil 345 // }) 346 // } 347 // ``` 348 // <!--End PulumiCodeChooser --> 349 // 350 // `data.aws_iam_policy_document.override_policy_document_example.json` will evaluate to: 351 // 352 // ### Example with Both Source and Override Documents 353 // 354 // You can also combine `sourcePolicyDocuments` and `overridePolicyDocuments` in the same document. 355 // 356 // <!--Start PulumiCodeChooser --> 357 // ```go 358 // package main 359 // 360 // import ( 361 // 362 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 363 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 364 // 365 // ) 366 // func main() { 367 // pulumi.Run(func(ctx *pulumi.Context) error { 368 // source, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 369 // Statements: []iam.GetPolicyDocumentStatement{ 370 // { 371 // Sid: pulumi.StringRef("OverridePlaceholder"), 372 // Actions: []string{ 373 // "ec2:DescribeAccountAttributes", 374 // }, 375 // Resources: []string{ 376 // "*", 377 // }, 378 // }, 379 // }, 380 // }, nil); 381 // if err != nil { 382 // return err 383 // } 384 // override, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 385 // Statements: []iam.GetPolicyDocumentStatement{ 386 // { 387 // Sid: pulumi.StringRef("OverridePlaceholder"), 388 // Actions: []string{ 389 // "s3:GetObject", 390 // }, 391 // Resources: []string{ 392 // "*", 393 // }, 394 // }, 395 // }, 396 // }, nil); 397 // if err != nil { 398 // return err 399 // } 400 // _, err = iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 401 // SourcePolicyDocuments: interface{}{ 402 // source.Json, 403 // }, 404 // OverridePolicyDocuments: interface{}{ 405 // override.Json, 406 // }, 407 // }, nil); 408 // if err != nil { 409 // return err 410 // } 411 // return nil 412 // }) 413 // } 414 // ``` 415 // <!--End PulumiCodeChooser --> 416 // 417 // `data.aws_iam_policy_document.politik.json` will evaluate to: 418 // 419 // ### Example of Merging Source Documents 420 // 421 // Multiple documents can be combined using the `sourcePolicyDocuments` or `overridePolicyDocuments` attributes. `sourcePolicyDocuments` requires that all documents have unique Sids, while `overridePolicyDocuments` will iteratively override matching Sids. 422 // 423 // <!--Start PulumiCodeChooser --> 424 // ```go 425 // package main 426 // 427 // import ( 428 // 429 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 430 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 431 // 432 // ) 433 // func main() { 434 // pulumi.Run(func(ctx *pulumi.Context) error { 435 // sourceOne, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 436 // Statements: []iam.GetPolicyDocumentStatement{ 437 // { 438 // Actions: []string{ 439 // "ec2:*", 440 // }, 441 // Resources: []string{ 442 // "*", 443 // }, 444 // }, 445 // { 446 // Sid: pulumi.StringRef("UniqueSidOne"), 447 // Actions: []string{ 448 // "s3:*", 449 // }, 450 // Resources: []string{ 451 // "*", 452 // }, 453 // }, 454 // }, 455 // }, nil); 456 // if err != nil { 457 // return err 458 // } 459 // sourceTwo, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 460 // Statements: pulumi.Array{ 461 // iam.GetPolicyDocumentStatement{ 462 // Sid: pulumi.StringRef("UniqueSidTwo"), 463 // Actions: []string{ 464 // "iam:*", 465 // }, 466 // Resources: []string{ 467 // "*", 468 // }, 469 // }, 470 // iam.GetPolicyDocumentStatement{ 471 // Actions: []string{ 472 // "lambda:*", 473 // }, 474 // Resources: []string{ 475 // "*", 476 // }, 477 // }, 478 // }, 479 // }, nil); 480 // if err != nil { 481 // return err 482 // } 483 // _, err = iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 484 // SourcePolicyDocuments: interface{}{ 485 // sourceOne.Json, 486 // sourceTwo.Json, 487 // }, 488 // }, nil); 489 // if err != nil { 490 // return err 491 // } 492 // return nil 493 // }) 494 // } 495 // ``` 496 // <!--End PulumiCodeChooser --> 497 // 498 // `data.aws_iam_policy_document.combined.json` will evaluate to: 499 // 500 // ### Example of Merging Override Documents 501 // 502 // <!--Start PulumiCodeChooser --> 503 // ```go 504 // package main 505 // 506 // import ( 507 // 508 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 509 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 510 // 511 // ) 512 // func main() { 513 // pulumi.Run(func(ctx *pulumi.Context) error { 514 // policyOne, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 515 // Statements: []iam.GetPolicyDocumentStatement{ 516 // { 517 // Sid: pulumi.StringRef("OverridePlaceHolderOne"), 518 // Effect: pulumi.StringRef("Allow"), 519 // Actions: []string{ 520 // "s3:*", 521 // }, 522 // Resources: []string{ 523 // "*", 524 // }, 525 // }, 526 // }, 527 // }, nil); 528 // if err != nil { 529 // return err 530 // } 531 // policyTwo, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 532 // Statements: []iam.GetPolicyDocumentStatement{ 533 // { 534 // Effect: pulumi.StringRef("Allow"), 535 // Actions: []string{ 536 // "ec2:*", 537 // }, 538 // Resources: []string{ 539 // "*", 540 // }, 541 // }, 542 // { 543 // Sid: pulumi.StringRef("OverridePlaceHolderTwo"), 544 // Effect: pulumi.StringRef("Allow"), 545 // Actions: []string{ 546 // "iam:*", 547 // }, 548 // Resources: []string{ 549 // "*", 550 // }, 551 // }, 552 // }, 553 // }, nil); 554 // if err != nil { 555 // return err 556 // } 557 // policyThree, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 558 // Statements: []iam.GetPolicyDocumentStatement{ 559 // { 560 // Sid: pulumi.StringRef("OverridePlaceHolderOne"), 561 // Effect: pulumi.StringRef("Deny"), 562 // Actions: []string{ 563 // "logs:*", 564 // }, 565 // Resources: []string{ 566 // "*", 567 // }, 568 // }, 569 // }, 570 // }, nil); 571 // if err != nil { 572 // return err 573 // } 574 // _, err = iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 575 // OverridePolicyDocuments: interface{}{ 576 // policyOne.Json, 577 // policyTwo.Json, 578 // policyThree.Json, 579 // }, 580 // Statements: []iam.GetPolicyDocumentStatement{ 581 // { 582 // Sid: pulumi.StringRef("OverridePlaceHolderTwo"), 583 // Effect: pulumi.StringRef("Deny"), 584 // Actions: []string{ 585 // "*", 586 // }, 587 // Resources: []string{ 588 // "*", 589 // }, 590 // }, 591 // }, 592 // }, nil); 593 // if err != nil { 594 // return err 595 // } 596 // return nil 597 // }) 598 // } 599 // ``` 600 // <!--End PulumiCodeChooser --> 601 // 602 // `data.aws_iam_policy_document.combined.json` will evaluate to: 603 func GetPolicyDocument(ctx *pulumi.Context, args *GetPolicyDocumentArgs, opts ...pulumi.InvokeOption) (*GetPolicyDocumentResult, error) { 604 opts = internal.PkgInvokeDefaultOpts(opts) 605 var rv GetPolicyDocumentResult 606 err := ctx.Invoke("aws:iam/getPolicyDocument:getPolicyDocument", args, &rv, opts...) 607 if err != nil { 608 return nil, err 609 } 610 return &rv, nil 611 } 612 613 // A collection of arguments for invoking getPolicyDocument. 614 type GetPolicyDocumentArgs struct { 615 // Deprecated: Not used 616 OverrideJson *string `pulumi:"overrideJson"` 617 // List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from `sourcePolicyDocuments`. Non-overriding statements will be added to the exported document. 618 OverridePolicyDocuments []string `pulumi:"overridePolicyDocuments"` 619 // ID for the policy document. 620 PolicyId *string `pulumi:"policyId"` 621 // Deprecated: Not used 622 SourceJson *string `pulumi:"sourceJson"` 623 // List of IAM policy documents that are merged together into the exported document. Statements defined in `sourcePolicyDocuments` must have unique `sid`s. Statements with the same `sid` from `overridePolicyDocuments` will override source statements. 624 SourcePolicyDocuments []string `pulumi:"sourcePolicyDocuments"` 625 // Configuration block for a policy statement. Detailed below. 626 Statements []GetPolicyDocumentStatement `pulumi:"statements"` 627 // IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html). 628 Version *string `pulumi:"version"` 629 } 630 631 // A collection of values returned by getPolicyDocument. 632 type GetPolicyDocumentResult struct { 633 // The provider-assigned unique ID for this managed resource. 634 Id string `pulumi:"id"` 635 // Standard JSON policy document rendered based on the arguments above. 636 Json string `pulumi:"json"` 637 // Deprecated: Not used 638 OverrideJson *string `pulumi:"overrideJson"` 639 OverridePolicyDocuments []string `pulumi:"overridePolicyDocuments"` 640 PolicyId *string `pulumi:"policyId"` 641 // Deprecated: Not used 642 SourceJson *string `pulumi:"sourceJson"` 643 SourcePolicyDocuments []string `pulumi:"sourcePolicyDocuments"` 644 Statements []GetPolicyDocumentStatement `pulumi:"statements"` 645 Version *string `pulumi:"version"` 646 } 647 648 func GetPolicyDocumentOutput(ctx *pulumi.Context, args GetPolicyDocumentOutputArgs, opts ...pulumi.InvokeOption) GetPolicyDocumentResultOutput { 649 return pulumi.ToOutputWithContext(context.Background(), args). 650 ApplyT(func(v interface{}) (GetPolicyDocumentResult, error) { 651 args := v.(GetPolicyDocumentArgs) 652 r, err := GetPolicyDocument(ctx, &args, opts...) 653 var s GetPolicyDocumentResult 654 if r != nil { 655 s = *r 656 } 657 return s, err 658 }).(GetPolicyDocumentResultOutput) 659 } 660 661 // A collection of arguments for invoking getPolicyDocument. 662 type GetPolicyDocumentOutputArgs struct { 663 // Deprecated: Not used 664 OverrideJson pulumi.StringPtrInput `pulumi:"overrideJson"` 665 // List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid` from earlier documents in the list. Statements with non-blank `sid`s will also override statements with the same `sid` from `sourcePolicyDocuments`. Non-overriding statements will be added to the exported document. 666 OverridePolicyDocuments pulumi.StringArrayInput `pulumi:"overridePolicyDocuments"` 667 // ID for the policy document. 668 PolicyId pulumi.StringPtrInput `pulumi:"policyId"` 669 // Deprecated: Not used 670 SourceJson pulumi.StringPtrInput `pulumi:"sourceJson"` 671 // List of IAM policy documents that are merged together into the exported document. Statements defined in `sourcePolicyDocuments` must have unique `sid`s. Statements with the same `sid` from `overridePolicyDocuments` will override source statements. 672 SourcePolicyDocuments pulumi.StringArrayInput `pulumi:"sourcePolicyDocuments"` 673 // Configuration block for a policy statement. Detailed below. 674 Statements GetPolicyDocumentStatementArrayInput `pulumi:"statements"` 675 // IAM policy document version. Valid values are `2008-10-17` and `2012-10-17`. Defaults to `2012-10-17`. For more information, see the [AWS IAM User Guide](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_version.html). 676 Version pulumi.StringPtrInput `pulumi:"version"` 677 } 678 679 func (GetPolicyDocumentOutputArgs) ElementType() reflect.Type { 680 return reflect.TypeOf((*GetPolicyDocumentArgs)(nil)).Elem() 681 } 682 683 // A collection of values returned by getPolicyDocument. 684 type GetPolicyDocumentResultOutput struct{ *pulumi.OutputState } 685 686 func (GetPolicyDocumentResultOutput) ElementType() reflect.Type { 687 return reflect.TypeOf((*GetPolicyDocumentResult)(nil)).Elem() 688 } 689 690 func (o GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutput() GetPolicyDocumentResultOutput { 691 return o 692 } 693 694 func (o GetPolicyDocumentResultOutput) ToGetPolicyDocumentResultOutputWithContext(ctx context.Context) GetPolicyDocumentResultOutput { 695 return o 696 } 697 698 // The provider-assigned unique ID for this managed resource. 699 func (o GetPolicyDocumentResultOutput) Id() pulumi.StringOutput { 700 return o.ApplyT(func(v GetPolicyDocumentResult) string { return v.Id }).(pulumi.StringOutput) 701 } 702 703 // Standard JSON policy document rendered based on the arguments above. 704 func (o GetPolicyDocumentResultOutput) Json() pulumi.StringOutput { 705 return o.ApplyT(func(v GetPolicyDocumentResult) string { return v.Json }).(pulumi.StringOutput) 706 } 707 708 // Deprecated: Not used 709 func (o GetPolicyDocumentResultOutput) OverrideJson() pulumi.StringPtrOutput { 710 return o.ApplyT(func(v GetPolicyDocumentResult) *string { return v.OverrideJson }).(pulumi.StringPtrOutput) 711 } 712 713 func (o GetPolicyDocumentResultOutput) OverridePolicyDocuments() pulumi.StringArrayOutput { 714 return o.ApplyT(func(v GetPolicyDocumentResult) []string { return v.OverridePolicyDocuments }).(pulumi.StringArrayOutput) 715 } 716 717 func (o GetPolicyDocumentResultOutput) PolicyId() pulumi.StringPtrOutput { 718 return o.ApplyT(func(v GetPolicyDocumentResult) *string { return v.PolicyId }).(pulumi.StringPtrOutput) 719 } 720 721 // Deprecated: Not used 722 func (o GetPolicyDocumentResultOutput) SourceJson() pulumi.StringPtrOutput { 723 return o.ApplyT(func(v GetPolicyDocumentResult) *string { return v.SourceJson }).(pulumi.StringPtrOutput) 724 } 725 726 func (o GetPolicyDocumentResultOutput) SourcePolicyDocuments() pulumi.StringArrayOutput { 727 return o.ApplyT(func(v GetPolicyDocumentResult) []string { return v.SourcePolicyDocuments }).(pulumi.StringArrayOutput) 728 } 729 730 func (o GetPolicyDocumentResultOutput) Statements() GetPolicyDocumentStatementArrayOutput { 731 return o.ApplyT(func(v GetPolicyDocumentResult) []GetPolicyDocumentStatement { return v.Statements }).(GetPolicyDocumentStatementArrayOutput) 732 } 733 734 func (o GetPolicyDocumentResultOutput) Version() pulumi.StringPtrOutput { 735 return o.ApplyT(func(v GetPolicyDocumentResult) *string { return v.Version }).(pulumi.StringPtrOutput) 736 } 737 738 func init() { 739 pulumi.RegisterOutputType(GetPolicyDocumentResultOutput{}) 740 }