Class: AWSCDK::CodeBuild::CfnProject::ProjectTriggersProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CodeBuild::CfnProject::ProjectTriggersProperty
- Defined in:
- code_build/cfn_project.rb
Overview
ProjectTriggers is a property of the AWS CodeBuild Project resource that specifies webhooks that trigger an AWS CodeBuild build.
The Webhook feature isn't available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook.
Instance Attribute Summary collapse
-
#build_type ⇒ String?
readonly
Specifies the type of build this webhook will trigger.
-
#filter_groups ⇒ AWSCDK::IResolvable, ...
readonly
A list of lists of
WebhookFilterobjects used to determine which webhook events are triggered. - #pull_request_build_policy ⇒ AWSCDK::IResolvable, ... readonly
-
#scope_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Contains configuration information about the scope for a webhook.
-
#webhook ⇒ Boolean, ...
readonly
Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(build_type: nil, filter_groups: nil, pull_request_build_policy: nil, scope_configuration: nil, webhook: nil) ⇒ ProjectTriggersProperty
constructor
A new instance of ProjectTriggersProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(build_type: nil, filter_groups: nil, pull_request_build_policy: nil, scope_configuration: nil, webhook: nil) ⇒ ProjectTriggersProperty
Returns a new instance of ProjectTriggersProperty.
1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 |
# File 'code_build/cfn_project.rb', line 1904 def initialize(build_type: nil, filter_groups: nil, pull_request_build_policy: nil, scope_configuration: nil, webhook: nil) @build_type = build_type Jsii::Type.check_type(@build_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "buildType") unless @build_type.nil? @filter_groups = filter_groups Jsii::Type.check_type(@filter_groups, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJmcW4iOiJhd3MtY2RrLWxpYi5JUmVzb2x2YWJsZSJ9LHsiZnFuIjoiYXdzLWNkay1saWIuYXdzX2NvZGVidWlsZC5DZm5Qcm9qZWN0LldlYmhvb2tGaWx0ZXJQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "filterGroups") unless @filter_groups.nil? @pull_request_build_policy = pull_request_build_policy.is_a?(Hash) ? ::AWSCDK::CodeBuild::CfnProject::PullRequestBuildPolicyProperty.new(**pull_request_build_policy.transform_keys(&:to_sym)) : pull_request_build_policy Jsii::Type.check_type(@pull_request_build_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuQ2ZuUHJvamVjdC5QdWxsUmVxdWVzdEJ1aWxkUG9saWN5UHJvcGVydHkifV19fQ==")), "pullRequestBuildPolicy") unless @pull_request_build_policy.nil? @scope_configuration = scope_configuration.is_a?(Hash) ? ::AWSCDK::CodeBuild::CfnProject::ScopeConfigurationProperty.new(**scope_configuration.transform_keys(&:to_sym)) : scope_configuration Jsii::Type.check_type(@scope_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuQ2ZuUHJvamVjdC5TY29wZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "scopeConfiguration") unless @scope_configuration.nil? @webhook = webhook Jsii::Type.check_type(@webhook, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "webhook") unless @webhook.nil? end |
Instance Attribute Details
#build_type ⇒ String? (readonly)
Specifies the type of build this webhook will trigger. Allowed values are:.
- BUILD - A single build
- BUILD_BATCH - A batch build
1924 1925 1926 |
# File 'code_build/cfn_project.rb', line 1924 def build_type @build_type end |
#filter_groups ⇒ AWSCDK::IResolvable, ... (readonly)
A list of lists of WebhookFilter objects used to determine which webhook events are triggered.
At least one WebhookFilter in the array must specify EVENT as its type.
1931 1932 1933 |
# File 'code_build/cfn_project.rb', line 1931 def filter_groups @filter_groups end |
#pull_request_build_policy ⇒ AWSCDK::IResolvable, ... (readonly)
1934 1935 1936 |
# File 'code_build/cfn_project.rb', line 1934 def pull_request_build_policy @pull_request_build_policy end |
#scope_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configuration information about the scope for a webhook.
1939 1940 1941 |
# File 'code_build/cfn_project.rb', line 1939 def scope_configuration @scope_configuration end |
#webhook ⇒ Boolean, ... (readonly)
Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository.
1944 1945 1946 |
# File 'code_build/cfn_project.rb', line 1944 def webhook @webhook end |
Class Method Details
.jsii_properties ⇒ Object
1946 1947 1948 1949 1950 1951 1952 1953 1954 |
# File 'code_build/cfn_project.rb', line 1946 def self.jsii_properties { :build_type => "buildType", :filter_groups => "filterGroups", :pull_request_build_policy => "pullRequestBuildPolicy", :scope_configuration => "scopeConfiguration", :webhook => "webhook", } end |
Instance Method Details
#to_jsii ⇒ Object
1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 |
# File 'code_build/cfn_project.rb', line 1956 def to_jsii result = {} result.merge!({ "buildType" => @build_type, "filterGroups" => @filter_groups, "pullRequestBuildPolicy" => @pull_request_build_policy, "scopeConfiguration" => @scope_configuration, "webhook" => @webhook, }) result.compact end |