github.com/myhau/pulumi/pkg/v3@v3.70.2-0.20221116134521-f2775972e587/codegen/testing/test/testdata/azure-native-pp/dotnet/azure-native.cs (about)

     1  using System.Collections.Generic;
     2  using Pulumi;
     3  using AzureNative = Pulumi.AzureNative;
     4  
     5  return await Deployment.RunAsync(() => 
     6  {
     7      var frontDoor = new AzureNative.Network.FrontDoor("frontDoor", new()
     8      {
     9          ResourceGroupName = "someGroupName",
    10          RoutingRules = new[]
    11          {
    12              new AzureNative.Network.Inputs.RoutingRuleArgs
    13              {
    14                  RouteConfiguration = new AzureNative.Network.Inputs.ForwardingConfigurationArgs
    15                  {
    16                      OdataType = "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration",
    17                      BackendPool = new AzureNative.Network.Inputs.SubResourceArgs
    18                      {
    19                          Id = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/frontDoors/frontDoor1/backendPools/backendPool1",
    20                      },
    21                  },
    22              },
    23          },
    24      });
    25  
    26      var endpoint = new AzureNative.Cdn.Endpoint("endpoint", new()
    27      {
    28          Origins = new[] {},
    29          DeliveryPolicy = new AzureNative.Cdn.Inputs.EndpointPropertiesUpdateParametersDeliveryPolicyArgs
    30          {
    31              Rules = new[]
    32              {
    33                  new AzureNative.Cdn.Inputs.DeliveryRuleArgs
    34                  {
    35                      Actions = 
    36                      {
    37                          new AzureNative.Cdn.Inputs.DeliveryRuleCacheExpirationActionArgs
    38                          {
    39                              Name = "CacheExpiration",
    40                              Parameters = new AzureNative.Cdn.Inputs.CacheExpirationActionParametersArgs
    41                              {
    42                                  CacheBehavior = "Override",
    43                                  CacheDuration = "10:10:09",
    44                                  CacheType = "All",
    45                                  OdataType = "#Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters",
    46                              },
    47                          },
    48                          new AzureNative.Cdn.Inputs.DeliveryRuleResponseHeaderActionArgs
    49                          {
    50                              Name = "ModifyResponseHeader",
    51                              Parameters = new AzureNative.Cdn.Inputs.HeaderActionParametersArgs
    52                              {
    53                                  HeaderAction = "Overwrite",
    54                                  HeaderName = "Access-Control-Allow-Origin",
    55                                  OdataType = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters",
    56                                  Value = "*",
    57                              },
    58                          },
    59                          new AzureNative.Cdn.Inputs.DeliveryRuleRequestHeaderActionArgs
    60                          {
    61                              Name = "ModifyRequestHeader",
    62                              Parameters = new AzureNative.Cdn.Inputs.HeaderActionParametersArgs
    63                              {
    64                                  HeaderAction = "Overwrite",
    65                                  HeaderName = "Accept-Encoding",
    66                                  OdataType = "#Microsoft.Azure.Cdn.Models.DeliveryRuleHeaderActionParameters",
    67                                  Value = "gzip",
    68                              },
    69                          },
    70                      },
    71                      Conditions = new[]
    72                      {
    73                          new AzureNative.Cdn.Inputs.DeliveryRuleRemoteAddressConditionArgs
    74                          {
    75                              Name = "RemoteAddress",
    76                              Parameters = new AzureNative.Cdn.Inputs.RemoteAddressMatchConditionParametersArgs
    77                              {
    78                                  MatchValues = new[]
    79                                  {
    80                                      "192.168.1.0/24",
    81                                      "10.0.0.0/24",
    82                                  },
    83                                  NegateCondition = true,
    84                                  OdataType = "#Microsoft.Azure.Cdn.Models.DeliveryRuleRemoteAddressConditionParameters",
    85                                  Operator = "IPMatch",
    86                              },
    87                          },
    88                      },
    89                      Name = "rule1",
    90                      Order = 1,
    91                  },
    92              },
    93          },
    94          EndpointName = "endpoint1",
    95          IsCompressionEnabled = true,
    96          IsHttpAllowed = true,
    97          IsHttpsAllowed = true,
    98          Location = "WestUs",
    99          ProfileName = "profileName",
   100          ResourceGroupName = "resourceGroupName",
   101      });
   102  
   103  });
   104