CODESTAR-CONNECTIONS

CreateConnection

enum_ProviderType := [ "Bitbucket", "GitHub", "GitHubEnterpriseServer", "GitLab", "GitLabSelfManaged" ]

valid {
    input.Body.ProviderType == enum_ProviderType[_]
    input.Body.ConnectionName == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.Body.HostArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateHost

enum_ProviderType := [ "Bitbucket", "GitHub", "GitHubEnterpriseServer", "GitLab", "GitLabSelfManaged" ]

valid {
    input.Body.Name == STRING
    input.Body.ProviderType == enum_ProviderType[_]
    input.Body.ProviderEndpoint == STRING
    input.Body.VpcConfiguration.VpcId == STRING
    input.Body.VpcConfiguration.SubnetIds[_] == STRING
    input.Body.VpcConfiguration.SecurityGroupIds[_] == STRING
    input.Body.VpcConfiguration.TlsCertificate == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRepositoryLink

valid {
    input.Body.ConnectionArn == STRING
    input.Body.OwnerId == STRING
    input.Body.RepositoryName == STRING
    input.Body.EncryptionKeyArn == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateSyncConfiguration

enum_PublishDeploymentStatus := [ "ENABLED", "DISABLED" ]
enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]
enum_TriggerResourceUpdateOn := [ "ANY_CHANGE", "FILE_CHANGE" ]

valid {
    input.Body.Branch == STRING
    input.Body.ConfigFile == STRING
    input.Body.RepositoryLinkId == STRING
    input.Body.ResourceName == STRING
    input.Body.RoleArn == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.PublishDeploymentStatus == enum_PublishDeploymentStatus[_]
    input.Body.TriggerResourceUpdateOn == enum_TriggerResourceUpdateOn[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteConnection

valid {
    input.Body.ConnectionArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteHost

valid {
    input.Body.HostArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteRepositoryLink

valid {
    input.Body.RepositoryLinkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteSyncConfiguration

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.ResourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetConnection

valid {
    input.Body.ConnectionArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetHost

valid {
    input.Body.HostArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRepositoryLink

valid {
    input.Body.RepositoryLinkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRepositorySyncStatus

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.Branch == STRING
    input.Body.RepositoryLinkId == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetResourceSyncStatus

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.ResourceName == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSyncBlockerSummary

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.ResourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSyncConfiguration

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.ResourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListConnections

enum_ProviderType := [ "Bitbucket", "GitHub", "GitHubEnterpriseServer", "GitLab", "GitLabSelfManaged" ]

valid {
    input.Body.ProviderTypeFilter == enum_ProviderType[_]
    input.Body.HostArnFilter == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListHosts

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRepositoryLinks

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRepositorySyncDefinitions

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.RepositoryLinkId == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListSyncConfigurations

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.RepositoryLinkId == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.Body.ResourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.ResourceArn == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.Body.ResourceArn == STRING
    input.Body.TagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateHost

valid {
    input.Body.HostArn == STRING
    input.Body.ProviderEndpoint == STRING
    input.Body.VpcConfiguration.VpcId == STRING
    input.Body.VpcConfiguration.SubnetIds[_] == STRING
    input.Body.VpcConfiguration.SecurityGroupIds[_] == STRING
    input.Body.VpcConfiguration.TlsCertificate == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRepositoryLink

valid {
    input.Body.ConnectionArn == STRING
    input.Body.EncryptionKeyArn == STRING
    input.Body.RepositoryLinkId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateSyncBlocker

enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]

valid {
    input.Body.Id == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.ResourceName == STRING
    input.Body.ResolvedReason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateSyncConfiguration

enum_PublishDeploymentStatus := [ "ENABLED", "DISABLED" ]
enum_SyncConfigurationType := [ "CFN_STACK_SYNC" ]
enum_TriggerResourceUpdateOn := [ "ANY_CHANGE", "FILE_CHANGE" ]

valid {
    input.Body.Branch == STRING
    input.Body.ConfigFile == STRING
    input.Body.RepositoryLinkId == STRING
    input.Body.ResourceName == STRING
    input.Body.RoleArn == STRING
    input.Body.SyncType == enum_SyncConfigurationType[_]
    input.Body.PublishDeploymentStatus == enum_PublishDeploymentStatus[_]
    input.Body.TriggerResourceUpdateOn == enum_TriggerResourceUpdateOn[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}