Skip to content

Commit

Permalink
Rename domainId -> domainID
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtmc committed Mar 26, 2021
1 parent 541d92e commit da14e25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions resources/sagemaker-apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

type SageMakerApp struct {
svc *sagemaker.SageMaker
domainId *string
domainID *string
appName *string
appType *string
userProfileName *string
Expand Down Expand Up @@ -39,7 +39,7 @@ func ListSageMakerApps(sess *session.Session) ([]Resource, error) {
for _, app := range resp.Apps {
resources = append(resources, &SageMakerApp{
svc: svc,
domainId: app.DomainId,
domainID: app.DomainId,
appName: app.AppName,
appType: app.AppType,
userProfileName: app.UserProfileName,
Expand All @@ -59,7 +59,7 @@ func ListSageMakerApps(sess *session.Session) ([]Resource, error) {

func (f *SageMakerApp) Remove() error {
_, err := f.svc.DeleteApp(&sagemaker.DeleteAppInput{
DomainId: f.domainId,
DomainId: f.domainID,
AppName: f.appName,
AppType: f.appType,
UserProfileName: f.userProfileName,
Expand All @@ -75,7 +75,7 @@ func (f *SageMakerApp) String() string {
func (i *SageMakerApp) Properties() types.Properties {
properties := types.NewProperties()
properties.
Set("DomainId", i.domainId).
Set("DomainID", i.domainID).
Set("AppName", i.appName).
Set("AppType", i.appType).
Set("UserProfileName", i.userProfileName)
Expand Down
10 changes: 5 additions & 5 deletions resources/sagemaker-domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type SageMakerDomain struct {
svc *sagemaker.SageMaker
domainId *string
domainID *string
}

func init() {
Expand All @@ -33,7 +33,7 @@ func ListSageMakerDomains(sess *session.Session) ([]Resource, error) {
for _, domain := range resp.Domains {
resources = append(resources, &SageMakerDomain{
svc: svc,
domainId: domain.DomainId,
domainID: domain.DomainId,
})
}

Expand All @@ -49,20 +49,20 @@ func ListSageMakerDomains(sess *session.Session) ([]Resource, error) {

func (f *SageMakerDomain) Remove() error {
_, err := f.svc.DeleteDomain(&sagemaker.DeleteDomainInput{
DomainId: f.domainId,
DomainId: f.domainID,
RetentionPolicy: &sagemaker.RetentionPolicy{HomeEfsFileSystem: aws.String(sagemaker.RetentionTypeDelete)},
})

return err
}

func (f *SageMakerDomain) String() string {
return *f.domainId
return *f.domainID
}

func (i *SageMakerDomain) Properties() types.Properties {
properties := types.NewProperties()
properties.
Set("DomainId", i.domainId)
Set("DomainID", i.domainID)
return properties
}
8 changes: 4 additions & 4 deletions resources/sagemaker-userprofiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

type SageMakerUserProfile struct {
svc *sagemaker.SageMaker
domainId *string
domainID *string
userProfileName *string
}

Expand All @@ -34,7 +34,7 @@ func ListSageMakerUserProfiles(sess *session.Session) ([]Resource, error) {
for _, userProfile := range resp.UserProfiles {
resources = append(resources, &SageMakerUserProfile{
svc: svc,
domainId: userProfile.DomainId,
domainID: userProfile.DomainId,
userProfileName: userProfile.UserProfileName,
})
}
Expand All @@ -51,7 +51,7 @@ func ListSageMakerUserProfiles(sess *session.Session) ([]Resource, error) {

func (f *SageMakerUserProfile) Remove() error {
_, err := f.svc.DeleteUserProfile(&sagemaker.DeleteUserProfileInput{
DomainId: f.domainId,
DomainId: f.domainID,
UserProfileName: f.userProfileName,
})

Expand All @@ -65,7 +65,7 @@ func (f *SageMakerUserProfile) String() string {
func (i *SageMakerUserProfile) Properties() types.Properties {
properties := types.NewProperties()
properties.
Set("DomainId", i.domainId).
Set("DomainID", i.domainID).
Set("UserProfileName", i.userProfileName)
return properties
}

0 comments on commit da14e25

Please sign in to comment.