Example #1
0
 public MyStack()
 {
     var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
     {
     });
     var sms = new Aws.Pinpoint.SmsChannel("sms", new Aws.Pinpoint.SmsChannelArgs
     {
         ApplicationId = app.ApplicationId,
     });
 }
Example #2
0
 public MyStack()
 {
     var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
     {
     });
     var gcm = new Aws.Pinpoint.GcmChannel("gcm", new Aws.Pinpoint.GcmChannelArgs
     {
         ApiKey = "api_key",
         ApplicationId = app.ApplicationId,
     });
 }
Example #3
0
    public MyStack()
    {
        var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
        {
        });
        var identity = new Aws.Ses.DomainIdentity("identity", new Aws.Ses.DomainIdentityArgs
        {
            Domain = "example.com",
        });
        var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""pinpoint.amazonaws.com""
      },
      ""Effect"": ""Allow"",
      ""Sid"": """"
    }
  ]
}

",
        });
        var email = new Aws.Pinpoint.EmailChannel("email", new Aws.Pinpoint.EmailChannelArgs
        {
            ApplicationId = app.ApplicationId,
            FromAddress   = "*****@*****.**",
            Identity      = identity.Arn,
            RoleArn       = role.Arn,
        });
        var rolePolicy = new Aws.Iam.RolePolicy("rolePolicy", new Aws.Iam.RolePolicyArgs
        {
            Policy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": {
    ""Action"": [
      ""mobileanalytics:PutEvents"",
      ""mobileanalytics:PutItems""
    ],
    ""Effect"": ""Allow"",
    ""Resource"": [
      ""*""
    ]
  }
}

",
            Role   = role.Id,
        });
    }
Example #4
0
    public MyStack()
    {
        var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
        {
        });
        var testStream = new Aws.Kinesis.Stream("testStream", new Aws.Kinesis.StreamArgs
        {
            ShardCount = 1,
        });
        var testRole = new Aws.Iam.Role("testRole", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""pinpoint.us-east-1.amazonaws.com""
      },
      ""Effect"": ""Allow"",
      ""Sid"": """"
    }
  ]
}

",
        });
        var stream = new Aws.Pinpoint.EventStream("stream", new Aws.Pinpoint.EventStreamArgs
        {
            ApplicationId        = app.ApplicationId,
            DestinationStreamArn = testStream.Arn,
            RoleArn = testRole.Arn,
        });
        var testRolePolicy = new Aws.Iam.RolePolicy("testRolePolicy", new Aws.Iam.RolePolicyArgs
        {
            Policy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": {
    ""Action"": [
      ""kinesis:PutRecords"",
      ""kinesis:DescribeStream""
    ],
    ""Effect"": ""Allow"",
    ""Resource"": [
      ""arn:aws:kinesis:us-east-1:*:*/*""
    ]
  }
}

",
            Role   = testRole.Id,
        });
    }
Example #5
0
 public MyStack()
 {
     var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
     {
     });
     var channel = new Aws.Pinpoint.BaiduChannel("channel", new Aws.Pinpoint.BaiduChannelArgs
     {
         ApiKey        = "",
         ApplicationId = app.ApplicationId,
         SecretKey     = "",
     });
 }
Example #6
0
 public MyStack()
 {
     var app = new Aws.Pinpoint.App("app", new Aws.Pinpoint.AppArgs
     {
     });
     var channel = new Aws.Pinpoint.AdmChannel("channel", new Aws.Pinpoint.AdmChannelArgs
     {
         ApplicationId = app.ApplicationId,
         ClientId      = "",
         ClientSecret  = "",
         Enabled       = true,
     });
 }
Example #7
0
 public MyStack()
 {
     var example = new Aws.Pinpoint.App("example", new Aws.Pinpoint.AppArgs
     {
         Limits = new Aws.Pinpoint.Inputs.AppLimitsArgs
         {
             MaximumDuration = 600,
         },
         QuietTime = new Aws.Pinpoint.Inputs.AppQuietTimeArgs
         {
             End   = "06:00",
             Start = "00:00",
         },
     });
 }
Example #8
0
    public MyStack()
    {
        var current      = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
        var testUserPool = new Aws.Cognito.UserPool("testUserPool", new Aws.Cognito.UserPoolArgs
        {
        });
        var testApp = new Aws.Pinpoint.App("testApp", new Aws.Pinpoint.AppArgs
        {
        });
        var testRole = new Aws.Iam.Role("testRole", new Aws.Iam.RoleArgs
        {
            AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""cognito-idp.amazonaws.com""
      },
      ""Effect"": ""Allow"",
      ""Sid"": """"
    }
  ]
}

",
        });
        var testRolePolicy = new Aws.Iam.RolePolicy("testRolePolicy", new Aws.Iam.RolePolicyArgs
        {
            Policy = Output.Tuple(current, testApp.ApplicationId).Apply(values =>
            {
                var current       = values.Item1;
                var applicationId = values.Item2;
                return(@$ "{{
  " "Version" ": " "2012-10-17" ",
  " "Statement" ": [