// resourceAwsLambdaAliasUpdate maps to:
// UpdateAlias in the API / SDK
323447
func resourceAwsLambdaAliasUpdate(d *schema.ResourceData, meta interface{}) error {
	conn := meta.(*AWSClient).lambdaconn

	log.Printf("[DEBUG] Updating Lambda alias: %s:%s", d.Get("function_name"), d.Get("name"))

	params := &lambda.UpdateAliasInput{
		Description:     aws.String(d.Get("description").(string)),
		FunctionName:    aws.String(d.Get("function_name").(string)),
		FunctionVersion: aws.String(d.Get("function_version").(string)),
		Name:            aws.String(d.Get("name").(string)),
		RoutingConfig:   expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})),
	}

	_, err := conn.UpdateAlias(params)
	if err != nil {
		return fmt.Errorf("Error updating Lambda alias: %s", err)
	}

	return nil
}
647405
func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) error {
	conn := meta.(*AWSClient).lambdaconn

	functionName := d.Get("function_name").(string)
	aliasName := d.Get("name").(string)

	log.Printf("[DEBUG] Creating Lambda alias: alias %s for function %s", aliasName, functionName)

	params := &lambda.CreateAliasInput{
		Description:     aws.String(d.Get("description").(string)),
		FunctionName:    aws.String(functionName),
		FunctionVersion: aws.String(d.Get("function_version").(string)),
		Name:            aws.String(aliasName),
		RoutingConfig:   expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})),
	}

	aliasConfiguration, err := conn.CreateAlias(params)
	if err != nil {
		return fmt.Errorf("Error creating Lambda alias: %s", err)
	}

	d.SetId(*aliasConfiguration.AliasArn)

	return resourceAwsLambdaAliasRead(d, meta)
}
643856
func (t *Template) GetAllAWSGlueDatabaseResources() map[string]*resources.AWSGlueDatabase {
	results := map[string]*resources.AWSGlueDatabase{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSGlueDatabase:
			results[name] = resource
		}
	}
	return results
}
837641
func (s *Service) SpaceAppAccessUpdate(ctx context.Context, spaceIdentity string, accountIdentity string, o SpaceAppAccessUpdateOpts) (*SpaceAppAccess, error) {
	var spaceAppAccess SpaceAppAccess
	return &spaceAppAccess, s.Patch(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members/%v", spaceIdentity, accountIdentity), o)
}
1037239
func (t *Template) GetAllAWSGameLiftAliasResources() map[string]*resources.AWSGameLiftAlias {
	results := map[string]*resources.AWSGameLiftAlias{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSGameLiftAlias:
			results[name] = resource
		}
	}
	return results
}
1370495
func (db *AgendaDB) CheckAgendasUpdates(activeVersions map[uint32][]chaincfg.ConsensusDeployment) error {
	if db == nil || db.sdb == nil {
		return errDefault
	}

	if len(activeVersions) == 0 {
		return nil
	}

	numRecords, err := db.updatedb(activeVersions)
	if err != nil {
		return fmt.Errorf("agendas.CheckAgendasUpdates failed: %v", err)
	}

	log.Infof("%d agenda records (agendas) were updated", numRecords)

	return db.countProperties()
}
914171
func (s *LimitService) NewUpdateResourceLimitParams(resourcetype int) *UpdateResourceLimitParams {
	p := &UpdateResourceLimitParams{}
	p.p = make(map[string]interface{})
	p.p["resourcetype"] = resourcetype
	return p
}
805029
func (t *Template) GetAWSLambdaLayerVersionPermissionWithName(name string) (*resources.AWSLambdaLayerVersionPermission, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSLambdaLayerVersionPermission:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSLambdaLayerVersionPermission not found", name)
}
1059385
func (s *AwsSecurityFindingFilters) SetResourceAwsIamAccessKeyUserName(v []*StringFilter) *AwsSecurityFindingFilters {
	s.ResourceAwsIamAccessKeyUserName = v
	return s
}
1023400
func (m *MockLambdaAPI) GetAliasRequest(arg0 *lambda.GetAliasInput) (*request.Request, *lambda.AliasConfiguration) {
	ret := m.ctrl.Call(m, "GetAliasRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.AliasConfiguration)
	return ret0, ret1
}
791360
func (t *Template) GetAWSLambdaLayerVersionWithName(name string) (*resources.AWSLambdaLayerVersion, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSLambdaLayerVersion:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSLambdaLayerVersion not found", name)
}
302399
func (s *CreateDataSourceFromRDSInput) SetDataSourceName(v string) *CreateDataSourceFromRDSInput {
	s.DataSourceName = &v
	return s
}
5864
func (t *Template) GetAllAWSKinesisAnalyticsApplicationReferenceDataSourceResources() map[string]*resources.AWSKinesisAnalyticsApplicationReferenceDataSource {
	results := map[string]*resources.AWSKinesisAnalyticsApplicationReferenceDataSource{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSKinesisAnalyticsApplicationReferenceDataSource:
			results[name] = resource
		}
	}
	return results
}
22410
func (t *Template) GetAWSWAFRegionalByteMatchSetWithName(name string) (*resources.AWSWAFRegionalByteMatchSet, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSWAFRegionalByteMatchSet:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSWAFRegionalByteMatchSet not found", name)
}
381604
func (t *Template) GetAllAWSSDBDomainResources() map[string]*resources.AWSSDBDomain {
	results := map[string]*resources.AWSSDBDomain{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSSDBDomain:
			results[name] = resource
		}
	}
	return results
}
110606
func (t *Template) GetAWSDMSEventSubscriptionWithName(name string) (*resources.AWSDMSEventSubscription, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSDMSEventSubscription:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSDMSEventSubscription not found", name)
}
618123
func HandleAWSLambda(functionName string,
	lambdaHandler interface{},
	roleNameOrIAMRoleDefinition interface{}) *LambdaAWSInfo {

	lambda, lambdaErr := NewAWSLambda(functionName, lambdaHandler, roleNameOrIAMRoleDefinition)
	if lambdaErr != nil {
		panic(lambdaErr)
	}
	lambda.deprecationNotices = append(lambda.deprecationNotices, "sparta.HandleAWSLambda is deprecated starting with v1.6.0. Prefer sparta.NewAWSLambda(...)")
	return lambda
}